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

Use "net" instead of "sc" to restart minion service #61383

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

twangboy
Copy link
Contributor

What does this PR do?

Uses net instead of sc to restart the salt-minion service on Windows. The net command will not return until it completes, where the sc command just fires the stop or start and returns. That's why there was a 5 second sleep in between the stop and start commands. Sometimes the stop command takes longer than 5 seconds and the start command then fails because the service is still shutting down. Using net avoids this race condition and removes the need for the sleep command.

What issues does this PR fix or reference?

Fixes: https://jira.eng.vmware.com/browse/VRAE-8756

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@twangboy twangboy requested a review from a team as a code owner December 20, 2021 22:59
@twangboy twangboy requested review from Ch3LL and removed request for a team December 20, 2021 22:59
@twangboy twangboy added the Phosphorus v3005.0 Release code name and version label Dec 20, 2021
@twangboy twangboy added this to the Phosphorus v3005.0 milestone Dec 20, 2021
Copy link
Contributor

@Ch3LL Ch3LL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a changelog

salt/utils/cloud.py Show resolved Hide resolved
@twangboy
Copy link
Contributor Author

twangboy commented Jan 3, 2022

@Ch3LL Added changelog

@twangboy twangboy requested a review from Ch3LL January 3, 2022 20:32
@Ch3LL Ch3LL merged commit bcd6426 into saltstack:master Jan 13, 2022
@twangboy twangboy deleted the vrae-8756 branch March 23, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Phosphorus v3005.0 Release code name and version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Use NET instead of SC for service management in salt-cloud on Windows
5 participants