← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~gpadgett/cloud-init/dev-sr-fix into lp:cloud-init

 

Greg Padgett has proposed merging lp:~gpadgett/cloud-init/dev-sr-fix into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~gpadgett/cloud-init/dev-sr-fix/+merge/167437

Optical drives may show up in RHEL systems as /dev/sr1; this extends a prior fix to handle that use case.  It's applicable to systems with 2.6 kernels where blkid needs a little prodding.

I haven't seen evidence that /dev/sr2 is common, but in the spirit of this patch we can go as far as needed to avoid surprises.
-- 
https://code.launchpad.net/~gpadgett/cloud-init/dev-sr-fix/+merge/167437
Your team cloud init development team is requested to review the proposed merge of lp:~gpadgett/cloud-init/dev-sr-fix into lp:cloud-init.
=== modified file 'cloudinit/sources/DataSourceConfigDrive.py'
--- cloudinit/sources/DataSourceConfigDrive.py	2013-03-26 21:48:40 +0000
+++ cloudinit/sources/DataSourceConfigDrive.py	2013-06-05 01:34:28 +0000
@@ -260,6 +260,7 @@
 
     # Query optical drive to get it in blkid cache for 2.6 kernels
     util.find_devs_with(path="/dev/sr0")
+    util.find_devs_with(path="/dev/sr1")
 
     by_fstype = (util.find_devs_with("TYPE=vfat") +
                  util.find_devs_with("TYPE=iso9660"))

=== modified file 'cloudinit/sources/DataSourceNoCloud.py'
--- cloudinit/sources/DataSourceNoCloud.py	2013-03-26 21:48:40 +0000
+++ cloudinit/sources/DataSourceNoCloud.py	2013-06-05 01:34:28 +0000
@@ -89,6 +89,7 @@
         if label is not None:
             # Query optical drive to get it in blkid cache for 2.6 kernels
             util.find_devs_with(path="/dev/sr0")
+            util.find_devs_with(path="/dev/sr1")
 
             fslist = util.find_devs_with("TYPE=vfat")
             fslist.extend(util.find_devs_with("TYPE=iso9660"))


Follow ups