Public bug reported:

1. As for SAN storage has not only one iqn. so, one multipath device will have 
not only one iqn.
2、the function as follow:
def _get_multipath_iqn(self, multipath_device):
        entries = self._get_iscsi_devices()
        for entry in entries:
            entry_real_path = os.path.realpath("/dev/disk/by-path/%s" % entry)
            entry_multipath = self._get_multipath_device_name(entry_real_path)
            if entry_multipath == multipath_device:
                return entry.split("iscsi-")[1].split("-lun")[0]
        return None
so, if the multipath_device match one device, will return. but return only one 
iqn. 
but the issue is the multipath_device will contain several single device. as 
following:

[root@R4300G2-ctrl02 ~]# ll /dev/disk/by-path/
lrwxrwxrwx 1 root root  9 Jun 30 14:45 
ip-172.12.1.1:3260-iscsi-iqn.2099-01.cn.com.zte:usp.spr-a0:c0:00:00:00:53-lun-1 
-> ../../sds
lrwxrwxrwx 1 root root  9 Jun 30 14:45 
ip-172.12.2.1:3260-iscsi-iqn.2099-01.cn.com.zte:usp.spr-a0:c0:00:00:00:53-lun-1 
-> ../../sdl
lrwxrwxrwx 1 root root  9 Jun 30 14:45 
ip-172.12.1.2:3260-iscsi-iqn.2099-01.cn.com.zte:usp.spr-4c:09:b4:00:00:00-lun-1 
-> ../../sdo
lrwxrwxrwx 1 root root  9 Jun 30 14:45 
ip-172.12.2.2:3260-iscsi-iqn.2099-01.cn.com.zte:usp.spr-4c:09:b4:00:00:00-lun-1 
-> ../../sdm
so the device have two different 
iqns.(-iqn.2099-01.cn.com.zte:usp.spr-4c:09:b4:00:00:00, 
iqn.2099-01.cn.com.zte:usp.spr-a0:c0:00:00:00:53)

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1470093

Title:
  The function "_get_multipath_iqn" get iqn is not complete

Status in OpenStack Compute (Nova):
  New

Bug description:
  1. As for SAN storage has not only one iqn. so, one multipath device will 
have not only one iqn.
  2、the function as follow:
  def _get_multipath_iqn(self, multipath_device):
          entries = self._get_iscsi_devices()
          for entry in entries:
              entry_real_path = os.path.realpath("/dev/disk/by-path/%s" % entry)
              entry_multipath = self._get_multipath_device_name(entry_real_path)
              if entry_multipath == multipath_device:
                  return entry.split("iscsi-")[1].split("-lun")[0]
          return None
  so, if the multipath_device match one device, will return. but return only 
one iqn. 
  but the issue is the multipath_device will contain several single device. as 
following:

  [root@R4300G2-ctrl02 ~]# ll /dev/disk/by-path/
  lrwxrwxrwx 1 root root  9 Jun 30 14:45 
ip-172.12.1.1:3260-iscsi-iqn.2099-01.cn.com.zte:usp.spr-a0:c0:00:00:00:53-lun-1 
-> ../../sds
  lrwxrwxrwx 1 root root  9 Jun 30 14:45 
ip-172.12.2.1:3260-iscsi-iqn.2099-01.cn.com.zte:usp.spr-a0:c0:00:00:00:53-lun-1 
-> ../../sdl
  lrwxrwxrwx 1 root root  9 Jun 30 14:45 
ip-172.12.1.2:3260-iscsi-iqn.2099-01.cn.com.zte:usp.spr-4c:09:b4:00:00:00-lun-1 
-> ../../sdo
  lrwxrwxrwx 1 root root  9 Jun 30 14:45 
ip-172.12.2.2:3260-iscsi-iqn.2099-01.cn.com.zte:usp.spr-4c:09:b4:00:00:00-lun-1 
-> ../../sdm
  so the device have two different 
iqns.(-iqn.2099-01.cn.com.zte:usp.spr-4c:09:b4:00:00:00, 
iqn.2099-01.cn.com.zte:usp.spr-a0:c0:00:00:00:53)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1470093/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to