diff --git a/changelogs/fragments/win_updates-poll-transport-loss.yml b/changelogs/fragments/win_updates-poll-transport-loss.yml new file mode 100644 index 000000000..3a9f171b7 --- /dev/null +++ b/changelogs/fragments/win_updates-poll-transport-loss.yml @@ -0,0 +1,4 @@ +bugfixes: + - win_updates - Reset the connection and retry polling the update progress and cancelling the update task on any + connection error, like a WSMan fault raised by the ``psrp`` or ``winrm`` connection plugin, instead of failing and + leaving the update task running on the host - https://github.com/ansible-collections/ansible.windows/issues/970 diff --git a/plugins/action/win_updates.py b/plugins/action/win_updates.py index 83559b191..b4a1b9893 100644 --- a/plugins/action/win_updates.py +++ b/plugins/action/win_updates.py @@ -4,6 +4,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +import random +import time import traceback from ansible.errors import AnsibleActionFail, AnsibleConnectionFailure @@ -12,13 +14,6 @@ from ansible.plugins.action import ActionBase from ansible.utils.display import Display -# This is not ideal but the psrp connection plugin doesn't catch all these exceptions as an AnsibleConnectionFailure. -# Until we can guarantee we are using a version of psrp that handles all this we try to handle those issues. -try: - from requests.exceptions import Timeout as RequestTimeoutException -except ImportError: - RequestTimeoutException = AnsibleConnectionFailure - try: from typing import ( Dict, @@ -941,11 +936,14 @@ def _run_updates(self, task_vars, module_options, for_testing=False): # The last thing we should be doing is to cancel the task. This # stops a process that might still be running and is also used in # a normal operation to signal the exit status has been received. + # The update task keeps on running if the cancel does not reach + # it so it is retried like the poll. try: self._execute_win_updates( task_vars, operation="cancel", operation_options=cancel_options, + retry_on_failure=True, ) except Exception as e: if has_errored: @@ -968,12 +966,18 @@ def _execute_win_updates( final_options["_operation_options"] = operation_options or {} # WinRM based connections are problematic when the host is under load. - # When polling the output, ignore connection/timeout failures and try - # again in case it was a temporary error. We can only do this during - # the polling stage as that's the only time we can ignore a dropped - # progress message. + # When polling the output or cancelling the task, ignore + # connection/timeout failures and try again in case it was a temporary + # error. We can only do this during the polling stage as that's the + # only time we can ignore a dropped progress message, the cancel can + # be sent more than once. The update task outlives the WinRM shell so + # the connection is reset to run the command on a new shell. The psrp + # and winrm connection plugins don't raise all of their connection + # errors as an AnsibleConnectionFailure, e.g. a WSManFault when the + # shell was aborted, so any error is retried. result = {} - for idx in range(2): + attempts = 6 if retry_on_failure else 1 + for idx in range(attempts): try: result = self._execute_module( module_name='ansible.windows.win_updates', @@ -981,11 +985,16 @@ def _execute_win_updates( task_vars=task_vars, ) break - except (AnsibleConnectionFailure, RequestTimeoutException) as e: - if not retry_on_failure or idx == 1: + except Exception as e: + if idx == attempts - 1: raise - display.warning("Connection failure when polling update result - attempting to retry: %s" % to_text(e)) + action = "polling update result" if operation == "poll" else "cancelling update task" + display.warning("Connection failure when %s - attempting to retry: %s" % (action, to_text(e))) + self._reset_connection(task_vars.get('inventory_hostname', None)) + + # Use exponential backoff with a max timeout, plus a little bit of randomness + time.sleep(min(2**idx, 12) + random.randint(0, 1000) / 1000) if 'invocation' in result and not self._invocation: # First run through we want to update the invocation value in the final results @@ -1012,6 +1021,13 @@ def _execute_win_updates( return result + def _reset_connection(self, inventory_hostname): # type: (Optional[str]) -> None + """Resets the connection, the next command reconnects if it fails.""" + try: + self._connection.reset() + except Exception as e: + display.vvvv("Failed to reset connection: %s" % to_text(e), host=inventory_hostname) + def _get_update_info(self, update_id): # type: (str) -> Dict """Gets the update results info value to return.""" raw_info = self._updates[update_id] diff --git a/tests/unit/plugins/action/test_win_updates.py b/tests/unit/plugins/action/test_win_updates.py index 8ea4515b6..e2e522605 100644 --- a/tests/unit/plugins/action/test_win_updates.py +++ b/tests/unit/plugins/action/test_win_updates.py @@ -116,6 +116,11 @@ def _read_gen(self): yield AnsibleConnectionFailure("connection error") continue + if line == b'FAILURE_WSMAN': + # pypsrp exception raised as is by the psrp connection plugin + yield Exception("Received a WSManFault message. (Code: 995)") + continue + if not line: if not output: continue @@ -165,13 +170,14 @@ def win_updates_init(task_args, async_val=0, check_mode=False, connection=None): return plugin -def run_action(monkeypatch, test_id, task_vars, check_mode=False, poll_rc=0, poll_stderr=b'', poll_newline_separator=b'\n'): +def run_action(monkeypatch, test_id, task_vars, check_mode=False, poll_rc=0, poll_stderr=b'', poll_newline_separator=b'\n', + connection=None): module_arg_return = task_vars.copy() plugin = win_updates_init( task_vars, check_mode=check_mode, - connection=MagicMock(), + connection=connection or MagicMock(), ) execute_module = MagicMock() execute_module.side_effect = UpdateModuleMock(test_id, module_arg_return).__iter__() @@ -578,6 +584,7 @@ def test_fail_install(monkeypatch): def test_connection_failures_during_poll(monkeypatch): mock_warning = MagicMock() monkeypatch.setattr(win_updates.display, "warning", mock_warning) + monkeypatch.setattr(win_updates.time, "sleep", MagicMock()) actual = run_action(monkeypatch, 'poll_error1.txt', { 'category_names': ['*'], }) @@ -623,17 +630,66 @@ def test_connection_failures_during_poll(monkeypatch): def test_multiple_connection_failures_during_poll(monkeypatch): mock_warning = MagicMock() monkeypatch.setattr(win_updates.display, "warning", mock_warning) + monkeypatch.setattr(win_updates.time, "sleep", MagicMock()) + connection = MagicMock() actual = run_action(monkeypatch, 'poll_error2.txt', { 'category_names': ['*'], - }) + }, connection=connection) assert actual['unreachable'] assert actual['msg'] == 'connection error' - assert mock_warning.call_count == 3 - assert mock_warning.mock_calls[0][1] == ('Connection failure when polling update result - attempting to retry: connection error',) - assert mock_warning.mock_calls[1][1] == ('Unknown failure when polling update result - attempting to cancel task: connection error',) - assert mock_warning.mock_calls[2][1] == ('Unknown failure when cancelling update task: connection error',) + assert mock_warning.call_count == 12 + for idx in range(5): + assert mock_warning.mock_calls[idx][1] == ('Connection failure when polling update result - attempting to retry: connection error',) + assert mock_warning.mock_calls[5][1] == ('Unknown failure when polling update result - attempting to cancel task: connection error',) + for idx in range(6, 11): + assert mock_warning.mock_calls[idx][1] == ('Connection failure when cancelling update task - attempting to retry: connection error',) + assert mock_warning.mock_calls[11][1] == ('Unknown failure when cancelling update task: connection error',) + + # Reset before each poll and cancel retry. + assert connection.reset.call_count == 10 + + +def test_wsman_fault_during_poll(monkeypatch): + mock_warning = MagicMock() + monkeypatch.setattr(win_updates.display, "warning", mock_warning) + monkeypatch.setattr(win_updates.time, "sleep", MagicMock()) + connection = MagicMock() + actual = run_action(monkeypatch, 'poll_error3.txt', { + 'category_names': ['*'], + }, connection=connection) + + assert 'failed' not in actual + assert actual['changed'] + assert actual['found_update_count'] == 3 + assert actual['installed_update_count'] == 3 + + assert connection.reset.call_count == 1 + assert mock_warning.call_count == 1 + assert mock_warning.mock_calls[0][1] == ( + 'Connection failure when polling update result - attempting to retry: Received a WSManFault message. (Code: 995)', + ) + + +def test_wsman_fault_during_cancel(monkeypatch): + mock_warning = MagicMock() + monkeypatch.setattr(win_updates.display, "warning", mock_warning) + monkeypatch.setattr(win_updates.time, "sleep", MagicMock()) + connection = MagicMock() + actual = run_action(monkeypatch, 'poll_error4.txt', { + 'category_names': ['*'], + }, connection=connection) + + assert 'failed' not in actual + assert actual['changed'] + assert actual['installed_update_count'] == 3 + + assert connection.reset.call_count == 1 + assert mock_warning.call_count == 1 + assert mock_warning.mock_calls[0][1] == ( + 'Connection failure when cancelling update task - attempting to retry: Received a WSManFault message. (Code: 995)', + ) def test_repeated_update(monkeypatch): diff --git a/tests/unit/test_data/win_updates/poll_error2.txt b/tests/unit/test_data/win_updates/poll_error2.txt index 8b687d379..8cc5a2351 100644 --- a/tests/unit/test_data/win_updates/poll_error2.txt +++ b/tests/unit/test_data/win_updates/poll_error2.txt @@ -47,3 +47,12 @@ FAILURE FAILURE FAILURE +FAILURE +FAILURE +FAILURE +FAILURE +FAILURE +FAILURE +FAILURE +FAILURE +FAILURE diff --git a/tests/unit/test_data/win_updates/poll_error3.txt b/tests/unit/test_data/win_updates/poll_error3.txt new file mode 100644 index 000000000..cd3f7168f --- /dev/null +++ b/tests/unit/test_data/win_updates/poll_error3.txt @@ -0,0 +1,67 @@ +{"task":"search_result","result":{"updates":[{"impact":"Normal","categories":["Security Updates","Windows Server 2019"],"revision_number":200,"auto_download":"LetWindowsUpdateDecide","deployment_action":"Installation","description":"A security issue has been identified in a Microsoft software product that could affect your system. You can help protect your system by installing this update from Microsoft. For a complete listing of the issues that are included in this update, see the associated Microsoft Knowledge Base article. After you install this update, you may have to restart your system.","title":"2020-10 Security Update for Adobe Flash Player for Windows Server 2019 for x64-based Systems (KB4580325)","id":"1abb2377-20ef-43ff-aabc-0de4711ab205","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":true,"is_installed":false,"kb":["KB4580325"],"is_uninstallable":false,"browse_only":false,"auto_selection":"LetWindowsUpdateDecide","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Normal","categories":["Updates","Windows Server 2019"],"revision_number":203,"auto_download":"AlwaysAutoDownload","deployment_action":"Installation","description":"This update will remove Adobe Flash Player from your Windows machine. After you install this item, you may have to restart your computer.","title":"Update for Removal of Adobe Flash Player for Windows Server 2019 for x64-based systems (KB4577586)","id":"f26a0046-1e1a-4305-8743-19c92c3095a5","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":false,"is_installed":false,"kb":["KB4577586"],"is_uninstallable":false,"browse_only":false,"auto_selection":"AutoSelectIfDownloaded","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Normal","categories":["Update Rollups","Windows Server 2016","Windows Server 2019"],"revision_number":200,"auto_download":"LetWindowsUpdateDecide","deployment_action":"Installation","description":"After the download, this tool runs one time to check your computer for infection by specific, prevalent malicious software (including Blaster, Sasser, and Mydoom) and helps remove any infection that is found. If an infection is found, the tool will display a status report the next time that you start your computer. A new version of the tool will be offered every month. If you want to manually run the tool on your computer, you can download a copy from the Microsoft Download Center, or you can run an online version from microsoft.com. This tool is not a replacement for an antivirus product. To help protect your computer, you should use an antivirus product.","title":"Windows Malicious Software Removal Tool x64 - v5.89 (KB890830)","id":"d4919b6d-584d-436f-b877-dc3fc352a774","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":true,"is_installed":false,"kb":["KB890830"],"is_uninstallable":false,"browse_only":false,"auto_selection":"LetWindowsUpdateDecide","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Normal","categories":["Updates","Windows Server 2019"],"revision_number":202,"auto_download":"AlwaysAutoDownload","deployment_action":"Installation","description":"Install this update to resolve issues in Windows. For a complete listing of the issues that are included in this update, see the associated Microsoft Knowledge Base article for more information. After you install this item, you may have to restart your computer.","title":"2021-05 Cumulative Update Preview for .NET Framework 3.5, 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB5003396)","id":"9e94ae7a-f0f4-4ea1-b590-9f1388ee6126","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":false,"is_installed":false,"kb":["KB5003396"],"is_uninstallable":false,"browse_only":false,"auto_selection":"AutoSelectIfDownloaded","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Minor","categories":["Definition Updates","Microsoft Defender Antivirus"],"revision_number":200,"auto_download":"LetWindowsUpdateDecide","deployment_action":"Installation","description":"Install this update to revise the files that are used to detect viruses, spyware, and other potentially unwanted software. Once you have installed this item, it cannot be removed.","title":"Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.341.70.0)","id":"4326d7df-c256-4cca-99f7-c02a04443ec1","is_beta":false,"is_present":true,"type":"Software","reboot_behaviour":"NeverReboots","is_downloaded":false,"auto_select_on_websites":true,"is_installed":false,"kb":["KB2267602"],"is_uninstallable":false,"browse_only":false,"auto_selection":"LetWindowsUpdateDecide","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Normal","categories":["Security Updates"],"revision_number":1,"auto_download":"AlwaysAutoDownload","deployment_action":"Installation","description":"Install this update to resolve issues in Windows. For a complete listing of the issues that are included in this update, see the associated Microsoft Knowledge Base article for more information. After you install this item, you may have to restart your computer.","title":"2021-05 Cumulative Update for Windows Server 2019 (1809) for x64-based Systems (KB5003171)","id":"74819184-828b-4f97-bb4b-089a0c58e366","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":true,"is_installed":false,"kb":["KB5003171"],"is_uninstallable":false,"browse_only":false,"auto_selection":"AutoSelectIfDownloaded","reboot_required":false,"is_hidden":false,"is_mandatory":false}],"filtered":[{"id":"f26a0046-1e1a-4305-8743-19c92c3095a5","reasons":["category_names"]},{"id":"9e94ae7a-f0f4-4ea1-b590-9f1388ee6126","reasons":["category_names"]},{"id":"4326d7df-c256-4cca-99f7-c02a04443ec1","reasons":["reject_list","category_names"]}]}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":0,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":2,"PercentComplete":0,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":1}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":0,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":2,"PercentComplete":0,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":1}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":0,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":0,"PercentComplete":0,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":0,"PercentComplete":0,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":2,"PercentComplete":0,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":1}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":0,"PercentComplete":0,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":0,"PercentComplete":0,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":71,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":15910015,"CurrentUpdateIndex":0,"PercentComplete":13,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":15910015,"CurrentUpdateBytesToDownload":22201471,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":81,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":18007167,"CurrentUpdateIndex":0,"PercentComplete":15,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":18007167,"CurrentUpdateBytesToDownload":22201471,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":2,"HResult":0},"progress":{"CurrentUpdatePercentComplete":100,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":35047896,"CurrentUpdateIndex":1,"PercentComplete":50,"CurrentUpdateId":"d4919b6d-584d-436f-b877-dc3fc352a774","TotalBytesDownloaded":58793394,"CurrentUpdateBytesToDownload":35047896,"CurrentUpdateDownloadPhase":2}}} + +{"task":"download","result":{"result":{"ResultCode":2,"HResult":0},"progress":{"CurrentUpdatePercentComplete":100,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":35047896,"CurrentUpdateIndex":1,"PercentComplete":50,"CurrentUpdateId":"d4919b6d-584d-436f-b877-dc3fc352a774","TotalBytesDownloaded":58793394,"CurrentUpdateBytesToDownload":35047896,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":2,"PercentComplete":50,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":59386288,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":1}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":2705861,"CurrentUpdateIndex":2,"PercentComplete":50,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":59955228,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":1,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":7265610,"CurrentUpdateIndex":2,"PercentComplete":50,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":64514977,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":3,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":13190874,"CurrentUpdateIndex":2,"PercentComplete":51,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":70440241,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":7,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":22299089,"CurrentUpdateIndex":2,"PercentComplete":53,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":79548456,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":13,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":36979153,"CurrentUpdateIndex":2,"PercentComplete":56,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":94228520,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":19,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":51659217,"CurrentUpdateIndex":2,"PercentComplete":59,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":108908584,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":22,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":64242129,"CurrentUpdateIndex":2,"PercentComplete":61,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":121491496,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":27,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":77873617,"CurrentUpdateIndex":2,"PercentComplete":63,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":135122984,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":31,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":90456529,"CurrentUpdateIndex":2,"PercentComplete":65,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":147705896,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":96,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":413318837,"CurrentUpdateIndex":2,"PercentComplete":98,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":470568204,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":96,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":424853173,"CurrentUpdateIndex":2,"PercentComplete":98,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":482102540,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":97,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":436387509,"CurrentUpdateIndex":2,"PercentComplete":98,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":493636876,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":98,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":447921845,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":505171212,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":98,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":459456181,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":516705548,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":99,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":470990517,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":528239884,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":99,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":482524853,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":539774220,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":99,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":494059189,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":551308556,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":99,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":505593525,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":562842892,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":2,"HResult":0},"progress":{"CurrentUpdatePercentComplete":100,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":516079285,"CurrentUpdateIndex":2,"PercentComplete":100,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":573328652,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":2,"HResult":0},"progress":{"CurrentUpdatePercentComplete":100,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":516079285,"CurrentUpdateIndex":2,"PercentComplete":100,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":573328652,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download_result","result":{"info":[{"result_code":2,"id":"1abb2377-20ef-43ff-aabc-0de4711ab205","hresult":0},{"result_code":2,"id":"d4919b6d-584d-436f-b877-dc3fc352a774","hresult":0},{"result_code":2,"id":"74819184-828b-4f97-bb4b-089a0c58e366","hresult":0}]}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":6,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":20,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":8,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":25,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":2,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":8,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":2,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":8,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":3,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":9,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} + +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":6,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":20,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":9,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":28,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":9,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":28,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":9,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":28,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":10,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":30,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":10,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":31,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":10,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":32,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +FAILURE_WSMAN + +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":27,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":81,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":27,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":82,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":27,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":83,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":28,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":84,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":28,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":85,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":28,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":86,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} + +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":29,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":87,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":63,"CurrentUpdateIndex":0,"CurrentUpdatePercentComplete":90,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":66,"CurrentUpdateIndex":0,"CurrentUpdatePercentComplete":100,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205"}}} +{"task":"install","result":{"result":{"ResultCode":2,"RebootRequired":true,"HResult":0},"progress":{"PercentComplete":66,"CurrentUpdateIndex":0,"CurrentUpdatePercentComplete":100,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":100,"CurrentUpdateIndex":1,"CurrentUpdatePercentComplete":100,"CurrentUpdateId":"d4919b6d-584d-436f-b877-dc3fc352a774"}}} +{"task":"install","result":{"result":{"ResultCode":2,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":100,"CurrentUpdateIndex":1,"CurrentUpdatePercentComplete":100,"CurrentUpdateId":"d4919b6d-584d-436f-b877-dc3fc352a774"}}} +{"task":"install_result","result":{"info":[{"result_code":2,"reboot_required":true,"id":"1abb2377-20ef-43ff-aabc-0de4711ab205","hresult":0},{"result_code":2,"reboot_required":false,"id":"d4919b6d-584d-436f-b877-dc3fc352a774","hresult":0},{"result_code":2,"reboot_required":true,"id":"74819184-828b-4f97-bb4b-089a0c58e366","hresult":0}]}} +{"task":"exit","result":{"action":null,"exception":null,"reboot_required":true,"failed":false,"changed":true}} + +{"changed": false} diff --git a/tests/unit/test_data/win_updates/poll_error4.txt b/tests/unit/test_data/win_updates/poll_error4.txt new file mode 100644 index 000000000..9ff061523 --- /dev/null +++ b/tests/unit/test_data/win_updates/poll_error4.txt @@ -0,0 +1,67 @@ +{"task":"search_result","result":{"updates":[{"impact":"Normal","categories":["Security Updates","Windows Server 2019"],"revision_number":200,"auto_download":"LetWindowsUpdateDecide","deployment_action":"Installation","description":"A security issue has been identified in a Microsoft software product that could affect your system. You can help protect your system by installing this update from Microsoft. For a complete listing of the issues that are included in this update, see the associated Microsoft Knowledge Base article. After you install this update, you may have to restart your system.","title":"2020-10 Security Update for Adobe Flash Player for Windows Server 2019 for x64-based Systems (KB4580325)","id":"1abb2377-20ef-43ff-aabc-0de4711ab205","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":true,"is_installed":false,"kb":["KB4580325"],"is_uninstallable":false,"browse_only":false,"auto_selection":"LetWindowsUpdateDecide","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Normal","categories":["Updates","Windows Server 2019"],"revision_number":203,"auto_download":"AlwaysAutoDownload","deployment_action":"Installation","description":"This update will remove Adobe Flash Player from your Windows machine. After you install this item, you may have to restart your computer.","title":"Update for Removal of Adobe Flash Player for Windows Server 2019 for x64-based systems (KB4577586)","id":"f26a0046-1e1a-4305-8743-19c92c3095a5","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":false,"is_installed":false,"kb":["KB4577586"],"is_uninstallable":false,"browse_only":false,"auto_selection":"AutoSelectIfDownloaded","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Normal","categories":["Update Rollups","Windows Server 2016","Windows Server 2019"],"revision_number":200,"auto_download":"LetWindowsUpdateDecide","deployment_action":"Installation","description":"After the download, this tool runs one time to check your computer for infection by specific, prevalent malicious software (including Blaster, Sasser, and Mydoom) and helps remove any infection that is found. If an infection is found, the tool will display a status report the next time that you start your computer. A new version of the tool will be offered every month. If you want to manually run the tool on your computer, you can download a copy from the Microsoft Download Center, or you can run an online version from microsoft.com. This tool is not a replacement for an antivirus product. To help protect your computer, you should use an antivirus product.","title":"Windows Malicious Software Removal Tool x64 - v5.89 (KB890830)","id":"d4919b6d-584d-436f-b877-dc3fc352a774","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":true,"is_installed":false,"kb":["KB890830"],"is_uninstallable":false,"browse_only":false,"auto_selection":"LetWindowsUpdateDecide","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Normal","categories":["Updates","Windows Server 2019"],"revision_number":202,"auto_download":"AlwaysAutoDownload","deployment_action":"Installation","description":"Install this update to resolve issues in Windows. For a complete listing of the issues that are included in this update, see the associated Microsoft Knowledge Base article for more information. After you install this item, you may have to restart your computer.","title":"2021-05 Cumulative Update Preview for .NET Framework 3.5, 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB5003396)","id":"9e94ae7a-f0f4-4ea1-b590-9f1388ee6126","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":false,"is_installed":false,"kb":["KB5003396"],"is_uninstallable":false,"browse_only":false,"auto_selection":"AutoSelectIfDownloaded","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Minor","categories":["Definition Updates","Microsoft Defender Antivirus"],"revision_number":200,"auto_download":"LetWindowsUpdateDecide","deployment_action":"Installation","description":"Install this update to revise the files that are used to detect viruses, spyware, and other potentially unwanted software. Once you have installed this item, it cannot be removed.","title":"Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.341.70.0)","id":"4326d7df-c256-4cca-99f7-c02a04443ec1","is_beta":false,"is_present":true,"type":"Software","reboot_behaviour":"NeverReboots","is_downloaded":false,"auto_select_on_websites":true,"is_installed":false,"kb":["KB2267602"],"is_uninstallable":false,"browse_only":false,"auto_selection":"LetWindowsUpdateDecide","reboot_required":false,"is_hidden":false,"is_mandatory":false},{"impact":"Normal","categories":["Security Updates"],"revision_number":1,"auto_download":"AlwaysAutoDownload","deployment_action":"Installation","description":"Install this update to resolve issues in Windows. For a complete listing of the issues that are included in this update, see the associated Microsoft Knowledge Base article for more information. After you install this item, you may have to restart your computer.","title":"2021-05 Cumulative Update for Windows Server 2019 (1809) for x64-based Systems (KB5003171)","id":"74819184-828b-4f97-bb4b-089a0c58e366","is_beta":false,"is_present":false,"type":"Software","reboot_behaviour":"CanRequestReboot","is_downloaded":false,"auto_select_on_websites":true,"is_installed":false,"kb":["KB5003171"],"is_uninstallable":false,"browse_only":false,"auto_selection":"AutoSelectIfDownloaded","reboot_required":false,"is_hidden":false,"is_mandatory":false}],"filtered":[{"id":"f26a0046-1e1a-4305-8743-19c92c3095a5","reasons":["category_names"]},{"id":"9e94ae7a-f0f4-4ea1-b590-9f1388ee6126","reasons":["category_names"]},{"id":"4326d7df-c256-4cca-99f7-c02a04443ec1","reasons":["reject_list","category_names"]}]}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":0,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":2,"PercentComplete":0,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":1}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":0,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":2,"PercentComplete":0,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":1}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":0,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":0,"PercentComplete":0,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":0,"PercentComplete":0,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":2,"PercentComplete":0,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":1}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":0,"PercentComplete":0,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":0,"PercentComplete":0,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":0,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":71,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":15910015,"CurrentUpdateIndex":0,"PercentComplete":13,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":15910015,"CurrentUpdateBytesToDownload":22201471,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":81,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":18007167,"CurrentUpdateIndex":0,"PercentComplete":15,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205","TotalBytesDownloaded":18007167,"CurrentUpdateBytesToDownload":22201471,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":2,"HResult":0},"progress":{"CurrentUpdatePercentComplete":100,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":35047896,"CurrentUpdateIndex":1,"PercentComplete":50,"CurrentUpdateId":"d4919b6d-584d-436f-b877-dc3fc352a774","TotalBytesDownloaded":58793394,"CurrentUpdateBytesToDownload":35047896,"CurrentUpdateDownloadPhase":2}}} + +{"task":"download","result":{"result":{"ResultCode":2,"HResult":0},"progress":{"CurrentUpdatePercentComplete":100,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":35047896,"CurrentUpdateIndex":1,"PercentComplete":50,"CurrentUpdateId":"d4919b6d-584d-436f-b877-dc3fc352a774","TotalBytesDownloaded":58793394,"CurrentUpdateBytesToDownload":35047896,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":57249367,"CurrentUpdateBytesDownloaded":0,"CurrentUpdateIndex":2,"PercentComplete":50,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":59386288,"CurrentUpdateBytesToDownload":0,"CurrentUpdateDownloadPhase":1}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":0,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":2705861,"CurrentUpdateIndex":2,"PercentComplete":50,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":59955228,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":1,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":7265610,"CurrentUpdateIndex":2,"PercentComplete":50,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":64514977,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":3,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":13190874,"CurrentUpdateIndex":2,"PercentComplete":51,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":70440241,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":7,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":22299089,"CurrentUpdateIndex":2,"PercentComplete":53,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":79548456,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":13,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":36979153,"CurrentUpdateIndex":2,"PercentComplete":56,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":94228520,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":19,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":51659217,"CurrentUpdateIndex":2,"PercentComplete":59,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":108908584,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":22,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":64242129,"CurrentUpdateIndex":2,"PercentComplete":61,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":121491496,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":27,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":77873617,"CurrentUpdateIndex":2,"PercentComplete":63,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":135122984,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":31,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":90456529,"CurrentUpdateIndex":2,"PercentComplete":65,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":147705896,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":96,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":413318837,"CurrentUpdateIndex":2,"PercentComplete":98,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":470568204,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":96,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":424853173,"CurrentUpdateIndex":2,"PercentComplete":98,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":482102540,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":97,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":436387509,"CurrentUpdateIndex":2,"PercentComplete":98,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":493636876,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":98,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":447921845,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":505171212,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":98,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":459456181,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":516705548,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":99,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":470990517,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":528239884,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":99,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":482524853,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":539774220,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":99,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":494059189,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":551308556,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":1,"HResult":0},"progress":{"CurrentUpdatePercentComplete":99,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":505593525,"CurrentUpdateIndex":2,"PercentComplete":99,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":562842892,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":2,"HResult":0},"progress":{"CurrentUpdatePercentComplete":100,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":516079285,"CurrentUpdateIndex":2,"PercentComplete":100,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":573328652,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download","result":{"result":{"ResultCode":2,"HResult":0},"progress":{"CurrentUpdatePercentComplete":100,"TotalBytesToDownload":573328652,"CurrentUpdateBytesDownloaded":516079285,"CurrentUpdateIndex":2,"PercentComplete":100,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366","TotalBytesDownloaded":573328652,"CurrentUpdateBytesToDownload":516079285,"CurrentUpdateDownloadPhase":2}}} +{"task":"download_result","result":{"info":[{"result_code":2,"id":"1abb2377-20ef-43ff-aabc-0de4711ab205","hresult":0},{"result_code":2,"id":"d4919b6d-584d-436f-b877-dc3fc352a774","hresult":0},{"result_code":2,"id":"74819184-828b-4f97-bb4b-089a0c58e366","hresult":0}]}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":6,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":20,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":8,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":25,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":2,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":8,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":2,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":8,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":3,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":9,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} + +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":6,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":20,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":9,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":28,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":9,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":28,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":9,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":28,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":10,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":30,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":10,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":31,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":10,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":32,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} + +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":27,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":81,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":27,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":82,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":27,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":83,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":28,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":84,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":28,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":85,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":28,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":86,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} + +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":29,"CurrentUpdateIndex":2,"CurrentUpdatePercentComplete":87,"CurrentUpdateId":"74819184-828b-4f97-bb4b-089a0c58e366"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":63,"CurrentUpdateIndex":0,"CurrentUpdatePercentComplete":90,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":66,"CurrentUpdateIndex":0,"CurrentUpdatePercentComplete":100,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205"}}} +{"task":"install","result":{"result":{"ResultCode":2,"RebootRequired":true,"HResult":0},"progress":{"PercentComplete":66,"CurrentUpdateIndex":0,"CurrentUpdatePercentComplete":100,"CurrentUpdateId":"1abb2377-20ef-43ff-aabc-0de4711ab205"}}} +{"task":"install","result":{"result":{"ResultCode":1,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":100,"CurrentUpdateIndex":1,"CurrentUpdatePercentComplete":100,"CurrentUpdateId":"d4919b6d-584d-436f-b877-dc3fc352a774"}}} +{"task":"install","result":{"result":{"ResultCode":2,"RebootRequired":false,"HResult":0},"progress":{"PercentComplete":100,"CurrentUpdateIndex":1,"CurrentUpdatePercentComplete":100,"CurrentUpdateId":"d4919b6d-584d-436f-b877-dc3fc352a774"}}} +{"task":"install_result","result":{"info":[{"result_code":2,"reboot_required":true,"id":"1abb2377-20ef-43ff-aabc-0de4711ab205","hresult":0},{"result_code":2,"reboot_required":false,"id":"d4919b6d-584d-436f-b877-dc3fc352a774","hresult":0},{"result_code":2,"reboot_required":true,"id":"74819184-828b-4f97-bb4b-089a0c58e366","hresult":0}]}} +{"task":"exit","result":{"action":null,"exception":null,"reboot_required":true,"failed":false,"changed":true}} + +FAILURE_WSMAN +{"changed": false}