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_package - Installing MSI Succeeds, But ConnectionError Thrown Before Program is Listed in Control Panel #77

Closed
imareporter opened this issue Jun 22, 2020 · 1 comment

Comments

@imareporter
Copy link

SUMMARY

The installation of WindowsAdminCenter1910.2.msi on a Windows Server 2016 instance is successful via win_package. However, a WinRM message is thrown before WAC is listed in Control Panel, making look as though the install failed.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

win_package

ANSIBLE VERSION
ansible 2.9.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /var/lib/awx/venv/test/lib/python2.7/site-packages/ansible
  executable location = /var/lib/awx/venv/test/bin/ansible
  python version = 2.7.5 (default, Apr  2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
CONFIGURATION
(test) [root@0b37f81e0ac0 inventory]# ansible-config dump --only-changed
(test) [root@0b37f81e0ac0 inventory]# 
OS / ENVIRONMENT

Control Node: CentOS7
Target Node: Windows Server 2016 (WinRM/NTLM)

STEPS TO REPRODUCE
---
- name: Provision Windows Server Instance
  hosts: Windows2016
  gather_facts: false

  tasks:
    - name: Install WAC
      win_package:
        path: C:\Users\Administrator\Downloads\WindowsAdminCenter1910.2.msi
        state: present
        arguments:
           - SME_PORT=443
           - SSL_CERTIFICATE_OPTION=generate
EXPECTED RESULTS

I would expect the win_package task to install the MSI successfully, without generating an error as though it failed:

FIRST RUN:

(test) [root@0b37f81e0ac0 inventory]# ansible-playbook center.yml -i demo_hosts -vvvvv
ansible-playbook 2.9.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /var/lib/awx/venv/test/lib/python2.7/site-packages/ansible
  executable location = /var/lib/awx/venv/test/bin/ansible-playbook
  python version = 2.7.5 (default, Apr  2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /opt/tower_resources/inventory/inventory/demo_hosts as it did not pass its verify_file() method
script declined parsing /opt/tower_resources/inventory/inventory/demo_hosts as it did not pass its verify_file() method
auto declined parsing /opt/tower_resources/inventory/inventory/demo_hosts as it did not pass its verify_file() method
Parsed /opt/tower_resources/inventory/inventory/demo_hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc

PLAYBOOK: center.yml ******************************************************************************************************************************************************************************************
Positional arguments: center.yml
become_method: sudo
inventory: (u'/opt/tower_resources/inventory/inventory/demo_hosts',)
forks: 5
tags: (u'all',)
verbosity: 5
connection: smart
timeout: 10
1 plays in center.yml

PLAY [Provision Windows Server Instance] ******************************************************************************************************************************************************************************************
META: ran handlers

TASK [Install WAC] *************************************************************************************************************************************************************************************
task path: /opt/tower_resources/inventory/inventory/center.yml:7
Using module file /var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/modules/windows/win_package.ps1
Pipelining is enabled.
<win2016.test.com> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO win2016.test.com
<win2016.test.com> WINRM CONNECT: transport=ntlm endpoint=https://win2016.test.com:5986/wsman
<win2016.test.com> WINRM OPEN SHELL: 5C222E5F-2E9C-4C54-8A1A-FC02D4D87D8D
EXEC (via pipeline wrapper)
<win2016.test.com> WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-EncodedCommand', u'UABvAHcAZQByAFMAaABlAGwAbAAgAC0ATgBvAFAAcgBvAGYAaQBsAGUAIAAtAE4AbwBuAEkAbgB0AGUAcgBhAGMAdABpAHYAZQAgAC0ARQB4AGUAYwB1AHQAaQBvAG4A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IAbABBAEgASQBBAEkAQQBBADkAQQBDAEEAQQBXAHcAQgBUAEEARwBNAEEAYwBnAEIAcABBAEgAQQBBAGQAQQBCAEMAQQBHAHcAQQBiAHcAQgBqAEEARwBzAEEAWABRAEEANgBBAEQAbwBBAFEAdwBCAHkAQQBHAFUAQQBZAFEAQgAwAEEARwBVAEEASwBBAEEAawBBAEgATQBBAGMAQQBCAHMAQQBHAGsAQQBkAEEAQgBmAEEASABBAEEAWQBRAEIAeQBBAEgAUQBBAGMAdwBCAGIAQQBEAEEAQQBYAFEAQQBwAEEAQQBvAEEASgBnAEEAawBBAEcAVQBBAGUAQQBCAGwAQQBHAE0AQQBYAHcAQgAzAEEASABJAEEAWQBRAEIAdwBBAEgAQQBBAFoAUQBCAHkAQQBBAD0APQA=']
<win2016.test.com> WINRM CLOSE SHELL: 5C222E5F-2E9C-4C54-8A1A-FC02D4D87D8D
The full traceback is:
Traceback (most recent call last):
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 146, in run
    res = self._execute()
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 645, in _execute
    result = self._handler.run(task_vars=variables)
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/plugins/action/normal.py", line 46, in run
    result = merge_hash(result, self._execute_module(task_vars=task_vars, wrap_async=wrap_async))
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/plugins/action/__init__.py", line 923, in _execute_module
    res = self._low_level_execute_command(cmd, sudoable=sudoable, in_data=in_data)
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/plugins/action/__init__.py", line 1071, in _low_level_execute_command
    rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 548, in exec_command
    result = self._winrm_exec(cmd_parts[0], cmd_parts[1:], from_exec=True, stdin_iterator=stdin_iterator)
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 509, in _winrm_exec
    self.protocol.cleanup_command(self.shell_id, command_id)
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/winrm/protocol.py", line 390, in cleanup_command
    res = self.send_message(xmltodict.unparse(req))
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/winrm/protocol.py", line 243, in send_message
    resp = self.transport.send_message(message)
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/winrm/transport.py", line 323, in send_message
    response = self._send_message_request(prepared_request, message)
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/winrm/transport.py", line 328, in _send_message_request
    response = self.session.send(prepared_request, timeout=self.read_timeout_sec)
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/var/lib/awx/venv/test/lib/python2.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='win2016.test.com', port=5986): Max retries exceeded with url: /wsman (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5117e4dd90>: Failed to establish a new connection: [Errno 111] Connection refused',))
fatal: [win2016.test.com]: FAILED! => {
    "msg": "Unexpected failure during module execution.", 
    "stdout": ""
}

PLAY RECAP ****************************************************************************************************************************************************************************************************
win2016.test.com              : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

SECOND RUN:

(test) [root@0b37f81e0ac0 inventory]# ansible-playbook center.yml -i demo_hosts -vvvvv
ansible-playbook 2.9.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /var/lib/awx/venv/test/lib/python2.7/site-packages/ansible
  executable location = /var/lib/awx/venv/test/bin/ansible-playbook
  python version = 2.7.5 (default, Apr  2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /opt/tower_resources/inventory/inventory/demo_hosts as it did not pass its verify_file() method
script declined parsing /opt/tower_resources/inventory/inventory/demo_hosts as it did not pass its verify_file() method
auto declined parsing /opt/tower_resources/inventory/inventory/demo_hosts as it did not pass its verify_file() method
Parsed /opt/tower_resources/inventory/inventory/demo_hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc

PLAYBOOK: center.yml ******************************************************************************************************************************************************************************************
Positional arguments: center.yml
become_method: sudo
inventory: (u'/opt/tower_resources/inventory/inventory/demo_hosts',)
forks: 5
tags: (u'all',)
verbosity: 5
connection: smart
timeout: 10
1 plays in center.yml

PLAY [Provision Windows Server Instance] ******************************************************************************************************************************************************************************************
META: ran handlers

TASK [Install WAC] *************************************************************************************************************************************************************************************
task path: /opt/tower_resources/inventory/inventory/center.yml:7
Using module file /var/lib/awx/venv/test/lib/python2.7/site-packages/ansible/modules/windows/win_package.ps1
Pipelining is enabled.
<win2016.test.com> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO win2016.test.com
<win2016.test.com> WINRM CONNECT: transport=ntlm endpoint=https://win2016.test.com:5986/wsman
<win2016.test.com> WINRM OPEN SHELL: 87F9375F-7284-4EC8-BED9-26B98F237CD4
EXEC (via pipeline wrapper)
<win2016.test.com> WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-EncodedCommand', u'UABvAHcAZQByAFMAaABlAGwAbAAgAC0ATgBvAFAAcgBvAGYAaQBsAGUAIAAtAE4AbwBuAEkAbgB0AGUAcgBhAGMAdABpAHYAZQAgAC0ARQB4AGUAYwB1AHQAaQBvAG4AUABvAGwAaQBjAHkAIABVAG4AcgBlAHMAdAByAGkAYwB0AGUAZAAgAC0ARQBuAGMAbwBkAGUAZABDAG8AbQBtAGEAbgBkACAASgBnAEIAagBBAEcA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AEEARwBzAEEAWABRAEEANgBBAEQAbwBBAFEAdwBCAHkAQQBHAFUAQQBZAFEAQgAwAEEARwBVAEEASwBBAEEAawBBAEgATQBBAGMAQQBCAHMAQQBHAGsAQQBkAEEAQgBmAEEASABBAEEAWQBRAEIAeQBBAEgAUQBBAGMAdwBCAGIAQQBEAEEAQQBYAFEAQQBwAEEAQQBvAEEASgBnAEEAawBBAEcAVQBBAGUAQQBCAGwAQQBHAE0AQQBYAHcAQgAzAEEASABJAEEAWQBRAEIAdwBBAEgAQQBBAFoAUQBCAHkAQQBBAD0APQA=']
<win2016.test.com> WINRM RESULT u'<Response code 0, out "{"changed":false,"re", err "#< CLIXML\r\n<Objs Ver">'
<win2016.test.com> WINRM CLOSE SHELL: 87F9375F-7284-4EC8-BED9-26B98F237CD4
ok: [win2016.test.com] => {
    "changed": false, 
    "reboot_required": false
}
META: ran handlers
META: ran handlers

PLAY RECAP ****************************************************************************************************************************************************************************************************
win2016.test.com             : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
ACTUAL RESULTS

win_package does succeed, however, it's like the process is ending before the task can fully finish. The connection being killed then generates a ConnectionError and makes it look as though the install failed. Not sure if this is win_package not handling the connection correctly or if it's something on the WinRM side.

@jborean93
Copy link
Collaborator

There's nothing we can do here, the Windows Admin Center install is bouncing the WinRM service which stops the the win_package module from reporting back it's status, in reality it actually kills the win_package module because it's a child process of the WinRM process. The docs for Install Windows Admin Center even state

Installing Windows Admin Center will restart the WinRM service, which will sever all remote PowerShells sessions

It does go onto to you can add the parameter/argument RESTART_WINRM=0 to stop that behaviour and manually bounce that service another way for Windows Admin Center to function. What you should do is reboot after a change was detected like so

- name: Install WAC
  win_package:
    path: C:\Users\Administrator\Downloads\WindowsAdminCenter1910.2.msi
    state: present
    arguments: >-
      SME_PORT=443
      SSL_CERTIFICATE_OPTION=generate
      RESTART_WINRM=0
  register: wac_install

# WAC needs to restart the WinRM service, only sane way of handling that in Ansible that uses WinRM is to use win_reboot to reboot the host
- name: Reboot after installing WAC
  win_reboot:
  when: wac_install is changed

I also changed the arguments from using a list to a string as the list conversion doesn't work too well for MSI packages. If reboot a host isn't viable for you then you could try and restart the WinRM service through async in a separate task. Unfortunately it won't be as stable as doing a reboot as that win_reboot action plugin handles things like the host not being reachable which is hard to do in a separate task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants