-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
2.10.z
Problem
The PowerMax volume populator currently fails when creating a masking view with error:
A problem occurred creating the masking view resource: Error for: 000120001473 / xcopy-0e6543f1 : The operation can not be performed because of a mismatch between the initiator and the director port
Root Cause
The code uses a port group name from the POWERMAX_PORT_GROUP_NAME environment variable without validating its protocol type. When the port group's protocol (e.g., Fibre Channel) doesn't match the initiator type (e.g., iSCSI), the masking view creation fails.
Location
cmd/vsphere-xcopy-volume-populator/internal/powermax/powermax.go:
- Line 182: CreateMaskingView call
- Lines 91-150: EnsureClonnerIgroup function
- Line 249: Port group name retrieved from env var without validation
Solution Required
- Fetch port group protocol using GetPortGroupByID() API:
- The PortGroup struct contains PortGroupProtocol field (values: "iSCSI", "SCSI_FC", "NVMe_TCP")
- Select appropriate initiators based on protocol:
- For PortGroupProtocol == "iSCSI": use iSCSI initiators (IQN format)
- For PortGroupProtocol == "SCSI_FC": use Fibre Channel initiators (WWN format)
- Validate compatibility before creating masking view
Related Code Comment
Line 106 contains a TODO that was never implemented:
// 5. add port group with protocol type that match the cloner IQN type, only if they all online
API Reference
- GetPortGroupByID(ctx, symID, portGroupID) returns *types.PortGroup
- PortGroup.PortGroupProtocol field contains protocol type
- Type definition: vendor/github.com/dell/gopowermax/v2/types/v100/types.go:235