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

salt-cloud + pywinrm > 0.1.1 fails. #34393

Closed
sdemura opened this issue Jun 30, 2016 · 4 comments
Closed

salt-cloud + pywinrm > 0.1.1 fails. #34393

sdemura opened this issue Jun 30, 2016 · 4 comments
Labels
Duplicate Duplicate of another issue or PR - will be closed fixed-pls-verify fix is linked, bug author to confirm fix info-needed waiting for more info
Milestone

Comments

@sdemura
Copy link

sdemura commented Jun 30, 2016

Description of Issue/Question

Trying to deploy windows VMs on vmware, using winrm, but am not successful when using pywinrm 0.2.0

Below works fine when pywinrm 0.1.1 is used.

Setup

profiles.conf:

windows_test:
  clonefrom: win2012r2_template_20160628
  datacenter: DC60
  deploy: true
  devices:
    network:
      Network adapter 1:
        domain: someplace.net
        name: lab
        switch_type: standard
  dns_servers:
  - 172.27.16.1
  - 8.8.8.8
  domain: someplace.net
  folder: ci_salt
  memory: 4GB
  minion:
    master: salt-master.someplace.net
  num_cpus: 1
  password: s4lty_p4ssw0rd
  provider: bb8_vsphere
  use_winrm: True
  set_timeout: 900
  smb_port: 445
  userdata_file: /srv/windows/windows-firewall.ps1
  win_installer: /srv/windows/Salt-Minion-2016.3.1-AMD64-Setup.exe
  win_password: some_janky_password
  win_username: Administrator

provider config:

bb8_vsphere:
  driver: vmware
  password: Apc$R4tf
  url: 172.27.21.210
  user: VSPHERE.LOCAL\root

Steps to Reproduce Issue

commands run: salt-cloud -p windows_test salt-windows-01 -l debug

Result:

DEBUG   ] Deploying 172.27.21.97 at 1467303099.0 (Windows)
[DEBUG   ] Attempting connection to host 172.27.21.97 on port 445
[DEBUG   ] Attempting WinRM connection to host 172.27.21.97 on port 5986
[ERROR   ] There was a profile error: 'Protocol' object has no attribute 'set_timeout'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/cloud/cli.py", line 284, in run
    self.config.get('names')
  File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1446, in run_profile
    ret[name] = self.create(vm_)
  File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1281, in create
    output = self.clouds[func](vm_)
  File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/vmware.py", line 2440, in create
    salt.utils.cloud.bootstrap(vm_, __opts__)
  File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 526, in bootstrap
    deployed = deploy_windows(**deploy_kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 1006, in deploy_windows
    timeout=port_timeout * 60)
  File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 835, in wait_for_winrm
    s.protocol.set_timeout(15)
AttributeError: 'Protocol' object has no attribute 'set_timeout'

Versions Report

pywinrm == 0.2.0

root@salt-master:/etc/salt/cloud.profiles.d# salt --versions
Salt Version:
           Salt: 2016.3.1

Dependency Versions:
           cffi: 1.6.0
       cherrypy: Not Installed
       dateutil: 1.5
          gitdb: 0.6.4
      gitpython: 2.0.2
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: 0.24.0
        libnacl: Not Installed
       M2Crypto: 0.21.1
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.7
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
         pygit2: 0.24.0
         Python: 2.7.11 (default, Dec 15 2015, 16:46:19)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.0.1
           RAET: Not Installed
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.3
            ZMQ: 4.0.4

System Versions:
           dist: Ubuntu 14.04 trusty
        machine: x86_64
        release: 3.13.0-34-generic
         system: Linux
        version: Ubuntu 14.04 trusty
@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 30, 2016

@sdemura I believe this is a duplicate of #34008 which has already been fixed. Would you mind trying the fix in #34026 to see if it fixes it?

@Ch3LL Ch3LL added Duplicate Duplicate of another issue or PR - will be closed fixed-pls-verify fix is linked, bug author to confirm fix info-needed waiting for more info labels Jun 30, 2016
@Ch3LL Ch3LL added this to the Blocked milestone Jun 30, 2016
@sdemura
Copy link
Author

sdemura commented Jul 3, 2016

@Ch3LL I will test when I get back from vacation next week.

@Ch3LL
Copy link
Contributor

Ch3LL commented Sep 7, 2016

@sdemura any luck with this?

@Ch3LL
Copy link
Contributor

Ch3LL commented Sep 21, 2016

Closing issue due to being a duplicate and no activity. Please open a new issue if you try the fix and it still does not resolve the issue. Thanks

@Ch3LL Ch3LL closed this as completed Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Duplicate of another issue or PR - will be closed fixed-pls-verify fix is linked, bug author to confirm fix info-needed waiting for more info
Projects
None yet
Development

No branches or pull requests

2 participants