Non-WAN port filter issue in Kaminario iSCSI driver
To attach Kaminario iSCSI volume to a nova instance, we search K2 API "system/net_ips" with filter wan_port="". But it is not able to filter non-WAN ports. Change-Id: If58cf5b9bdc13f72313aba68e54af6ec2f907703 Closes-Bug: #1646692 Co-Authored-By: Lakshman<Lakshmi.Narayana.ctr@kaminario.com> Co-Authored-By: Ido Benda<Ido.Benda@kaminario.com>
This commit is contained in:
parent
8e5912cb51
commit
e8fb59908b
@ -60,6 +60,7 @@ class FakeSaveObject(FakeK2Obj):
|
|||||||
self.current_role = 'target'
|
self.current_role = 'target'
|
||||||
self.current_snapshot_progress = 100
|
self.current_snapshot_progress = 100
|
||||||
self.current_snapshot_id = None
|
self.current_snapshot_id = None
|
||||||
|
self.wan_port = None
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
return
|
return
|
||||||
|
@ -93,10 +93,13 @@ class KaminarioISCSIDriver(common.KaminarioCinderDriver):
|
|||||||
|
|
||||||
def get_target_info(self, volume):
|
def get_target_info(self, volume):
|
||||||
LOG.debug("Searching first iscsi port ip without wan in K2.")
|
LOG.debug("Searching first iscsi port ip without wan in K2.")
|
||||||
iscsi_ip_rs = self.client.search("system/net_ips", wan_port="")
|
iscsi_ip_rs = self.client.search("system/net_ips")
|
||||||
iscsi_ip = target_iqn = None
|
iscsi_ip = target_iqn = None
|
||||||
if hasattr(iscsi_ip_rs, 'hits') and iscsi_ip_rs.total != 0:
|
if hasattr(iscsi_ip_rs, 'hits') and iscsi_ip_rs.total != 0:
|
||||||
iscsi_ip = iscsi_ip_rs.hits[0].ip_address
|
for ip in iscsi_ip_rs.hits:
|
||||||
|
if not ip.wan_port:
|
||||||
|
iscsi_ip = ip.ip_address
|
||||||
|
break
|
||||||
if not iscsi_ip:
|
if not iscsi_ip:
|
||||||
msg = _("Unable to get ISCSI IP address from K2.")
|
msg = _("Unable to get ISCSI IP address from K2.")
|
||||||
LOG.error(msg)
|
LOG.error(msg)
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- Fixed Non-WAN port filter issue in Kaminario iSCSI driver
|
||||||
|
|
Loading…
Reference in New Issue
Block a user