Deprovision breaks iDNS registration when using cloud-init

Bug #1268050 reported by Stephen A. Zarkos
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
walinuxagent (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Medium
Unassigned
Saucy
Fix Released
Medium
Unassigned
Trusty
Fix Released
Medium
Unassigned

Bug Description

SRU justification

Impact : Users who run "waagent --deprovision" and then capture/snapshot an image will not have the instance register with iDNS and subsiquently the instance will be unreachable.

This issue is caused by waagent changing the "send-hostname" parameter in the dhclient.

Fix : Applied upstream commit from https://github.com/WindowsAzure/WALinuxAgent/commit/375f1ede38fd323c2560e7e21ba99ac50bc66acd

Test Case :
 - Launch instance
 - Install walinuxagent from proposed
 - Run "waagent --deprovision"
 - Shutdown instance
 - Run "azure vm shutdown <name>" with Azure CLI tool
 - Run "azure vm capture <name> <new name>" with Azure CLI tool
 - Launch new instance from <new name>
 - Confirm that instance is accesable using DNS name

Regression : Low. The change fixes how waagent interacts with /etc/dhcp/dhcpclient.conf. If an instance has been configured via cloud-init, there is no change.

[ORIGNIAL BUG REPORT]
Hello,

This is a request to please backport this patch from the 1.4.1 agent:
https://github.com/WindowsAzure/WALinuxAgent/commit/375f1ede38fd323c2560e7e21ba99ac50bc66acd

Summary
The Ubuntu images in the Windows Azure gallery (except for 12.10) all use cloud-init for provisioning. This means that WALA provisioning and the hostname monitor are disabled via /etc/waagent.conf.

However, when a user runs 'waagent -deprovision' the agent will attempt to modify the 'send host-name' parameter dhclient.conf file to set the hostname to "localhost.localdomain". But with provisioning and the monitor disabled, the agent does not have a chance to reset this parameter to the proper hostname. So captured Ubuntu images will not register their correct DNS name with the DHCP server.

In the Ubuntu images this behavior is not necessary since dhclient is already configured to send its hostname to the DHCP server. This patch makes the agent a bit smarter about this and leaves dhclient.conf alone if it sees that it is already configured to send it's current hostname to the DHCP server.

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Moving bug from private to public.

information type: Proprietary → Public
affects: lansing → walinuxagent (Ubuntu)
Changed in walinuxagent (Ubuntu):
assignee: nobody → Ben Howard (utlemming)
importance: Undecided → Medium
milestone: none → ubuntu-14.04-beta-2
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in walinuxagent (Ubuntu):
status: New → Confirmed
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Due to the EOL for Ubuntu 13.04 on January 27th, I am only going to SRU this back to 12.04 and 13.10.

Changed in walinuxagent (Ubuntu Saucy):
assignee: nobody → Ben Howard (utlemming)
Changed in walinuxagent (Ubuntu Precise):
assignee: nobody → Ben Howard (utlemming)
Changed in walinuxagent (Ubuntu Saucy):
milestone: none → saucy-updates
Changed in walinuxagent (Ubuntu Precise):
milestone: none → precise-updates
status: New → In Progress
Changed in walinuxagent (Ubuntu Saucy):
status: New → In Progress
Changed in walinuxagent (Ubuntu Trusty):
status: Confirmed → In Progress
Changed in walinuxagent (Ubuntu Precise):
importance: Undecided → Medium
Changed in walinuxagent (Ubuntu Saucy):
importance: Undecided → Medium
description: updated
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Uploaded Trusty version. However due to Bug #1269626 machines will not provision correclty upon reboot. The fix for Bug #1269626 and this will be SRU'd together.

Changed in walinuxagent (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package walinuxagent - 1.3.2-0ubuntu8

---------------
walinuxagent (1.3.2-0ubuntu8) trusty; urgency=low

  * debian/patches/idns_dhcp.patch: only change send-hostname in
    dhcpclient.conf when send-hostname is already in the config
    (LP: #1268050).
 -- Ben Howard <email address hidden> Wed, 15 Jan 2014 13:02:30 -0700

Changed in walinuxagent (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Dave Walker (davewalker) wrote : Please test proposed package

Hello Stephen, or anyone else affected,

Accepted walinuxagent into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/walinuxagent/1.3.2-0ubuntu6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in walinuxagent (Ubuntu Saucy):
status: In Progress → Fix Committed
Changed in walinuxagent (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-done
tags: added: verification-needed
removed: verification-done
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Fix tested and verified. Marking as verification-done.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package walinuxagent - 1.3.2-0ubuntu4~12.04.6

---------------
walinuxagent (1.3.2-0ubuntu4~12.04.6) precise; urgency=low

  * Fixes for (LP: #1268050):
    - Change /etc/dhcp/dhclient.conf 'send host-name' during post-inst to
      fix snapshotting instances sending wrong hostname via DHCP to fabric.
    - Backport of send-hostname fix from 1.4.1 per MS request.
 -- Ben Howard <email address hidden> Wed, 19 Mar 2014 07:14:02 -0600

Changed in walinuxagent (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of the Stable Release Update for walinuxagent has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package walinuxagent - 1.3.2-0ubuntu6

---------------
walinuxagent (1.3.2-0ubuntu6) saucy; urgency=low

  * Fixes for (LP: #1268050):
    - Change /etc/dhcp/dhclient.conf 'send host-name' during post-inst to
      fix snapshotting instances.
    - Backport of send-hostname fix from 1.4.1 per MS request.
 -- Ben Howard <email address hidden> Wed, 19 Mar 2014 16:58:58 -0600

Changed in walinuxagent (Ubuntu Saucy):
status: Fix Committed → Fix Released
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

For 12.04, the fix introduced a regression. The version of isc-dhcp-client in 12.04 does not support the "gethostname()" call, and therefore is invalid. Filed bug #1308974, with patch to revert the changes and submitted it as an SRU.

tags: added: regression-update
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.