Closed 7oku closed 9 years ago
Thanks for the report, we'll investigate these issues.
@techhat ping
@basepi @techhat Well, seems i could fix it.
The first trace is important, because this shows that the function responsible for getting a list of all nodes is failing, if there is a node without an ip address (this is the case, if you have suspended machines in your azure account!). It tries to calculate with "nothing" -> FAIL! Therefore, this function will never return a valid "URL" field, which is checked by waiting_for_hostname().
Applying this diff to /usr/lib/python2.7/dist-packages/salt/cloud/clouds/msazure.py, to calculate only if ip address is set, fixed it for me:
--- msazure.py_old 2014-08-07 14:20:21.222540724 +0200
+++ msazure.py_new 2014-08-07 14:21:29.174543308 +0200
@@ -268,11 +268,12 @@
ret[deployment]['public_ips'] = []
role_instances = deploy_dict['role_instance_list']
for role_instance in role_instances:
- ip_address = role_instances[role_instance]['ip_address']
- if salt.utils.cloud.is_public_ip(ip_address):
- ret[deployment]['public_ips'].append(ip_address)
- else:
- ret[deployment]['private_ips'].append(ip_address)
+ ip_address = role_instances[role_instance]['ip_address']
+ if ip_address:
+ if salt.utils.cloud.is_public_ip(ip_address):
+ ret[deployment]['public_ips'].append(ip_address)
+ else:
+ ret[deployment]['private_ips'].append(ip_address)
ret[deployment]['size'] = role_instances[role_instance]['instance_size']
roles = deploy_dict['role_list']
for role in roles:
Awesome! Would you mind submitting a pull request?
I'll send you a pull request tomorrow, when I added a more secure way to not only check for just a present value in the variable, but also for a valid ip address.
Great!
Hi there,
we can successfully spin up vms on azure (as seen in the web management portal), but salt-cloud does not seem to get any response and waits until it times out after 900 seconds.
Here is the output:
The machine is up and running:
We tried with stable and current develop branch:
Also, please notice the trace "Failed to execute 'azure.list_nodes()' while querying for running nodes: invalid literal for int() with base 10: " - not sure if this has to do with it or is just cosmetic.
BTW: What exactly should happen now? Is it something like waiting from azure to get the hostname so salt can go and install minion through ssh or is it waiting for the minion to respond with the hostname?
Thanks! 7oku