Azure: After changing hostname, old hostname is still published to DHCP after reboot

Bug #1498179 reported by Stephen A. Zarkos
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Fix Released
Medium
Dan Watkins

Bug Description

Tested with latest Ubuntu 14.04 image on Azure (20150908).

In Azure, the DHCP client on Ubuntu VMs is configured to push the current hostname to the DHCP server, which then publishes the hostname into Azure DNS. However, after changing the hostname and rebooting, the old hostname is always pushed to Azure DNS instead of the new one.

Repro steps:

  - Create Ubuntu 14.04 VM on Azure
  - Edit /etc/hostname to change the hostname
  - Reboot the VM
  - After reboot, the hostname will be changed, but commands like 'hostname -f' and 'sudo' will complain that the new hostname cannot be found via a DNS lookup.

Next, bounce DHCP to force the DNS update and check that the new hostname has been published:

  - Run "sudo ifdown eth0 && sudo ifup eth0"
  - After a few seconds run: "host NEWHOSTNAME".

DNS lookup to the new hostname should succeed now indicating that the new hostname was pushed to the DHCP server and into Azure DNS. Commands like 'hostname -f' and 'sudo' will work now.

However, after rebooting the OLD hostname will again be published to DNS:

  - Run 'sudo reboot'
  - After logging in, run "host OLDHOSTNAME" and see that the old hostname is again published to DNS. Commands like "hostname -f" and "host NEWHOSTNAME" will again fail.

affects: cloud-init (Ubuntu) → dhcp3 (Ubuntu)
affects: dhcp3 (Ubuntu) → cloud-init (Ubuntu)
Changed in cloud-init (Ubuntu):
assignee: nobody → Dan Watkins (daniel-thewatkins)
Changed in cloud-init (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Chad Smith (chad.smith) wrote :

Reviewing open/stale bugs against the ubuntu cloud-init package.

This issue has been fixed to set hostname before network bringup and initial DHCP request if cloud-init version 18.1. If this still appears to be a problem, please re-open this bug.

Changed in cloud-init (Ubuntu):
status: New → Fix Committed
status: Fix Committed → Fix Released
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.