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

Manage wusa 3010 return code #54411

Merged
merged 6 commits into from
Dec 28, 2019
Merged

Manage wusa 3010 return code #54411

merged 6 commits into from
Dec 28, 2019

Conversation

tlemarchand
Copy link
Contributor

...and add additional comment in state in case of return code different from 0.

What does this PR do?

This PR fixes a bug.
If a .msu file installation requires reboot, currently wusa state will fail with an un-catched CommandExecutionError, even if installation is done and requires only a reboot.
Also, this PR adds an additional comment in case of CommandExecutionError, so that we can easily know that a reboot is needed, or in case of failure what is the problem.

What issues does this PR fix or reference?

Previous Behavior


ID: KB4054590
Function: wusa.installed
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "C:\salt\bin\lib\site-packages\salt\state.py", line 1919, in call
**cdata['kwargs'])
File "C:\salt\bin\lib\site-packages\salt\loader.py", line 1918, in wrapper
return f(*args, **kwargs)
File "C:\salt\bin\lib\site-packages\salt\states\win_wusa.py", line 90, in installed
salt'wusa.install'
File "C:\salt\bin\lib\site-packages\salt\modules\win_wusa.py", line 143, in install
raise CommandExecutionError('Unknown error: {0}'.format(ret_code))
CommandExecutionError: Unknown error: 3010

New Behavior

wusa

Tests written?

No

Commits signed with GPG?

No

@tlemarchand tlemarchand requested a review from a team as a code owner September 5, 2019 10:43
@ghost ghost requested a review from garethgreenaway September 5, 2019 10:43
salt/states/win_wusa.py Show resolved Hide resolved
@tlemarchand
Copy link
Contributor Author

Hi,

Is it possible to move forward on this ?

@twangboy twangboy added the ZRELEASED - Neon retired label label Oct 4, 2019
@twangboy
Copy link
Contributor

twangboy commented Oct 4, 2019

@tlemarchand Could you rebase this against master. And please add some tests.

@tlemarchand tlemarchand changed the base branch from 2018.3 to master November 15, 2019 11:02
@tlemarchand
Copy link
Contributor Author

@tlemarchand Could you rebase this against master. And please add some tests.

@twangboy , I rebased against master, fixed existing tests and added a new test for the 3010 return code.

@dwoz dwoz merged commit 5f9b611 into saltstack:master Dec 28, 2019
@tlemarchand tlemarchand deleted the fix-wusa-3010-error branch December 28, 2019 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ZRELEASED - Neon retired label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants