Merge lp://qastaging/~mwhudson/utah/live-server into lp://qastaging/utah

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: 1114
Proposed branch: lp://qastaging/~mwhudson/utah/live-server
Merge into: lp://qastaging/utah
Diff against target: 161 lines (+51/-15)
2 files modified
utah/provisioning/live_server.py (+42/-10)
utah/provisioning/ssh.py (+9/-5)
To merge this branch: bzr merge lp://qastaging/~mwhudson/utah/live-server
Reviewer Review Type Date Requested Status
Joshua Powers (community) Approve
Canonical CI Engineering Pending
Review via email: mp+335538@code.qastaging.launchpad.net

Description of the change

Thanks to https://bugs.launchpad.net/cloud-init/+bug/1739516, libvirt's dnsmasq does not see the hostname of the instance. This asks libvirt for the ip address instead.

This won't work with trusty's libvirt but will work with xenial's. I don't know if that is a problem.

To post a comment you must log in.
Revision history for this message
Joshua Powers (powersj) wrote :

Looking at the test system there are two networks:

$ sudo virsh net-list --all
 Name State Autostart Persistent
----------------------------------------------------------
 default active yes yes
 iso-testing active yes yes

However, looking at lp:utah/conf/utah/default-vm.xml it appears to specify the default network in the XML:

<source network='default'/>

Therefore, I think this is fine. On ppc64 we also use the default network.

Merging. Thanks!

review: Approve
1114. By Joshua Powers

Use DHCP lease information to find IP address of VM rather than relying on dns

When using cloud-init to configure networking and hostname, the hostname is
set after networking is set up, which means that libvirt's dnsmasq does not
see the hostname and so cannot resolve it. This changes things to interrogate
libvirt to find the IP address for the MAC address assigned to the VM instead,
which seems a more robust approach in general.

This won't work with the older libvirt, like on trusty.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches