Description of problem -
When executing the odf-cli subvolume ls command, a runtime error occurs, causing the command to fail. The error traceback indicates a nil pointer dereference, resulting in a segmentation fault (SIGSEGV). This issue is observed on an ODF 4.15 cluster that was upgraded from ODF 4.14 on the VSPHERE platform. Find the details as below.
E ocs_ci.ocs.exceptions.CommandFailed: Error during execution of command: odf-cli subvolume ls.
E Error is panic: runtime error: invalid memory address or nil pointer dereference
E [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x16ccaff]
goroutine 1 [running]:
github.com/rook/kubectl-rook-ceph/pkg/filesystem.getK8sRefSubvolume(
Unknown macro: {0x1d59918, 0xc0000481f0}
, 0x0?)
/remote-source/odf-cli/deps/gomod/pkg/mod/github.com/rook/kubectl-rook-ceph@v0.6.1-0.20231211183203-70ede2704719/pkg/filesystem/subvolume.go:55 +0x17f
github.com/rook/kubectl-rook-ceph/pkg/filesystem.List(
, 0x0?,
Unknown macro: {0x1aee110, 0x11}
,
, 0x0?)
/remote-source/odf-cli/deps/gomod/pkg/mod/github.com/rook/kubectl-rook-ceph@v0.6.1-0.20231211183203-70ede2704719/pkg/filesystem/subvolume.go:43 +0x51
github.com/red-hat-storage/odf-cli/cmd/odf/subvolume.glob..func1(0x2a1d940?,
Unknown macro: {0x1ae15a9?, 0x0?, 0x0?}
)
/remote-source/odf-cli/app/cmd/odf/subvolume/subvolume.go:21 +0x7a
github.com/spf13/cobra.(Command).execute(0x2a1d940,
Unknown macro: {0xc00003e1a0, 0x0, 0x0}
)
/remote-source/odf-cli/deps/gomod/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0xa91
github.com/spf13/cobra.(Command).ExecuteC(0x2a1c800)
/remote-source/odf-cli/deps/gomod/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x425
github.com/spf13/cobra.(*Command).Execute(...)
/remote-source/odf-cli/deps/gomod/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
main.main()
/remote-source/odf-cli/app/cmd/odf/main.go:14 +0x79
Platform : VSPHERE
Jenkins Job Link : https://ocs4-jenkins-csb-odf-qe.apps.ocp-c1.prod.psi.redhat.com/job/qe-deploy-ocs-cluster-prod/13779
DEPLOYMENT:
allow_lower_instance_requirements: false
local_storage: true
type: 'VMDK'
provision_type: 'thick'
ENV_DATA:
platform: 'vsphere'
deployment_type: 'upi'
OCS version = 4.14
UPGRADE_OCS_VERSION = 4.15
OCP version = 4.14
UPGRADE_OCP_VERSION = 4.15
UPGRADE_OCS_REGISTRY_IMAGE = quay.io/rhceph-dev/ocs-registry:4.15.8-6
Does this issue impact your ability to continue to work with the product? YES
Is there any workaround available to the best of your knowledge? NO
Can this issue be reproduced? If so, please provide the hit rate
Can this issue be reproduced from the UI?
If this is a regression, please provide more details to justify this:
Steps to Reproduce:
1. Run the command odf-cli subvolume ls.
2. Observe the error output indicating a segmentation violation.
3.
The exact date and time when the issue was observed, including timezone details:
Actual results:
The command fails with a panic error due to a nil pointer dereference, preventing the listing of subvolumes.
Expected results:
The command should list subvolumes without errors, fetching necessary references without encountering a nil pointer.
Logs collected and log location:
Additional info: