[PATCH rhel6-branch others] Use ID_SERIAL_RAW for multipath, if available (#626842).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 storage/devices.py |    5 ++---
 storage/udev.py    |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 82a46f8..81960ec 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -3139,8 +3139,7 @@ class MultipathDevice(DMDevice):
         
             May be overridden by a sub-class for e.g. RDAC handling.
         """
-        self._identity_short = self._info['ID_SERIAL_SHORT']
-        self._identity = self._info['ID_SERIAL']
+        self._identity = self._info.get("ID_SERIAL_RAW", self._info.get("ID_SERIAL_SHORT"))
 
     @property
     def identity(self):
@@ -3154,7 +3153,7 @@ class MultipathDevice(DMDevice):
 
     @property
     def wwid(self):
-        identity = self._identity_short
+        identity = self.identity
         ret = []
         while identity:
             ret.append(identity[:2])
diff --git a/storage/udev.py b/storage/udev.py
index 62ef214..42a3f64 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -267,7 +267,7 @@ def udev_device_is_partition(info):
 
 def udev_device_get_serial(udev_info):
     """ Get the serial number/UUID from the device as reported by udev. """
-    return udev_info.get("ID_SERIAL_SHORT", udev_info.get("ID_SERIAL"))
+    return udev_info.get("ID_SERIAL_RAW", udev_info.get("ID_SERIAL_SHORT", udev_info.get("ID_SERIAL")))
 
 def udev_device_get_wwid(udev_info):
     """ The WWID of a device is typically just its serial number, but with
-- 
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux