Files
raghavendrat 255ccd6c6c HPE 3par: Ignore duplicate IP in iSCSI/vlan ip
As seen in output of showport command below, there is possibility
of same ip address (172.28.50.151) being used for trunk iSCSI ip
and vlan ip.

s0452 cli% showport -iscsi
N:S:P State IPAddr         Netmask/PrefixLen Gateway TPGT . . .
0:4:2 ready 172.28.50.151  255.255.0.0       0.0.0.0   42 . . .
---------------------------------------------------------
1
s0452 cli%
s0452 cli% showport -iscsivlans
N:S:P     VLAN IPAddr        Netmask/PrefixLen Gateway . . .
0:4:2 untagged 172.28.50.151 255.255.0.0       0.0.0.0 . . .
-            5 172.28.50.240 255.255.0.0       0.0.0.0 . . .
------------------------------------------------------
2
s0452 cli%

This patch checks for duplicate IP and ignores them;
thus avoiding multiple calls (to create lun) for same IP.

Why this change is needed:
Below is the use case.

1. initialize connection function is invoked.
2. using trunk iSCSI ip 172.28.50.151, create lun invoked.
3. With vlan ip 172.28.50.151, it again tries to create lun.
4. And this fails because LUN is already created (with same ip)
in step 2.

Extract from cinder-volume log:
Driver initialize connection failed (error: Conflict (HTTP 409)
18 - LUN exists).

Solution:
While processing vlan ip, check if its same as iSCSI ip.
If so, skip the lun creation.

Closes-Bug: #2112433
Change-Id: I582c27d8d8a8e22d03b2d68152cb467a6db606bc
2025-06-04 03:25:16 +00:00
..
2025-04-11 20:44:27 +00:00