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

Add random sleep time to avoid overloading Windows #51171

Merged
merged 1 commit into from
Jan 15, 2019

Conversation

twangboy
Copy link
Contributor

What does this PR do?

Fixes an issue on Windows where the salt-minion restarts over and over when the key has been denied on the master. This adds a random delay between 10 and 20 seconds before the minion exits.

What issues does this PR fix or reference?

#51138

Tests written?

No

Commits signed with GPG?

Yes

@dwoz dwoz merged commit 1206f92 into saltstack:2018.3 Jan 15, 2019
@twangboy twangboy deleted the fix_crypt branch January 16, 2019 00:46
@damon-atkins
Copy link
Contributor

damon-atkins commented Jan 17, 2019

A better solution on windows is to adjust the service, rather than effect all platforms.

nssm/ssm.exe set salt-minion AppThrottle 6000  # Exits within 60 sec,  as python a bit slow to start up
nssm/ssm.exe set salt-minion AppExit Default Restart  # already the default.
nssm/ssm.exe set salt-minion AppRestartDelay 30000  # Then delay restart by 5 min, service will indicate paused

@damon-atkins
Copy link
Contributor

ping @saltstack/team-core

@damon-atkins
Copy link
Contributor

damon-atkins commented Jan 17, 2019

Sorry must of missed the notification for this discussion #51138

@scott-korin
Copy link

scott-korin commented Aug 6, 2020

A better solution on windows is to adjust the service, rather than effect all platforms.

nssm/ssm.exe set salt-minion AppThrottle 6000  # Exits within 60 sec,  as python a bit slow to start up
nssm/ssm.exe set salt-minion AppExit Default Restart  # already the default.
nssm/ssm.exe set salt-minion AppRestartDelay 30000  # Then delay restart by 5 min, service will indicate paused

Is there a way to set these values when salt-minion is installed? I don't see any of these values documented anywhere. My google-fu must be very poor, because I can't find any kind of documentation on the Salt Service Manager at all.

Since these are settings for ssm, not the salt-minion itself, I assume these values aren't in minion config file?

I am just looking for a way to automate setting these during an install or update them once the service is installed. Just run the ssm command?

Are there other related parameters? Is there documentation somewhere on these?

@scott-korin
Copy link

A better solution on windows is to adjust the service, rather than effect all platforms.

nssm/ssm.exe set salt-minion AppThrottle 6000  # Exits within 60 sec,  as python a bit slow to start up
nssm/ssm.exe set salt-minion AppExit Default Restart  # already the default.
nssm/ssm.exe set salt-minion AppRestartDelay 30000  # Then delay restart by 5 min, service will indicate paused

Is there a way to set these values when salt-minion is installed? I don't see any of these values documented anywhere. My google-fu must be very poor, because I can't find any kind of documentation on the Salt Service Manager at all.

Since these are settings for ssm, not the salt-minion itself, I assume these values aren't in minion config file?

I am just looking for a way to automate setting these during an install or update them once the service is installed. Just run the ssm command?

Are there other related parameters? Is there documentation somewhere on these?

ok, so it looks like ssm is just a SaltStack branded version of https://nssm.cc/ and what it is doing is updating WIndows service settings.

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.

4 participants