network is only configured on first boot

Bug #1715095 reported by Marc Siegrist
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-images
Invalid
Undecided
Unassigned
cloud-init
Expired
Undecided
Unassigned

Bug Description

When I create a new VM with an Ubuntu Server Cloud image and using cloud-init, the network is only configured on the first boot. After the machine has been shut-down and powered up again, the network is no longer configured static and instead uses DHCP.

I’m using the, at the time newest, xenial server cloud image (30.08.2017) and use a VM manager called oVirt that uses KVM for virtualization.

cloud-init version 0.7.9
Ubuntu 16.04.3 LTS

Steps to reproduce:

• Download Ubuntu cloud image from https://cloud-images.ubuntu.com/xenial/
• Mount disk to fix bug #1573095 (https://bugs.launchpad.net/cloud-images/+bug/1573095)
• Fix bug with instructions from comment https://bugs.launchpad.net/cloud-
        images/+bug/1573095/comments/15
• Unmount disk image.
• Import Image into oVirt.
• Create new virtual machine in oVirt.
• Assign disk image to virtual machine.
• Add cloud init parameters (including static IP conf.) to virtual machine.
• Boot virtual machine.
• See that networking works and a static IP is configured (ifconfig).
• See that the network is configured in /etc/network/interfaces.d/50-cloud-init.cfg
• Shutdown (NOT reboot) the virtual machine.
• Power On the virtual machine.
• See that DHCP service runs for 5min.
• After boot see that network is not configured.
• See that file /etc/network/interfaces.d/50-cloud-init.cfg lost its configuration.

Other possible causes:
• The cloud image might be wrongly configured to run cloud-init at every boot (As reboots
        are not affected and the server listens for cloud-init configuration data after first
        boot. Also the ssh hostkey is reset every time the machine boots).

My current workaround:
• I added the following line to my cloud-init runcmd parameters to copy the cloud network
        file:
        - "cp /etc/network/interfaces.d/50-cloud-init.cfg /etc/network/interfaces"
• I disable cloud-init manually after first boot by adding the following line to my cloud-
        init runcmd parameters:
        - [ touch, "/etc/cloud/cloud-init.disabled" ]

Revision history for this message
Marc Siegrist (dev-marc) wrote :
Revision history for this message
Dan Watkins (oddbloke) wrote :

Hi Marc,

Thanks for filing this bug! Is this still an issue you are seeing in more recent versions of cloud-init? If it is, please do give us steps to reproduce and set this bug back to New.

Thanks!

Dan

Changed in cloud-init:
status: New → Incomplete
Joshua Powers (powersj)
Changed in cloud-images:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cloud-init because there has been no activity for 60 days.]

Changed in cloud-init:
status: Incomplete → Expired
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.