saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.16k stars 5.48k forks source link

Azure deploy occurred error, but Azure VM deploy success #11459

Closed yamatoya closed 9 years ago

yamatoya commented 10 years ago

http://salt.readthedocs.org/en/latest/topics/cloud/azure.html

When I run the follow command, I got a error. But at Windows Azure, VM was created.

salt-cloud -p azure-ubuntu <original string>

Error string

[ERROR   ] Function timed out: 900
[ERROR   ] Failed to get a value for the hostname.
Error: There was a profile error: Failed to deploy VM

Debug String

[DEBUG   ] vm_kwargs: {'system_config': <azure.servicemanagement.LinuxConfigurationSet object at 0x1c42d90>, 'deployment_slot': 'production', 'role_size': 'Small', 'deployment_name': 'norayuninora', 'service_name': 'norayuninora', 'role_name': 'norayuninora', 'network_config': <azure.servicemanagement.ConfigurationSet object at 0x1c42b50>, 'os_virtual_hard_disk': <azure.servicemanagement.OSVirtualHardDisk object at 0x1c4d390>, 'label': 'norayuninora'}
[DEBUG   ] Attempting function <function wait_for_hostname at 0x1c45e60>
[DEBUG   ] Caught exception in wait_for_fun: local variable 'data' referenced before assignment
[DEBUG   ] Retrying function <function wait_for_hostname at 0x1c45e60> on  (try 1)
[DEBUG   ] Caught exception in wait_for_fun: local variable 'data' referenced before assignment
[DEBUG   ] Retrying function <function wait_for_hostname at 0x1c45e60> on  (try 2)
[DEBUG   ] Caught exception in wait_for_fun: local variable 'data' referenced before assignment
[DEBUG   ] Retrying function <function wait_for_hostname at 0x1c45e60> on  (try 3)
[DEBUG   ] Caught exception in wait_for_fun: local variable 'data' referenced before assignment
basepi commented 10 years ago

Thanks for the report, we'll investigate this.

basepi commented 10 years ago

@techhat Ping

andrejohansson commented 10 years ago

For me this seem to happen whenever I re-use a name of the vm which I do in testing. Eg if I create "my-vm", delete it and then tries to create "my-vm" again...I get this error. But if I choose another name it works.

7oku commented 10 years ago

@yamatoya Are there suspended machines in your vm list? If yes, then that's the cause.

See: https://github.com/saltstack/salt/issues/14793#issuecomment-51464415

egilh commented 10 years ago

Using both 2014.1.10 and 2014.7.0rc2 I get the same error when deploying VM's to Azure. I don't have any suspended machines in my VM list. The VM's are up and running and I can login using specified ssh_username and password, but no bootstrapping occurs. Salt-Minion has to be installed manually, the key deleted from the master and re-accepted.

I am running a master on Ubuntu 14.04 in Azure, trying to deploy VM's to Azure.

# salt-cloud --versions-report
            Salt: 2014.7.0rc2
          Python: 2.7.6 (default, Mar 22 2014, 22:59:56)
          Jinja2: 2.7.2
        M2Crypto: 0.21.1
  msgpack-python: 0.3.0
    msgpack-pure: Not Installed
        pycrypto: 2.6.1
         libnacl: Not Installed
          PyYAML: 3.10
           ioflo: Not Installed
           PyZMQ: 14.0.1
            RAET: Not Installed
             ZMQ: 4.0.4
            Mako: 0.9.1
 Apache Libcloud: 0.14.1

Log output:

2014-09-18 14:57:29,851 [salt.utils.cloud ][DEBUG   ] Retrying function <function wait_for_hostname at 0x7f5ac97057d0> on  (try 150)
2014-09-18 14:57:35,103 [salt.utils.cloud ][DEBUG   ] Caught exception in wait_for_fun: local variable 'data' referenced before assignment
2014-09-18 14:57:36,116 [salt.utils.cloud ][DEBUG   ] Retrying function <function wait_for_hostname at 0x7f5ac97057d0> on  (try 151)
2014-09-18 14:57:40,337 [salt.utils.cloud ][DEBUG   ] Caught exception in wait_for_fun: local variable 'data' referenced before assignment
2014-09-18 14:57:41,344 [salt.utils.cloud ][ERROR   ] Function timed out: 900
2014-09-18 14:57:41,344 [salt.loaded.int.cloud.msazure][ERROR   ] Failed to get a value for the hostname.
techhat commented 9 years ago

@yamatoya, is this still happening?

rallytime commented 9 years ago

Since we didn't hear back, I am going to close this. A lot of work went into improving the Azure salt-cloud driver for the 105.5.x releases, so this should be improved. If this remains an issue for people, please comment and we will gladly re-open and address any remaining issues.