{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/47874","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/47874/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/47874/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/47874/events","html_url":"https://github.com/ansible/ansible/issues/47874","id":376020369,"node_id":"MDU6SXNzdWUzNzYwMjAzNjk=","number":47874,"title":"win_updates fails on Windows 2008 R2 fails on Ansible 2.7.1, works on 2.6.4","user":{"login":"alexntt","id":6974884,"node_id":"MDQ6VXNlcjY5NzQ4ODQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6974884?v=4","gravatar_id":"","url":"https://api.github.com/users/alexntt","html_url":"https://github.com/alexntt","followers_url":"https://api.github.com/users/alexntt/followers","following_url":"https://api.github.com/users/alexntt/following{/other_user}","gists_url":"https://api.github.com/users/alexntt/gists{/gist_id}","starred_url":"https://api.github.com/users/alexntt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexntt/subscriptions","organizations_url":"https://api.github.com/users/alexntt/orgs","repos_url":"https://api.github.com/users/alexntt/repos","events_url":"https://api.github.com/users/alexntt/events{/privacy}","received_events_url":"https://api.github.com/users/alexntt/received_events","type":"User","site_admin":false},"labels":[{"id":947190508,"node_id":"MDU6TGFiZWw5NDcxOTA1MDg=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.7","name":"affects_2.7","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":54811101,"node_id":"MDU6TGFiZWw1NDgxMTEwMQ==","url":"https://api.github.com/repos/ansible/ansible/labels/needs_info","name":"needs_info","color":"eb6420","default":false},{"id":383076471,"node_id":"MDU6TGFiZWwzODMwNzY0NzE=","url":"https://api.github.com/repos/ansible/ansible/labels/python3","name":"python3","color":"fbca04","default":false},{"id":636352796,"node_id":"MDU6TGFiZWw2MzYzNTI3OTY=","url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false},{"id":108461331,"node_id":"MDU6TGFiZWwxMDg0NjEzMzE=","url":"https://api.github.com/repos/ansible/ansible/labels/windows","name":"windows","color":"777777","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-31T15:27:19Z","updated_at":"2018-11-05T11:11:48Z","closed_at":null,"author_association":"NONE","body":"##### SUMMARY\r\n\r\nRunning win_updates on a Windows 2008 R2 system yields:\r\n\r\n```\r\nTASK [update_os : Install Windows Updates] *************************************\r\ntask path: /var/jenkins_home/jobs/ntteam-monit-build-amis/workspace/PYTHON/System-CPython-2.7/distribution/w2k8r2/ansible/roles/update_os/tasks/main.yml:11\r\nTuesday 30 October 2018  21:13:40 +0000 (0:00:00.064)       0:06:41.271 ******* \r\nwin_updates: running win_updates module\r\nUsing module file /var/jenkins_home/shiningpanda/jobs/f9fce0f4/virtualenvs/d41d8cd9/local/lib/python2.7/site-packages/ansible/modules/windows/win_updates.ps1\r\n<54.246.239.54> ESTABLISH WINRM CONNECTION FOR USER: nttrmadm on PORT 5985 TO 54.246.239.54\r\nEXEC (via pipeline wrapper)\r\nThe full traceback is:\r\nException calling \"FromBase64String\" with \"1\" argument(s): \"The input is not a \r\nvalid Base-64 string as it contains a non-base 64 character, more than two \r\npadding characters, or an illegal character among the padding characters. \"\r\nAt line:909 char:9\r\n+         $stdout = \r\n[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromB ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n~~~\r\n    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException\r\n    + FullyQualifiedErrorId : FormatException\r\n \r\nfatal: [w2k8r2]: FAILED! => {\r\n    \"changed\": false, \r\n    \"msg\": \"Failed to become user SYSTEM: Exception calling \\\"FromBase64String\\\" with \\\"1\\\" argument(s): \\\"The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. \\\"\"\r\n}\r\n```\r\n\r\n, via a simple play:\r\n\r\n```\r\n- block:\r\n    - name: Install Windows Updates\r\n      win_updates:\r\n        category_names: ['SecurityUpdates','CriticalUpdates','UpdateRollups']\r\n      register: update_result\r\n\r\n    - name: Restart Windows\r\n      win_reboot:\r\n        reboot_timeout: 4500\r\n        post_reboot_delay: 300\r\n      # Force w2k8r2 to always be rebooted.\r\n      when: update_result.reboot_required or selected_dist == 'w2k8r2'\r\n  when: selected_dist in windows_dists\r\n```\r\n\r\n##### ISSUE TYPE\r\n- Bug Report\r\n\r\n##### COMPONENT NAME\r\n\r\nwin_updates\r\n\r\n##### ANSIBLE VERSION\r\n\r\n```\r\nansible 2.7.1\r\n  config file = None\r\n  configured module search path = ['/home/acorcoles/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /home/acorcoles/.virtualenvs/infra/lib/python3.5/site-packages/ansible\r\n  executable location = /home/acorcoles/.virtualenvs/infra/bin/ansible\r\n  python version = 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118]\r\n```\r\n\r\n##### CONFIGURATION\r\n\r\n```\r\nANSIBLE_PIPELINING(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = True\r\nANSIBLE_SSH_ARGS(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=30m\r\nANSIBLE_SSH_CONTROL_PATH(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = ~/.ssh/mux-%%r@%%h:%%p\r\nANSIBLE_SSH_RETRIES(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = 5\r\nDEFAULT_CALLBACK_WHITELIST(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = ['profile_tasks']\r\nDEFAULT_PRIVATE_KEY_FILE(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = /home/acorcoles/git/ntteam.monit.plugins/ansible/ansible-key-pair.pem\r\nDEFAULT_TIMEOUT(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = 60\r\nDEFAULT_VAULT_PASSWORD_FILE(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = /home/acorcoles/git/ntteam.monit.plugins/ansible/vault_pass.txt\r\nHOST_KEY_CHECKING(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = False\r\nRETRY_FILES_ENABLED(/home/acorcoles/git/ntteam.monit.plugins/ansible/ansible.cfg) = False\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\n\r\nOther Windows OS versions (later ones) work fine\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\nSee play above and error\r\n\r\n##### EXPECTED RESULTS\r\n\r\nWindows updates applied\r\n\r\n##### ACTUAL RESULTS\r\n\r\nFailure, see above."},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/435838288","html_url":"https://github.com/ansible/ansible/issues/47874#issuecomment-435838288","issue_url":"https://api.github.com/repos/ansible/ansible/issues/47874","id":435838288,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTgzODI4OA==","user":{"login":"alexntt","id":6974884,"node_id":"MDQ6VXNlcjY5NzQ4ODQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6974884?v=4","gravatar_id":"","url":"https://api.github.com/users/alexntt","html_url":"https://github.com/alexntt","followers_url":"https://api.github.com/users/alexntt/followers","following_url":"https://api.github.com/users/alexntt/following{/other_user}","gists_url":"https://api.github.com/users/alexntt/gists{/gist_id}","starred_url":"https://api.github.com/users/alexntt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexntt/subscriptions","organizations_url":"https://api.github.com/users/alexntt/orgs","repos_url":"https://api.github.com/users/alexntt/repos","events_url":"https://api.github.com/users/alexntt/events{/privacy}","received_events_url":"https://api.github.com/users/alexntt/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T11:11:48Z","updated_at":"2018-11-05T11:11:48Z","author_association":"NONE","body":"Hi @jborean93,\r\n\r\n> Are you able to test this against Ansible in devel, there has been a few changes to handle errors in the become output and I'm hoping that could let us know what is actually happening here?\r\n\r\nI've run it twice and now I get:\r\n\r\n```\r\n\r\nTASK [update_os : Install Windows Updates] *************************************\r\ntask path: /var/jenkins_home/jobs/ntteam-monit-build-amis/workspace/PYTHON/System-CPython-2.7/distribution/w2k8r2/ansible/roles/update_os/tasks/main.yml:11\r\nMonday 05 November 2018  11:08:38 +0000 (0:00:00.041)       0:07:20.782 ******* \r\nwin_updates: running win_updates module\r\nUsing module file /var/jenkins_home/shiningpanda/jobs/f9fce0f4/virtualenvs/d41d8cd9/local/lib/python2.7/site-packages/ansible/modules/windows/win_updates.ps1\r\n<52.31.110.161> ESTABLISH WINRM CONNECTION FOR USER: nttrmadm on PORT 5985 TO 52.31.110.161\r\n\r\nEXEC (via pipeline wrapper)\r\n\r\nThe full traceback is:\r\nProperty 'ErrorRecord' cannot be found on this object. Make sure that it exists.\r\nAt line:54 char:5\r\n+     Write-AnsibleError -Message \"Unhandled exception while executing module\" `\r\n+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException\r\n    + FullyQualifiedErrorId : PropertyNotFoundStrict\r\n\r\nScriptStackTrace:\r\nat <ScriptBlock>, <No file>: line 54\r\nat <ScriptBlock>, <No file>: line 26\r\nat <ScriptBlock><End>, <No file>: line 137\r\nat <ScriptBlock>, <No file>: line 5\r\n\r\nSystem.Management.Automation.PropertyNotFoundException: Property 'ErrorRecord' cannot be found on this object. Make sure that it exists.\r\n   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)\r\n   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)\r\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)\r\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)\r\nfatal: [w2k8r2]: FAILED! => {\r\n    \"changed\": false, \r\n    \"msg\": \"Failed to invoke PowerShell module: Property 'ErrorRecord' cannot be found on this object. Make sure that it exists.\"\r\n}\r\n```\r\n\r\nIf you want us to do more testing, let us know and we will try. Note that this is Windows 2008 R2 ( ami-0ffffc9a085b90ffa on eu-west-1, IIRC).\r\n\r\n> Also as an FYI there's a reboot option on win_updates that will now do the reboot task for you if necessary.\r\n\r\nYeah, I think we've seen that, but we've not been able to update things yet.\r\n\r\nThanks!\r\n\r\nÁlex"}}
{"actor":{"display_login":"alexntt"}}