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

RFC: proposed fix for multiple fileserver updates in masterless runs #34048

Merged
merged 1 commit into from
Jun 16, 2016

Conversation

terminalmage
Copy link
Contributor

@terminalmage terminalmage commented Jun 15, 2016

Resolves #30100.

salt.fileclient.get_file_client() creates a new fileclient each time it is invoked. When the LocalClient is being used (as happens in masterless runs), the instantiation of a new FSChan results in a fileserver update being performed.

After investigating, I noticed that this problem has been in place as far back as the 2014.1 branch, so this is not new.

We use salt.fileclient.get_file_client() in a number of places, and most of them are deeper than the execution module layer, so we can't rely on the __context__ dunder to store a fileclient object for later reuse. The compromise in this PR is to drop a key into the minion opts if it is detected that we are using a local fileclient.

If/when we decide to allow masterless Salt to run as a daemon, this code will need to be revisited, as it would prevent more than one fileserver update from being performed. We'd likely need to address this anyway however, since if we had a minion daemon running in masterless mode we would likely need a maintenance loop like we do in the traditional master/minion paradigm.

@terminalmage terminalmage changed the title Ensure only one fileserver update in a masterless run RFC: proposed fix for multiple fileserver updates in masterless runs Jun 15, 2016
@terminalmage
Copy link
Contributor Author

CC: @thatch45, @cachedout

@thatch45 thatch45 merged commit 3119693 into saltstack:2015.8 Jun 16, 2016
@terminalmage terminalmage deleted the issue30100 branch July 7, 2016 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants