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

Unable to switch context between projects #248

Closed
jsnjack opened this issue Jun 29, 2020 · 5 comments · Fixed by #252
Closed

Unable to switch context between projects #248

jsnjack opened this issue Jun 29, 2020 · 5 comments · Fixed by #252

Comments

@jsnjack
Copy link

jsnjack commented Jun 29, 2020

Hi,

We have started to use hcloud (v1.17.0) to manage 2 projects. However, we are not able to switch between them using context subcommand. It is possible to add and activate another project, however hcloud still makes requests to the first one.

After deleting the second project there is a segfault:

15:19 $ hcloud context list
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7f7d46]

goroutine 1 [running]:
github.com/hetznercloud/cli/cli.runContextList(0xc0001f0180, 0xc0002478c0, 0xd57ab8, 0x0, 0x0, 0x0, 0x0)
	/Users/runner/runners/2.263.0/work/cli/cli/cli/context_list.go:60 +0x2c6
github.com/hetznercloud/cli/cli.(*CLI).wrap.func1(0xc0002478c0, 0xd57ab8, 0x0, 0x0, 0x0, 0x0)
	/Users/runner/runners/2.263.0/work/cli/cli/cli/cli.go:131 +0x56
github.com/spf13/cobra.(*Command).execute(0xc0002478c0, 0xc00018c020, 0x0, 0x0, 0xc0002478c0, 0xc00018c020)
	/Users/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:838 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001ae840, 0x0, 0x0, 0xc000280340)
	/Users/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:943 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:883
main.main()
	/Users/runner/runners/2.263.0/work/cli/cli/cmd/hcloud/main.go:35 +0x65
@LKaemmerling
Copy link
Member

LKaemmerling commented Jul 13, 2020

Hey @jsnjack,

I'm not able to reproduce this, could it be possible that you named them identically?

@jsnjack
Copy link
Author

jsnjack commented Jul 13, 2020

hm.. one of them is called "Default", another one "Test infrastructure" (on cloud interface). This is what I have in hcloud:

$ hcloud context list
ACTIVE   NAME
         test_infra
*        default

@LKaemmerling
Copy link
Member

How did you delete the context? Via hcloud context delete?

@jsnjack
Copy link
Author

jsnjack commented Jul 13, 2020

Yes, I used delete command

@LKaemmerling
Copy link
Member

Okay then I found the problem :) Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants