Closed LeoHu1985 closed 3 years ago
@LeoHu1985 Can you please share both controller and node logs.
@LeoHu1985 we understand you are seeing this issue, your logs will sure help us quickly address this issue in our release. appreciate your response.
Its customer's environment, logs are not available anymore, will try to reproduce in DELL lab and get you the logs.
@LeoHu1985 Thank for the update!
@LeoHu1985, closing the issue. Please feel free to reopen the issue when the necessary information is provided.
Describe the bug A clear and concise description of what the bug is.
PowerStore CSI driver is configured for FC connectivity, however its reporting "“AttachVolume.Attach failed for volume "csi-pstore-167d09d5dd" : rpc error: code = Internal desc = could not get iscsiTargets: can't get iscsi target address”" when using CSI to provision PVC from PowerStore.
Issue only resolved by config CSI with a fake iSCSI targets, then FC connectivity would work.
Looking at the code of "addTargetsInfoToPublishContext()", it seems the code would always check iSCSI target first then FC, if there is no ISCSI target configured, the provision would exit with error, it would not proceed with FC target check. This is not ideal, the code should skip ISCSI target check and proceed with FC targets check, if no ISCSI targets configured.
func (s *SCSIPublisher) addTargetsInfoToPublishContext( publishContext map[string]string, client gopowerstore.Client) error { iscsiTargetsInfo, err := common.GetISCSITargetsInfoFromStorage(client) if err != nil { return err } for i, t := range iscsiTargetsInfo { publishContext[fmt.Sprintf("%s%d", common.PublishContextISCSIPortalsPrefix, i)] = t.Portal publishContext[fmt.Sprintf("%s%d", common.PublishContextISCSITargetsPrefix, i)] = t.Target } fcTargetsInfo, err := common.GetFCTargetsInfoFromStorage(client) if err != nil { return err } for i, t := range fcTargetsInfo { publishContext[fmt.Sprintf("%s%d", common.PublishContextFCWWPNPrefix, i)] = t.WWPN } return nil }
To Reproduce Steps to reproduce the behavior:
Expected behavior User should be able to provision FC based PVC from Powerstore without configuring iSCSI targets. The code of "addTargetsInfoToPublishContext()" should skip ISCSI target check and proceed with FC targets check if no ISCSI targets configured.
Screenshots If applicable, add screenshots to help explain your problem.
Logs If applicable, submit logs or stack traces from the affected services
System Information (please complete the following information):
Additional context Add any other context about the problem here.