7150578 install discovery ignores device path lun numbers S11U1Build17
authorJesse Butler <jesse.butler@oracle.com>
Mon, 21 May 2012 13:15:52 -0600
changeset 1682 c992a85ed3d0
parent 1681 c1f54cfadbac
child 1683 a2bfe9887c9e
7150578 install discovery ignores device path lun numbers 7170026 diskmgt.py has a typo
usr/src/lib/install_target/discovery.py
usr/src/lib/install_target/libdiskmgt/diskmgt.py
--- a/usr/src/lib/install_target/discovery.py	Fri May 18 08:18:06 2012 -0700
+++ b/usr/src/lib/install_target/discovery.py	Mon May 21 13:15:52 2012 -0600
@@ -168,23 +168,16 @@
             self.logger.debug("disk '%s' is offline" % new_disk.name)
             return None
 
-        # set attributes for the disk
-        new_disk.wwn = getattr(drive.aliases[0].attributes, "wwn", None)
-
-        existing_wwns = [d.wwn for d in \
-                         self.root.get_descendants(class_type=Disk) \
-                         if d.wwn is not None]
-
-        if new_disk.wwn is not None and new_disk.wwn in existing_wwns:
-            # this wwn has already been discovered, so skip further discovery
-            return None
+        # set the wwn string, including lun if available
+        wwn = getattr(drive.aliases[0].attributes, "wwn", None)
+        if wwn is not None:
+            lun = getattr(drive.aliases[0].attributes, "lun", None)
+            if lun is not None:
+                new_disk.wwn = "%s,%d" % (wwn, lun)
+            else:
+                new_disk.wwn = wwn
 
         for alias in drive.aliases:
-            # check to see if the wwn changes between drive aliases
-            if getattr(alias.attributes, "wwn", None) != new_disk.wwn:
-                self.logger.warning("disk '%s' has different wwn for the "
-                                    "aliases" % new_disk.ctd)
-                return None
             if drive_media is not None:
                 if self.verify_disk_read(alias.name,
                                          drive_media.attributes.blocksize):
--- a/usr/src/lib/install_target/libdiskmgt/diskmgt.py	Fri May 18 08:18:06 2012 -0700
+++ b/usr/src/lib/install_target/libdiskmgt/diskmgt.py	Mon May 21 13:15:52 2012 -0600
@@ -459,7 +459,7 @@
     ATYPE = DMPathAttr
 
     @property
-    def conroller(self):
+    def controller(self):
         """controller or None associated with this path"""
         try:
             return self.get_associated_descriptors(const.CONTROLLER)[0]