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

win_pkg: salt minion cannot be upgraded when computer is running on batteries #35943

Closed
morganwillcock opened this issue Aug 31, 2016 · 5 comments
Labels
Bug broken, incorrect, or confusing behavior Execution-Module P4 Priority 4 severity-low 4th level, cosemtic problems, work around exists Windows
Milestone

Comments

@morganwillcock
Copy link
Contributor

Since the minion service is upgraded via the Task Scheduler, the default Task options to prevent a job running if the computer is running on batteries will prevent the minion from being upgraded.

You don't get any feedback from the module:

salt salt-test pkg.install salt_minion
salt-test:
    ----------
ERROR: Minions returned with non-zero exit code

...but you can see the problem by checking the Task history:

Task Scheduler did not launch task "\update-salt-software" because computer is running on batteries. User Action: If launching the task on batteries is required, change the respective flag in the task configuration.

Task Scheduler failed to start "\update-salt-software" task for user "NT AUTHORITY\System". Additional Data: Error Value: 2147750692.

This actually has the potential to be quite useful when upgrading the minion as part of an automated state, but I think there needs to be a way of indicating that the Task should not have this flag set (particularly when trying to manually upgrade using the module). Plus the module should probably try to give you some better feedback.

As a workaround you can manually run the Task.

Tested on 2016.3.2

@Ch3LL
Copy link
Contributor

Ch3LL commented Aug 31, 2016

@morganwillcock thanks looks like we need to do a better job at notifying the user why its not updating.

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists Windows P4 Priority 4 Execution-Module labels Aug 31, 2016
@Ch3LL Ch3LL added this to the Approved milestone Aug 31, 2016
@Ch3LL
Copy link
Contributor

Ch3LL commented Aug 31, 2016

ping @twangboy fyi

@twangboy
Copy link
Contributor

@Ch3LL I'll add it to my list

@morganwillcock
Copy link
Contributor Author

@Ch3LL thank you for looking at this so quickly.

@twangboy I've submitted a PR but I've targeted the oldest stable branch (hopefully the right thing to do; after reading the contribution guide). It does make the assumption that only the minion package is installed or uninstalled by the Task Scheduler. I can't think of any reason why any other installer would need to do this, especially since you cannot check the return code for the action that was run.

@morganwillcock
Copy link
Contributor Author

Thanks for merging.

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 Execution-Module P4 Priority 4 severity-low 4th level, cosemtic problems, work around exists Windows
Projects
None yet
Development

No branches or pull requests

3 participants