[BUG] Minion main tune_in() "start" block never reached ?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
While troubleshooting issue #66932, and debugging minion.py connection setup on Windows, realized that apparently the main minion tune_in() function is never called with start: True.
Maybe I'm mssing something but just wanted to call the attention to review this code to see if there's anything broken affecting minion setup/connection, or it's just redundant, orphaned code that can be removed to clean up stuff
The minion.tune_in() function seems to be called from async def _connect_minion(self, minion), which seems to be taking care of the beacons/scheduler_before_connect setup part. But it's called with start=False
# Main Minion Tune In
def tune_in(self, start=True):
"""
Lock onto the publisher. This is the main event loop for the minion
:rtype : None
"""
self._pre_tune()
log.debug("Minion '%s' trying to tune in", self.opts["id"])
if start:
if self.opts.get("beacons_before_connect", False):
self.setup_beacons(before_connect=True)
if self.opts.get("scheduler_before_connect", False):
self.setup_scheduler(before_connect=True)
self.sync_connect_master()
if self.connected:
self._fire_master_minion_start()
log.info("Minion is ready to receive requests!")
https://github.com/saltstack/salt/blob/master/salt/minion.py#L3107-L3126
Setup
3007.1 minion.py on Windows
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 with salt/minion.py around tune_in() at lines 3107-3126, then trace calls from async _connect_minion(self, minion), including the start=False path. Compare this flow with issue #66932 and the Windows connection setup. Done means determining whether start=True is required for setup or whether the branch is redundant, with tests or evidence covering the conclusion.
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
- Needs clarification
- Newbie friendliness
- 25/100