salt icon indicating copy to clipboard operation
salt copied to clipboard

salt-cloud vmware timeout

Open tatototino opened this issue 10 years ago • 5 comments

Description of Issue/Question

Setup

When I run "salt-cloud -p centos teste1236 -l debug" to clone a vm (template), salt gets timeout after many minutes (20 minutes) like example:

salt-cloud -p centos teste1236 -l debug [DEBUG ] Reading configuration from /etc/salt/cloud [DEBUG ] Reading configuration from /etc/salt/master [DEBUG ] Including configuration from '/etc/salt/master.d/cloud.providers.conf' [DEBUG ] Reading configuration from /etc/salt/master.d/cloud.providers.conf [DEBUG ] Including configuration from '/etc/salt/master.d/reactor.conf' [DEBUG ] Reading configuration from /etc/salt/master.d/reactor.conf [DEBUG ] Key 'file_ignore_glob' with value None has an invalid type of NoneType, a list is required for this value [DEBUG ] Missing configuration file: /etc/salt/cloud.providers [DEBUG ] Including configuration from '/etc/salt/cloud.providers.d/vmware.conf' [DEBUG ] Reading configuration from /etc/salt/cloud.providers.d/vmware.conf [DEBUG ] Missing configuration file: /etc/salt/cloud.profiles [DEBUG ] Including configuration from '/etc/salt/cloud.profiles.d/systa.conf' [DEBUG ] Reading configuration from /etc/salt/cloud.profiles.d/systa.conf [DEBUG ] Configuration file path: /etc/salt/cloud [WARNING ] Insecure logging configuration detected! Sensitive data may be logged. [INFO ] salt-cloud starting [DEBUG ] Could not LazyLoad parallels.avail_sizes [DEBUG ] LazyLoaded parallels.avail_locations [DEBUG ] LazyLoaded proxmox.avail_sizes [DEBUG ] Could not LazyLoad saltify.destroy [DEBUG ] Could not LazyLoad saltify.avail_sizes [DEBUG ] Could not LazyLoad saltify.avail_images [DEBUG ] Could not LazyLoad saltify.avail_locations [DEBUG ] LazyLoaded rackspace.reboot [DEBUG ] LazyLoaded openstack.list_locations [DEBUG ] LazyLoaded rackspace.list_locations [DEBUG ] Could not LazyLoad vmware.optimize_providers [DEBUG ] The 'vmware' cloud driver is unable to be optimized. [DEBUG ] Could not LazyLoad parallels.avail_sizes [DEBUG ] LazyLoaded parallels.avail_locations [DEBUG ] LazyLoaded proxmox.avail_sizes [DEBUG ] Could not LazyLoad saltify.destroy [DEBUG ] Could not LazyLoad saltify.avail_sizes [DEBUG ] Could not LazyLoad saltify.avail_images [DEBUG ] Could not LazyLoad saltify.avail_locations [DEBUG ] LazyLoaded rackspace.reboot [DEBUG ] LazyLoaded openstack.list_locations [DEBUG ] LazyLoaded rackspace.list_locations [DEBUG ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc [DEBUG ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc [DEBUG ] Sending event - data = {'profile': 'centos', 'event': 'starting create', '_stamp': '2016-05-09T16:23:00.790412', 'name': 'teste1236', 'provider': 'my-vmware-config:vmware'} [DEBUG ] Using resource pool used by the vm Centos7-template [DEBUG ] Using folder in which vm Centos7-template is present [DEBUG ] No datastore/datastore cluster specified [DEBUG ] Using datastore used by the vm Centos7-template [DEBUG ] Networks adapters to create: [] [DEBUG ] clone_spec set to: (vim.vm.CloneSpec) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], location = (vim.vm.RelocateSpec) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], service = , folder = , datastore = , diskMoveType = , pool = , host = , disk = (vim.vm.RelocateSpec.DiskLocator) [], transform = , deviceChange = (vim.vm.device.VirtualDeviceSpec) [], profile = (vim.vm.ProfileSpec) [] }, template = false, config = (vim.vm.ConfigSpec) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], changeVersion = , name = , version = , uuid = , instanceUuid = , npivNodeWorldWideName = (long) [], npivPortWorldWideName = (long) [], npivWorldWideNameType = , npivDesiredNodeWwns = , npivDesiredPortWwns = , npivTemporaryDisabled = , npivOnNonRdmDisks = , npivWorldWideNameOp = , locationId = , guestId = , alternateGuestName = , annotation = , files = , tools = , flags = , consolePreferences = , powerOpInfo = , numCPUs = , numCoresPerSocket = , memoryMB = , memoryHotAddEnabled = , cpuHotAddEnabled = , cpuHotRemoveEnabled = , virtualICH7MPresent = , virtualSMCPresent = , deviceChange = (vim.vm.device.VirtualDeviceSpec) [ (vim.vm.device.VirtualDeviceSpec) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], operation = 'edit', fileOperation = , device = (vim.vm.device.VirtualVmxnet3) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], key = 4000, deviceInfo = (vim.Description) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], label = 'Network adapter 1', summary = 'IF_v600_Rede_Tecnologia' }, backing = (vim.vm.device.VirtualEthernetCard.NetworkBackingInfo) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], deviceName = 'IF_v600_Rede_Tecnologia', useAutoDetect = , network = 'vim.Network:network-65', inPassthroughMode = }, connectable = (vim.vm.device.VirtualDevice.ConnectInfo) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], startConnected = true, allowGuestControl = true, connected = false, status = 'untried' }, slotInfo = (vim.vm.device.VirtualDevice.PciBusSlotInfo) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], pciSlotNumber = 192 }, controllerKey = 100, unitNumber = 7, addressType = 'assigned', macAddress = '00:50:56:ba:1e:c9', wakeOnLanEnabled = true, resourceAllocation = , externalId = , uptCompatibilityEnabled = }, profile = (vim.vm.ProfileSpec) [] } ], cpuAllocation = , memoryAllocation = , latencySensitivity = , cpuAffinity = , memoryAffinity = , networkShaper = , cpuFeatureMask = (vim.vm.ConfigSpec.CpuIdInfoSpec) [], extraConfig = (vim.option.OptionValue) [], swapPlacement = , bootOptions = , vAppConfig = , ftInfo = , repConfig = , vAppConfigRemoved = , vAssertsEnabled = , changeTrackingEnabled = , firmware = , maxMksConnections = , guestAutoLockEnabled = , managedBy = , memoryReservationLockedToMax = , nestedHVEnabled = , vPMCEnabled = , scheduledHardwareUpgradeInfo = , vmProfile = (vim.vm.ProfileSpec) [], messageBusTunnelEnabled = }, customization = , powerOn = true, snapshot = , memory = } [INFO ] Creating teste1236 from vm(Centos7-template) [DEBUG ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc [DEBUG ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc [DEBUG ] Sending event - data = {'_stamp': '2016-05-09T16:23:01.526655', 'event': 'requesting instance', 'kwargs': {'profile': 'centos', 'power_on': True, 'priv_key': None, 'customization': False, 'clonefrom': 'Centos7-template', 'deploy': False, 'url': '172.18.143.24', 'ssh_username': 'root', 'driver': 'my-vmware-config:vmware', 'devices': {'network': {'Network adapter 1': {'switch_type': 'standard', 'ip': '172.16.95.211', 'gateway': '172.16.95.1', 'name': 'IF_v600_Rede_Tecnologia', 'subnet_mask': '255.255.255.0'}}}, 'minion': {'master': '172.16.95.246'}, 'user': 'datacenter\lucas.martins', 'template': False, 'pub_key': None, 'password': 'totvs@123', 'os': 'bootstrap-salt', 'inline_script': None, 'name': 'teste1236'}} [INFO ] [ teste1236 ] Waiting for clone task to finish [0 s] [INFO ] [ teste1236 ] Waiting for clone task to finish [5 s] [INFO ] [ teste1236 ] Waiting for clone task to finish [10 s] [INFO ] [ teste1236 ] Waiting for clone task to finish [15 s] [INFO ] [ teste1236 ] Waiting for clone task to finish [20 s] [INFO ] [ teste1236 ] Waiting for clone task to finish [25 s]

  locat[ERROR   ] Error creating teste1236: [Errno 110] Connection timed out

Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/vmware.py", line 2289, in create salt.utils.vmware.wait_for_task(task, vm_name, 'clone', 5, 'info') File "/usr/lib/python2.7/site-packages/salt/utils/vmware.py", line 631, in wait_for_task while task.info.state == 'running' or task.info.state == 'queued': File "/usr/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 569, in call return self.f(_args, *_kwargs) File "/usr/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 389, in _InvokeAccessor return self._stub.InvokeAccessor(self, info) File "/usr/lib/python2.7/site-packages/pyVmomi/StubAdapterAccessorImpl.py", line 42, in InvokeAccessor options=self.pcType.RetrieveOptions(maxObjects=1)) File "/usr/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 575, in self.f((self.args + (obj,) + args), *_kwargs) File "/usr/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 381, in _InvokeMethod return self._stub.InvokeMethod(self, info, args) File "/usr/lib/python2.7/site-packages/pyVmomi/SoapAdapter.py", line 1324, in InvokeMethod resp = conn.getresponse() File "/usr/lib64/python2.7/httplib.py", line 1051, in getresponse response.begin() File "/usr/lib64/python2.7/httplib.py", line 415, in begin version, status, reason = self._read_status() File "/usr/lib64/python2.7/httplib.py", line 371, in _read_status line = self.fp.readline(_MAXLINE + 1) File "/usr/lib64/python2.7/socket.py", line 476, in readline data = self._sock.recv(self._rbufsize) File "/usr/lib64/python2.7/ssl.py", line 736, in recv return self.read(buflen) File "/usr/lib64/python2.7/ssl.py", line 630, in read v = self._sslobj.read(len or 1024) error: [Errno 110] Connection timed out [DEBUG ] LazyLoaded nested.output teste1236: ---------- Error: Error creating teste1236: [Errno 110] Connection timed out

The vm is created successfully but the salt hanging in that part occurring timeout;

Steps to Reproduce Issue

Configuration

centos:
  clonefrom: Centos7-template
#  resourcepool: Resources
#  datastore:  DS-121
#  datacenter: Teste
#  host: 172.16.11.121
  template: False
  power_on: True
  provider: my-vmware-config
  devices:
    network:
      Network adapter 1:
        name: IF_v600_Rede_Tecnologia
        switch_type: standard
        ip: 172.16.95.211
        gateway: 172.16.95.1
        subnet_mask: 255.255.255.0
  deploy: False
  customization: False
  ssh_username: root
  password: dsadsadsa
  minion:
    master: 172.16.95.246

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

 salt-cloud --versions-report
Salt Version:
            Salt: 2015.8.8.2

Dependency Versions:
 Apache Libcloud: 0.20.1
          Jinja2: 2.7.2
        M2Crypto: 0.21.1
            Mako: Not Installed
          PyYAML: 3.11
           PyZMQ: 14.7.0
          Python: 2.7.5 (default, Nov 20 2015, 02:00:19)
            RAET: Not Installed
         Tornado: 4.2.1
             ZMQ: 4.0.5
            cffi: Not Installed
        cherrypy: 3.2.2
        dateutil: Not Installed
           gitdb: Not Installed
       gitpython: Not Installed
           ioflo: Not Installed
         libgit2: Not Installed
         libnacl: Not Installed
    msgpack-pure: Not Installed
  msgpack-python: 0.4.7
    mysql-python: Not Installed
       pycparser: Not Installed
        pycrypto: 2.6.1
          pygit2: Not Installed
    python-gnupg: Not Installed
           smmap: Not Installed
         timelib: Not Installed

System Versions:
            dist: centos 7.2.1511 Core
         machine: x86_64
         release: 3.10.0-327.13.1.el7.x86_64
          system: CentOS Linux 7.2.1511 Core

tatototino avatar May 09 '16 17:05 tatototino

@tatototino what version of pyvmomi are you using. Just ensuring you are using version: 5.5.0-2014.1.1

Ch3LL avatar May 10 '16 00:05 Ch3LL

pip list output below?

apache-libcloud (0.20.1) Babel (0.9.6) backports.ssl-match-hostname (3.4.0.2) chardet (2.2.1) CherryPy (3.2.2) configobj (4.7.2) decorator (3.4.0) futures (3.0.3) iniparse (0.4) Jinja2 (2.7.2) kitchen (1.1.1) M2Crypto (0.21.1) MarkupSafe (0.11) msgpack-python (0.4.7) perf (0.1) pip (8.1.1) psutil (2.2.1) pycrypto (2.6.1) pycurl (7.19.0) pygobject (3.14.0) pygpgme (0.3) pyliblzma (0.5.3) pymssql (2.1.1) pysphere (0.1.8) pyudev (0.15) pyvmomi (6.0.0.2016.4) pyxattr (0.5.1) PyYAML (3.11) pyzmq (14.7.0) requests (2.10.0) salt (2015.8.8.2) setuptools (0.9.8) six (1.10.0) slip (0.4.0) slip.dbus (0.4.0) tornado (4.2.1) urlgrabber (3.10) urllib3 (1.10.2) yum-metadata-parser (1.1.4)

tatototino avatar May 10 '16 02:05 tatototino

I just tested again downgrading by running "pip install pyvmomi==5.5.0-2014.1.1|" after that I executed the same command I got the same issue.

tatototino avatar May 10 '16 02:05 tatototino

I fixed the issue, it was a routing problem in vcenter server. You can close this issue.

Thnks.

tatototino avatar May 16 '16 00:05 tatototino

@tatototino thanks for following up and closing the issue!

Ch3LL avatar May 17 '16 01:05 Ch3LL