[node-patches] Change in ovirt-node[ovirt-3.5]: Don't match cdroms on any bus

fabiand at redhat.com fabiand at redhat.com
Wed Nov 26 11:32:22 UTC 2014


Hello Ryan Barry,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/35594

to review the following change.

Change subject: Don't match cdroms on any bus
......................................................................

Don't match cdroms on any bus

We can't install on cdroms. If ID_CDROM is 1, skip that device.
Otherwise, PXE booted systems with (storage|ovirt)_init specified
and no other specifiers may pick a CDROM, as it shows up on the
ata bus as a disk. Be more specific.

Change-Id: I0e7d39e36027addd8612f2768939c7e4f0766e7e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1163688
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M dracut/ovirt-boot-functions
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/94/35594/1

diff --git a/dracut/ovirt-boot-functions b/dracut/ovirt-boot-functions
index 26ef702..573f1a1 100644
--- a/dracut/ovirt-boot-functions
+++ b/dracut/ovirt-boot-functions
@@ -50,9 +50,12 @@
     # so manually enumerate them
     for d in $(ls /dev/disk/by-id/$bus* 2>/dev/null); do
         DEVTYPE=
+        ID_BUS=
+        ID_CDROM=
         eval $(udev_info $(readlink -f $d) property "--export")
         # ID_FS_USAGE is set for partitions
-        if [ "$DEVTYPE" = "disk" -a "$ID_BUS" = "$bus" ]; then
+        if [ "$DEVTYPE" = "disk" -a "$ID_BUS" = "$bus" -a \
+                "$ID_CDROM" != "1"]; then
             if [ -z "$serial" -o "$serial" = "ALL" \
                 -o "$ID_SERIAL" = "$serial" ]; then
                 local dev="$(readlink -e $d)"


-- 
To view, visit http://gerrit.ovirt.org/35594
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e7d39e36027addd8612f2768939c7e4f0766e7e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list