Comment 5 for bug 1843502

Revision history for this message
Moustafa Moustafa (momousta) wrote :

I hit that issue while I was trying to provide a hackish fix for another issue which is reported in bugs.launchpad.net/cloud-init/+bug/1843634
I have some changes to the installed package as indicated on the other bug:
- I brought up eth0 by executing "ifup eth0" from DataSourceAzure code since it was down and the VM was unreachable via ssh (another hackish solution) I'm not sure why it's not brought up without my change.
- I back ported some changes from a future version that was not included in 19.1. The changes are in Azure.py in the find_endpoint method.

I tried to reverse engineer where could be a potential place to define the nameserver and the search domain and I added it in the same level as the eth0 based on my investigation which seems to be wrong in this case.

When I tried to define the nameserver and the address under "eth0", I didn't get the error I was getting but still the "/etc/resolv.conf" was not populated with any nameserver or search domain. I attached the log files for that.

Based on your comment I should not try to populate the nameserver or the search domain since it will be overridden anyways, But when I do so, The DNS is unreachable and the "/etc/resolv.conf" doesn't have any nameservers defined.

On another note, The part that I don't understand though is in the network_state.py where the _v2_common builds a dictionary with the key "addresses" not "address" in [name_cmd.update({'addresses': dns})]. This dictionary is then passed to the handle_nameserver function which requires the key "address"!