Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: dellctl crashes on a "backup get" when a trailing "/" is added to the namespace #691

Closed
EZandboer opened this issue Feb 28, 2023 · 4 comments
Assignees
Labels
area/csm-application-mobility type/bug Something isn't working. This is the default label associated with a bug issue.
Milestone

Comments

@EZandboer
Copy link

Bug Description

When running:

dellctl backup get -n application-mobility/

there is a panic as a result:

panic: runtime error: invalid memory address or nil pointer dereference

Logs

`root@k3s-001:/yelb# dellctl restore get -n application-mobility
NAME BACKUP STATUS CREATED COMPLETED
restore-from-k3s-to-openshift-yelb-k3s-01 yelb-k3s-01 Completed 2023-02-21 06:15:58 -0500 EST NA
restore-from-k3s-to-openshift-yelb-k3s-01-001 yelb-k3s-01 Completed 2023-02-21 06:15:58 -0500 EST NA
restore-from-k3s-to-openshift-yelb-k3s-02 yelb-k3s-01 Completed 2023-02-21 06:15:58 -0500 EST NA
restore-from-k3s-to-openshift-yelb-k3s-03 yelb-k3s-01 Completed 2023-02-23 09:06:53 -0500 EST NA
root@k3s-001:
/yelb# dellctl restore get -n application-mobility/
FATAL Error: failed to get restores, error: invalid namespace "application-mobility/": [may not contain '/']
root@k3s-001:/yelb# dellctl backup get -n application-mobility
NAME STATUS CREATED EXPIRES STORAGE LOCATION DATA MOVER CLONED TARGET CLUSTERS
backup-test-1 Completed 2023-02-21 04:28:59 -0500 EST 2023-03-23 02:44:26 -0400 EDT default Restic false
yelb-k3s-01 Completed 2023-02-23 09:01:01 -0500 EST 2023-03-25 10:00:59 -0400 EDT default Restic false
root@k3s-001:
/yelb# dellctl backup get -n application-mobility/
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x12f59c5]

goroutine 1 [running]:
eos2git.cec.lab.emc.com/DevCon/csm-cli/pkg/display.getBackupListTableRows(0x0)
/root/release-0.1.0/csm-cli/pkg/display/app-mobility.go:95 +0x45
eos2git.cec.lab.emc.com/DevCon/csm-cli/pkg/display.PrintTable({0x190e598?, 0x0?})
/root/release-0.1.0/csm-cli/pkg/display/display.go:168 +0x2a5
eos2git.cec.lab.emc.com/DevCon/csm-cli/cmd/app-mobility/backup.newGetCmd.func1(0xc000354f00?, {0xc000290ea0, 0x0, 0x2})
/root/release-0.1.0/csm-cli/cmd/app-mobility/backup/get.go:55 +0x1c5
github.com/spf13/cobra.(*Command).execute(0xc000354f00, {0xc000290e60, 0x2, 0x2})
/root/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 +0x67b
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002f7900)
/root/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
/root/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
eos2git.cec.lab.emc.com/DevCon/csm-cli/cmd.Execute()
/root/release-0.1.0/csm-cli/cmd/root.go:29 +0x1e
main.main()
/root/release-0.1.0/csm-cli/main.go:58 +0x19
root@k3s-001:~/yelb# `

Screenshots

No response

Additional Environment Information

not relevant

Steps to Reproduce

perform this command:

dellctl backup get -n application-mobility/

Expected Behavior

In parallel to a "dellctl restore get" command this would be the expected output:

FATAL Error: failed to get backups, error: invalid namespace "application-mobility/": [may not contain '/']

CSM Driver(s)

CSI driver for Unity

Installation Type

Helm3: version.BuildInfo{Version:"v3.10.3", GitCommit:"835b7334cfe2e5e27870ab3ed4135f136eecc704", GitTreeState:"clean", GoVersion:"go1.18.9"}

Container Storage Modules Enabled

Application-mobility v0.2.0
dellctl v0.1.0

Container Orchestrator

K3s: v1.25.4+k3s1

Operating System

Debian GNU/Linux 10 (buster)

@EZandboer EZandboer added needs-triage Issue requires triage. type/bug Something isn't working. This is the default label associated with a bug issue. labels Feb 28, 2023
@csmbot
Copy link
Collaborator

csmbot commented Feb 28, 2023

@EZandboer: Thank you for submitting this issue!

The issue is currently awaiting triage. Please make sure you have given us as much context as possible.

If the maintainers determine this is a relevant issue, they will remove the needs-triage label and assign an appropriate priority label.


We want your feedback! If you have any questions or suggestions regarding our contributing process/workflow, please reach out to us at container.storage.modules@dell.com.

@tdawe
Copy link
Collaborator

tdawe commented Feb 28, 2023

/sync

@csmbot
Copy link
Collaborator

csmbot commented Feb 28, 2023

link: 11947

@tdawe tdawe added this to the v1.6.0 milestone Feb 28, 2023
@tdawe
Copy link
Collaborator

tdawe commented Mar 1, 2023

Fixed

@tdawe tdawe closed this as completed Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/csm-application-mobility type/bug Something isn't working. This is the default label associated with a bug issue.
Projects
None yet
Development

No branches or pull requests

5 participants