csm
csm copied to clipboard
Replication: 'repctl get pvc' command to handle PVCs created without StorageClass set
Please tell me the solution. when I execute "repctl get pvc ", it's occuered the errror
# repctl get pvc
[2023-10-04 13:03:26] INFO listing persistent volume claims
[2023-10-04 13:03:28] INFO Cluster: cluster-1
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1298a7f]
goroutine 1 [running]:
github.com/dell/repctl/pkg/types.GetPVC(...)
/root/csm-replication/repctl/pkg/types/pvc.go:68
github.com/dell/repctl/pkg/k8s.(*Cluster).FilterPersistentVolumeClaims(0xb?, {0x17fc9d8, 0xc000048078}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, ...})
/root/csm-replication/repctl/pkg/k8s/cluster.go:326 +0x4df
github.com/dell/repctl/pkg/cmd.getListPersistentVolumeClaimsCommand.func1(0xc0001c5400?, {0x15d1168?, 0x0?, 0x0?})
/root/csm-replication/repctl/pkg/cmd/list.go:233 +0x3c2
github.com/spf13/cobra.(*Command).execute(0xc0001c5400, {0x2240ef0, 0x0, 0x0})
/go/pkg/mod/github.com/spf13/[email protected]/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xc000365900)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
main.main()
/root/csm-replication/repctl/cmd/repctl/main.go:100 +0x5e5
I don't change main.go in "https://github.com/dell/csm.git"
environment
- Operating System: RHEL 8.7
- Container Orchestrator: Openshift 4.12.28
- CSM Driver(s): CSI Driver for PowerStore v2.7.0
- repctl: 1.6.0
- Installation Type: Helm Install
- Model: PowerStore 1200T
details
refference
https://dell.github.io/csm-docs/docs/replication/deployment/
action
I carried out in order. Installation ConfigMap & Secrets ... PowerStore
An error occurred in process Provisioning Replicated Volumes.
Hi @hara1101kazu
This error can occur if you have any PVC in cluster-1 created without StorageClass requirement in the PVC definition. You can run 'kubectl get pvc -A' command to confirm that. https://github.com/dell/csm-replication/blob/35a4cb11f35050cc1a13550f91dff7c7f632a9b9/repctl/pkg/types/pvc.go#L68C2-L68C2
Once you confirm, we can convert this ticket to see if we can handle this case in repctl. You can also delete that PVC if that's not needed so that repctl can list PVCs. Thanks!
thank you! I was able to solve it successfully. There was a PVC without StorageClass.
Reopening it to capture it as an improvement to be made.