diff -Nru cloud-utils-0.25/debian/changelog cloud-utils-0.25/debian/changelog --- cloud-utils-0.25/debian/changelog 2012-02-22 20:52:16.000000000 +0000 +++ cloud-utils-0.25/debian/changelog 2012-02-28 19:40:54.000000000 +0000 @@ -1,3 +1,10 @@ +cloud-utils (0.25-0ubuntu4) precise; urgency=low + + * growpart: invoke sfdisk with '--no-reread' to avoid udev race + conditions (LP: #937352) + + -- Scott Moser Tue, 28 Feb 2012 14:40:51 -0500 + cloud-utils (0.25-0ubuntu3) precise; urgency=low * growpart: allow output of failed sfdisk to get to user diff -Nru cloud-utils-0.25/debian/patches/growpart-use-sfdisk-no-reread.patch cloud-utils-0.25/debian/patches/growpart-use-sfdisk-no-reread.patch --- cloud-utils-0.25/debian/patches/growpart-use-sfdisk-no-reread.patch 1970-01-01 00:00:00.000000000 +0000 +++ cloud-utils-0.25/debian/patches/growpart-use-sfdisk-no-reread.patch 2012-02-28 19:38:41.000000000 +0000 @@ -0,0 +1,33 @@ +------------------------------------------------------------ +revno: 171 +fixes bug: https://launchpad.net/bugs/937352 +committer: Scott Moser +branch nick: trunk +timestamp: Tue 2012-02-28 13:35:56 -0500 +message: + growpart: use 'sfdisk --no-reread' + + sfdisk without --no-reread is basically a race condition waiting to happen. + See bug 942788 for more information. +diff: +=== modified file 'bin/growpart' +--- a/bin/growpart 2012-02-22 20:38:35 +0000 ++++ b/bin/growpart 2012-02-28 18:35:56 +0000 +@@ -29,7 +29,7 @@ + cleanup() { + if [ -n "${RESTORE_FROM}" ]; then + error "***** WARNING: Resize failed, attempting to revert ******" +- if sfdisk "${DISK}" ${CHS} -I "${RESTORE_FROM}"; then ++ if sfdisk --no-reread "${DISK}" ${CHS} -I "${RESTORE_FROM}"; then + error "***** Appears to have gone OK ****" + else + error "***** FAILED! or original partition table looked like: ****" +@@ -180,7 +180,7 @@ + exit 0 + fi + +-sfdisk "${disk}" ${CHS} --force -O "${orig_bin}" \ ++sfdisk --no-reread "${disk}" ${CHS} --force -O "${orig_bin}" \ + < "${new_out}" > "${change_out}" 2>&1 || { + DISK=${disk}; RESTORE_FROM="${orig_bin}"; + error "attempt to resize ${disk} failed. sfdisk output below:" diff -Nru cloud-utils-0.25/debian/patches/series cloud-utils-0.25/debian/patches/series --- cloud-utils-0.25/debian/patches/series 2012-02-22 20:45:54.000000000 +0000 +++ cloud-utils-0.25/debian/patches/series 2012-02-28 19:39:22.000000000 +0000 @@ -1,2 +1,3 @@ fix-publish-image-ramdisk-none.patch growpart-show-sfdisk-error-output.patch +growpart-use-sfdisk-no-reread.patch