-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
verify_env function for windows #33062
Conversation
- Create win_verify_env to create directories for windows minion and master. Uses functions from win_functions - Fix stacktrace when minion starts when there's already a minion running. os.getppid doesn't work in windows. Created a function in win_functions to duplicate that functionality.
Hi @twangboy Just some lint here. The rest looks great. http://166.78.178.63:8080/job/PR/job/salt-pr-lint-n/1576/violations/ |
# There is no os.getppid method for windows | ||
from salt.utils import is_windows | ||
if is_windows(): | ||
from salt.utils.win_functions import get_parent_pid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file already has 'import salt.utils' at the top. So I would skip the import and just use:
if salt.utils.is_windows():
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I thought, but it wasn't resolving for me when I was doing it earlier. It is now though. I don't know what happened.
FYI
|
* commit '2dc45dc97ea0ac630e14988d05346dce27535a9a': verify_env function for windows (saltstack#33062) PY3: Fix dict keys when using salt.filesystem.FSChan (saltstack#33077) Fix typo
What does this PR do?
Creates
win_verify_env
to handle folder creation and permissions for windowsFixes problem with missing
os.getppid
method in windowsCreates win_functions util
What issues does this PR fix or reference?
https://github.com/saltstack/zh/issues/674
https://github.com/saltstack/zh/issues/675
Previous Behavior
Folders were not being created on minion/master start in windows
Stacktrace when launching minion/master when minion/master is running
New Behavior
Creates missing folders and adds permissions
Gracefully exits when instance is already running
Tests written?
No