Can't send PATCH request to Target with PODM API to set InitiatorIQN

Bug #1682240 reported by Newell Jensen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS RSD
Invalid
Critical
Priyank Durugkar
Intel-rsd
Confirmed
High
Priyank Durugkar

Bug Description

When Allocating a node with remote storage there isn't a way to set the InitiatorIQN for the Target. It defaults to "ALL", which is causing a mismatch with the target Portal IPs. This is blocking MAAS from being able to deploy a remote target.

The node's remote storage target is:

root@maas-dev:~# curl -s -k -u admin:admin -X GET https://10.3.0.1:8443/redfish/v1/Services/18/Targets/83
{
  "@odata.context" : "/redfish/v1/$metadata#Services/Members/18/RemoteTargets/Members/$entity",
  "@odata.id" : "/redfish/v1/Services/18/Targets/83",
  "@odata.type" : "#RemoteTarget.1.0.0.RemoteTarget",
  "Id" : "83",
  "Name" : "iSCSI Remote Target",
  "Description" : "iSCSI Remote Target description",
  "Status" : {
    "State" : "Enabled",
    "Health" : "OK",
    "HealthRollup" : "OK"
  },
  "Type" : null,
  "Addresses" : [ {
    "iSCSI" : {
      "TargetLUN" : [ {
        "LUN" : 1,
        "LogicalDrive" : {
          "@odata.id" : "/redfish/v1/Services/18/LogicalDrives/347"
        }
      } ],
      "TargetIQN" : "iqn.io.maas:newell-test-1",
      "TargetPortalIP" : "10.1.0.100",
      "TargetPortalPort" : 3260
    }
  } ],
  "Initiator" : [ {
    "iSCSI" : {
      "InitiatorIQN" : "ALL"
    }
  } ],
  "Oem" : { },
  "Links" : {
    "Oem" : { }
  }

  "@odata.context" : "/redfish/v1/$metadata#Services/Members/18/RemoteTargets/Members/$entity",
  "@odata.id" : "/redfish/v1/Services/18/Targets/83",
  "@odata.type" : "#RemoteTarget.1.0.0.RemoteTarget",
  "Id" : "83",
  "Name" : "iSCSI Remote Target",
  "Description" : "iSCSI Remote Target description",
  "Status" : {
    "State" : "Enabled",
    "Health" : "OK",
    "HealthRollup" : "OK"
  },
  "Type" : null,
  "Addresses" : [ {
    "iSCSI" : {
      "TargetLUN" : [ {
        "LUN" : 1,
        "LogicalDrive" : {
          "@odata.id" : "/redfish/v1/Services/18/LogicalDrives/347"
        }
      } ],
      "TargetIQN" : "iqn.io.maas:newell-test-1",
      "TargetPortalIP" : "10.1.0.100",
      "TargetPortalPort" : 3260
    }
  } ],
  "Initiator" : [ {
    "iSCSI" : {
      "InitiatorIQN" : "ALL"
    }
  } ],
  "Oem" : { },
  "Links" : {
    "Oem" : { }
  }

When SSH'ing into the node after commissioning we see that the target is iqn.blvt2 instead of the expected iqn.io.maas:newell-test-1:

ubuntu@Newell-iSCSI-1:~$ sudo iscsiadm --mode discovery --op update --type sendtargets --portal 10.1.0.100
10.1.0.100:3260,1 iqn.blvt2

This is blocking nodes with remote storage from being deployed.

description: updated
Changed in maasrsd:
assignee: nobody → Priyank Durugkar (priyankd)
Revision history for this message
Tomasz Bykowski (tomaszbykowski) wrote :

Hi Newell,

PODM by default sets "ALL" as InitiatorIQN for iSCSI Targets, which causes that only an iSCSI client with Initiator "ALL" can discover/connect to them.

A quick solution would be to change "ALL" to an empty string in the PODM's request which creates iSCSI Targets. This way created iSCSI Targets would have no InitiatorIQN assigned, and clients with any Initiator could discover/connect to them.

A more complex solution would be to add a possibility to assign a custom InitiatorIQN for iSCSI Targets when allocation a new node from PODM. This fix would require more time and effort to implement.

Is the quick solution sufficient to enable you, or the second is required?

Best Regards,
Tomasz

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Tomasz,

The quick solution is all we need. Just allowing it to be an empty string is all we need.

Thanks,
Blake

Revision history for this message
Tomasz Bykowski (tomaszbykowski) wrote :

Blake,

Would you like a new PODM binary to test this quick solution, or showing you what should be changed in the PODM source code is enough?

Best Regards,
Tomasz

Changed in maasrsd:
status: Confirmed → Fix Released
Revision history for this message
Raghuram Kota (rkota) wrote :

The RSD PODM fix for this bug is expected to be in 1.2.6 release.

Raghuram Kota (rkota)
Changed in maasrsd:
status: Fix Released → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.