Merge lp:~brightbox/ubuntu/natty/cloud-initramfs-tools/fix-765843 into lp:ubuntu/natty/cloud-initramfs-tools

Proposed by Neil Wilson
Status: Merged
Merge reported by: Scott Moser
Merged at revision: not available
Proposed branch: lp:~brightbox/ubuntu/natty/cloud-initramfs-tools/fix-765843
Merge into: lp:ubuntu/natty/cloud-initramfs-tools
Diff against target: 19 lines (+5/-3)
1 file modified
growroot/scripts/local-bottom/growroot (+5/-3)
To merge this branch: bzr merge lp:~brightbox/ubuntu/natty/cloud-initramfs-tools/fix-765843
Reviewer Review Type Date Requested Status
Scott Moser Pending
Review via email: mp+58675@code.launchpad.net

Description of the change

Fixes the race condition in 'growroot' by replacing the 'wait-for-root' guard with 'udevadm settle'.

To post a comment you must log in.
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Marking as work in progress, since this is not ready for merge into lp:ubuntu/natty/cloud-initramfs-tools. That will require an SRU-friendly changelog update, and will require the fix that was merged into Scott's tree to land in Oneiric.

Revision history for this message
Scott Moser (smoser) wrote :

I've marked this as "merged" as it has been merged into
lp:~cloud-init-dev/ubuntu/oneiric/cloud-initramfs-tools/oneiric (the "upstream" packaging branch)

And I have proposed that for merging into lp:ubuntu/oneiric/cloud-initramfs-tools.
https://code.launchpad.net/~cloud-init-dev/ubuntu/oneiric/cloud-initramfs-tools/oneiric/+merge/63862

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'growroot/scripts/local-bottom/growroot'
2--- growroot/scripts/local-bottom/growroot 2011-02-25 12:44:03 +0000
3+++ growroot/scripts/local-bottom/growroot 2011-04-21 14:03:27 +0000
4@@ -65,11 +65,13 @@
5 sfdisk -R "${rootdisk}" ||
6 msg "failed to re-read partition for ${rootdisk}"
7
8-# this is taken from 'mountroot' function
9-# see /usr/share/initramfs-tools/scripts/local
10-FSTYPE=$(wait-for-root "${ROOT}" ${ROOTDELAY:-30})
11 roflag="-r"
12 [ "${readonly}" = "y" ] || roflag="-w"
13+
14+# Wait for the partition re-read events to complete
15+# so that the root partition is available when we try and mount it.
16+udevadm settle --timeout ${ROOTDELAY:-30}
17+
18 mount ${roflag} ${FSTYPE:+-t ${FSTYPE} }${ROOTFLAGS} ${ROOT} ${rootmnt} ||
19 fail "failed to re-mount ${ROOT}. this is bad!"
20

Subscribers

People subscribed via source and target branches

to all changes: