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

Crash for "cm get cc" #74

Closed
KevinFCormier opened this issue Jul 28, 2021 · 0 comments
Closed

Crash for "cm get cc" #74

KevinFCormier opened this issue Jul 28, 2021 · 0 comments
Assignees
Labels
bug Something isn't working (Release note Bug Fixes)

Comments

@KevinFCormier
Copy link
Contributor

I created a ClusterClaim from a ClusterPool with size 0 using cm-cli. I did not change the size of the pool and allowed the command to run to failure.

Afterwards, cm get cc crashes:

% cm get cc
panic: runtime error: index out of range [5] with length 5

goroutine 1 [running]:
github.com/open-cluster-management/cm-cli/pkg/helpers.PrintLines(0xc000396620, 0x7, 0x7, 0x5f00310, 0x1)
	/Users/kcormier/ocm/cm-cli/pkg/helpers/print.go:23 +0x53b
github.com/open-cluster-management/cm-cli/pkg/cmd/get/clusterclaim.(*Options).getCCS(0xc000163840, 0xc0002064d0, 0x0, 0x0)
	/Users/kcormier/ocm/cm-cli/pkg/cmd/get/clusterclaim/exec.go:101 +0x53c
github.com/open-cluster-management/cm-cli/pkg/cmd/get/clusterclaim.(*Options).run(0xc000163840, 0x0, 0x5f03748)
	/Users/kcormier/ocm/cm-cli/pkg/cmd/get/clusterclaim/exec.go:35 +0x99
github.com/open-cluster-management/cm-cli/pkg/cmd/get/clusterclaim.NewCmd.func2(0xc000964280, 0x71f4c28, 0x0, 0x0)
	/Users/kcormier/ocm/cm-cli/pkg/cmd/get/clusterclaim/cmd.go:44 +0x93
github.com/spf13/cobra.(*Command).execute(0xc000964280, 0x71f4c28, 0x0, 0x0, 0xc000964280, 0x71f4c28)
	/Users/kcormier/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc000922280, 0x4, 0x4, 0xc000922280)
	/Users/kcormier/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/kcormier/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
main.main()
	/Users/kcormier/ocm/cm-cli/cmd/cm.go:119 +0xd45

Here is the output from ck:

% ck list cc
NAME              CLUSTER                        POWERSTATE   LOCKS       SCHEDULE   HIBERNATE   LIFETIME   AGE
console           console-aws-47-zv25v           Running      rastislav   true       skip        <none>     14d
console-managed   console-aws-47-managed-7qwwf   Hibernating  <none>      true       true        <none>     14d
daily             console-aws-47-d2j6j           Running      <none>      <none>     skip        12h0m0s    2h27m
kevin             console-aws-47-lbkxm           Hibernating  <none>      true       true        <none>     6d19h
test              console-aws-47-managed-7frh8   <none>       <none>      <none>     <none>      <none>     17h48m

The ClusterClaim I created was test.

This is running using the following commit:
commit ad9d2e5 (HEAD -> main, origin/main, origin/HEAD)
Author: Gurney Buchanan [email protected]
Date: Tue Jul 27 13:55:45 2021 -0400

Update help text for "create cph" (#71)

create cph takes an argument of `--api-server` but the help text example uses `--apiserver-url` leading to the following error:
```
$ cm create cph <clusterpoolhost-name> --apiserver-url <api-url> --console <console-url> --group=<group> --namespace=<namespace>
Error: unknown flag: --apiserver-url
```
@KevinFCormier KevinFCormier added the bug Something isn't working (Release note Bug Fixes) label Jul 28, 2021
@itdove itdove closed this as completed Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (Release note Bug Fixes)
Projects
None yet
Development

No branches or pull requests

2 participants