Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Minion main tune_in() "start" block never reached ? #67016

Open
amalaguti opened this issue Oct 30, 2024 · 0 comments
Open

[BUG] Minion main tune_in() "start" block never reached ? #67016

amalaguti opened this issue Oct 30, 2024 · 0 comments
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@amalaguti
Copy link

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

@amalaguti amalaguti added Bug broken, incorrect, or confusing behavior needs-triage labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant