[SRU] Azure data source should auto-detect ephemeral disk location

Bug #1411582 reported by Dan Watkins
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Undecided
Dan Watkins
cloud-init (Ubuntu)
Fix Released
Medium
Dan Watkins
Precise
Fix Released
Undecided
Dan Watkins
Trusty
Fix Released
Undecided
Dan Watkins
Utopic
Invalid
Undecided
Unassigned
Vivid
Fix Released
Medium
Dan Watkins
walinuxagent (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned
Utopic
Fix Released
Undecided
Unassigned
Vivid
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
The Azure ephemeral disk will not necessarily remain at the same /dev/sd* location between reboots. This means the drive may not be persistently mounted between reboots.

[Test Case]
1) Boot an Azure instance with a cloud-init including this fix.
2) Ensure that the ephemeral disk is mounted at /mnt and formatted as ext4
3) Ensure that /etc/fstab refers to a /dev/disk/... symlink, rather than a /dev/sd* device.

[Regression Potential]
We now use a udev rule to discover the location of the disk; we have been assured by Microsoft that this rule will always work, so regression potential is minimal.

[Original Report]
Currently we assume it will be /dev/sdb, but this may change. There is an example of how to handle this in the Azure Linux agent.

To quote stevez in a comment on bug 1410835:

Device names are not persistent in Linux and could change, so it is not guaranteed that the ephemeral disk will be called /dev/sdb. Ideally this should be auto-detected in cloud-init at runtime (for example, see DeviceForIdePort() in the Azure Linux agent).

Related branches

Revision history for this message
Stephen A. Zarkos (stevez) wrote :

This looks like the correct problem statement - the SCSI layer schedules these tasks and so subtle timings could cause disk names to change. This is also we recommend UUIDs or labels or similar to be used in fstab.

The logic for DeviceForIdePort() is based on the fact that our vmbus driver at least knows the order of the disks (IDE or SCSI) that are attached on the Host side. And on Azure, the first IDE disk is always the OS disk, and the second is always the ephemeral disk. That is known and must be the case for all VMs.

So in the agent, DeviceForIdePort()[0] always returns the OS disk, and DeviceForIdePort()[1] always returns the ephemeral disk. Ideally cloud-init should use a similar method to auto-detect the ephemeral disk and update fstab if needed.

Thanks!

Changed in cloud-init (Ubuntu):
assignee: nobody → Ben Howard (utlemming)
importance: Undecided → Medium
Changed in walinuxagent (Ubuntu):
assignee: nobody → Ben Howard (utlemming)
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

The fix for this is three pronged:

1) create a udev rule that identifies the ephemeral disk correctly, i.e. /dev/disk/azure/resource. I've worked out a set of udev rules that work well for this function.

2) teach cloud-init to use this device

3) communicate to users to use the new device

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

This bug was fixed in the package walinuxagent - 2.0.8-0ubuntu7

---------------
walinuxagent (2.0.8-0ubuntu7) vivid; urgency=medium

  * Added /lib/udev/rules.d/66-azure-storage.rules: create symlinks for
    /dev/disk/azure/{root,resource} to correctly identify disks
    (LP: #1411582).
 -- Ben Howard <email address hidden> Mon, 09 Mar 2015 06:26:48 -0600

Changed in walinuxagent (Ubuntu Vivid):
status: New → Fix Released
John Agosta (jagosta)
tags: added: cpc-current-milestone
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package walinuxagent - 2.0.12-0ubuntu2~14.04.0

---------------
walinuxagent (2.0.12-0ubuntu2~14.04.0) trusty; urgency=medium

  * Backport from Ubuntu 15.04 (LP: #1442392):
    - Support page blob for status blob
    - Fix extension status on disable success
    - Update shared config handler
 -- Ben Howard <email address hidden> Thu, 16 Apr 2015 11:53:56 -0600

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

This bug was fixed in the package walinuxagent - 2.0.12-0ubuntu2~14.10.0

---------------
walinuxagent (2.0.12-0ubuntu2~14.10.0) utopic; urgency=medium

  * Backport from Ubuntu 15.04 (LP: #1442392):
    - Support page blob for status blob
    - Fix extension status on disable success
    - Update shared config handler
 -- Ben Howard <email address hidden> Thu, 16 Apr 2015 11:53:56 -0600

Changed in walinuxagent (Ubuntu Utopic):
status: New → Fix Released
Changed in cloud-init (Ubuntu):
assignee: Ben Howard (utlemming) → Dan Watkins (daniel-thewatkins)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package walinuxagent - 2.0.13-0ubuntu2~12.04.0

---------------
walinuxagent (2.0.13-0ubuntu2~12.04.0) precise; urgency=medium

  * Backport to 12.04 (LP: #1449369).

 -- Ben Howard <email address hidden> Fri, 03 Jul 2015 12:27:56 -0600

Changed in walinuxagent (Ubuntu Precise):
status: New → Fix Released
Dan Watkins (oddbloke)
Changed in cloud-init:
status: New → In Progress
assignee: nobody → Dan Watkins (daniel-thewatkins)
Changed in cloud-init (Ubuntu Vivid):
assignee: Ben Howard (utlemming) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.7~bzr1127-0ubuntu1

---------------
cloud-init (0.7.7~bzr1127-0ubuntu1) wily; urgency=medium

  [ Scott Moser ]
  * d/README.source, debian/cherry-pick-rev: improve packaging tool

  [ Daniel Watkins ]
  * d/cloud-init.templates: Include SmartOS data source in the default list
    and choices. (LP: #1398997)

  [ Scott Moser ]
  * New upstream snapshot.
    * check for systemd using sd_booted symantics (LP: #1461201)
    * fix importing of gpg keys in python3 (LP: #1463373)
    * fix specification of devices to growpart (LP: #1465436)
    * reliably detect and use Azure disks using udev rules (LP: #1411582)
    * support selection of Ubuntu mirrors on GCE (LP: #1470890)
    * ssh: generate ed25519 host keys if supported (LP: #1461242)
    * test fixes and cleanups
    * fix reading of availability-zone on GCE (LP: #1470880)
    * fix cloudsigma datasource with python3 (LP: #1475215)
    * fix rightscale user-data
    * fix consumption of CloudStack passwords on newer CloudStack platforms
      (LP: #1440263, #1464253)

 -- Scott Moser <email address hidden> Wed, 22 Jul 2015 17:06:18 -0400

Changed in cloud-init (Ubuntu):
status: New → Fix Released
Revision history for this message
Dan Watkins (oddbloke) wrote :

utopic is EOL.

Changed in cloud-init (Ubuntu Precise):
assignee: nobody → Dan Watkins (daniel-thewatkins)
status: New → In Progress
Changed in cloud-init (Ubuntu Utopic):
status: New → Invalid
Changed in cloud-init (Ubuntu Trusty):
assignee: nobody → Dan Watkins (daniel-thewatkins)
status: New → In Progress
Changed in cloud-init (Ubuntu Vivid):
assignee: nobody → Dan Watkins (daniel-thewatkins)
status: New → In Progress
Dan Watkins (oddbloke)
summary: - Azure data source should auto-detect ephemeral disk location
+ [SRU] Azure data source should auto-detect ephemeral disk location
description: updated
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Dan, or anyone else affected,

Accepted cloud-init into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.7~bzr1091-0ubuntu5 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 cloud-init (Ubuntu Vivid):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in cloud-init (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Dan, or anyone else affected,

Accepted cloud-init into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.5-0ubuntu1.8 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 cloud-init (Ubuntu Precise):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Dan, or anyone else affected,

Accepted cloud-init into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.6.3-0ubuntu1.19 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!

Revision history for this message
Dan Watkins (oddbloke) wrote :

Confirmed fixed on precise; trusty and vivid images are still building (or queued for building).

Revision history for this message
Dan Watkins (oddbloke) wrote : Re: [Bug 1411582] Re: [SRU] Azure data source should auto-detect ephemeral disk location

Confirmed fixed on trusty; the vivid image build failed for unrelated
reasons, which I'm addressing.

Revision history for this message
Dan Watkins (oddbloke) wrote :

Verified on vivid; marked as verification-done.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for cloud-init 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 regressions.

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

This bug was fixed in the package cloud-init - 0.7.5-0ubuntu1.8

---------------
cloud-init (0.7.5-0ubuntu1.8) trusty; urgency=medium

  * debian/patches/lp-1411582-azure-udev-ephemeral-disks.patch:
      - Use udev rules to discover ephemeral disk locations rather than
        hard-coded device names (LP: #1411582).
  * debian/patches/lp-1470880-fix-gce-az-determination.patch:
      - Correctly parse GCE's availability zones (LP: #1470880).
  * d/patches/lp-1470890-include-regions-in-dynamic-mirror-discovery.patch:
      - Make %(region)s a valid substitution in mirror discovery
        (LP: #1470890).
  * Remove python-serial from Build-Depends; it was mistakenly added last
    upload.

 -- Daniel Watkins <email address hidden> Fri, 14 Aug 2015 13:54:02 +0100

Changed in cloud-init (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.7~bzr1091-0ubuntu5

---------------
cloud-init (0.7.7~bzr1091-0ubuntu5) vivid; urgency=medium

  * d/patches/lp-1411582-azure-udev-ephemeral-disks.patch:
      - Use udev rules to discover ephemeral disk locations rather than
        hard-coded device names (LP: #1411582).
  * d/patches/lp-1470880-fix-gce-az-determination.patch:
      - Correctly parse GCE's availability zones (LP: #1470880).
  * d/patches/lp-1470890-include-regions-in-dynamic-mirror-discovery.patch:
      - Make %(region)s a valid substitution in mirror discovery
        (LP: #1470890).

 -- Daniel Watkins <email address hidden> Fri, 14 Aug 2015 13:50:32 +0100

Changed in cloud-init (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.6.3-0ubuntu1.19

---------------
cloud-init (0.6.3-0ubuntu1.19) precise; urgency=medium

  * debian/patches/lp-1411582-azure-udev-ephemeral-disks.patch:
      - Use udev rules to discover ephemeral disk locations rather than
        hard-coded device names (LP: #1411582).
  * debian/patches/lp-1470880-fix-gce-az-determination.patch:
      - Correctly parse GCE's availability zones (LP: #1470880).
  * d/patches/lp-1470890-include-regions-in-dynamic-mirror-discovery.patch:
      - Make %(region)s a valid substitution in mirror discovery
        (LP: #1470890).

 -- Daniel Watkins <email address hidden> Fri, 14 Aug 2015 14:38:48 +0100

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

Calling this fix released.

Changed in cloud-init:
status: In Progress → Fix Released
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.