MasterMinion calculates master grains on every usage
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
High CPU on Salt Master and slow minion responses caused by an extreme number of commands being run on the master. Tracking this down we see that MasterMinion calculates grains when instantiated, however it does not calculate the minions grains - it calculates the master’s grains, and the results are uncashed and unused (grains_cache defaults to false and the grains I cannot find references anywhere)
When setting up the MasterMinion pillar calculation is disabled and it seems grains should be too
Setup
Salt Master using GifFS and GitPillar
10 Minions
Steps to Reproduce Issue
Running salt asterisk test.ping takes about a minute
After disabling the grains in MasterMinion it takes seconds
Versions Report
2019.2.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the MasterMinion initialization described in the issue and inspect how grains are calculated when pillar calculation is disabled. Reproduce the behavior with salt '*' test.ping, then verify that master grains are no longer calculated unnecessarily and that the command returns in seconds rather than about a minute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100