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

segfault validating cluster update after changing cluster name #3470

Closed
erickt opened this issue Sep 28, 2017 · 6 comments
Closed

segfault validating cluster update after changing cluster name #3470

erickt opened this issue Sep 28, 2017 · 6 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Milestone

Comments

@erickt
Copy link
Contributor

erickt commented Sep 28, 2017

I just tried to rename a cluster with kops with commit ea31478 and I got a segfault or nil pointer dereference. I did kops edit cluster and then changed the the metadata from:

...
metadata:
  name: <SOME_DOMAIN>
...

To:

...
metadata:
  name: cluster.<SOME_DOMAIN>
...

Kops produced this backtrace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x2c0 pc=0x1e97532]

goroutine 1 [running]:
k8s.io/kops/pkg/apis/kops/validation.ValidateClusterUpdate(0xc420246700, 0xc4201c4c20, 0x0, 0x0, 0x0, 0x0)
	/Users/erickt/gopath/src/k8s.io/kops/pkg/apis/kops/validation/cluster.go:39 +0x262
k8s.io/kops/pkg/client/simple/vfsclientset.(*ClusterVFS).Update(0xc4207bdcc0, 0xc420246700, 0xc4201c4c20, 0xc4207bdb80, 0xc420d5f1b8, 0xc420d5f1b8)
	/Users/erickt/gopath/src/k8s.io/kops/pkg/client/simple/vfsclientset/cluster.go:125 +0xd6
k8s.io/kops/pkg/client/simple/vfsclientset.(*VFSClientset).UpdateCluster(0xc4207f7650, 0xc420246700, 0xc4201c4c20, 0x0, 0x0, 0x0)
	/Users/erickt/gopath/src/k8s.io/kops/pkg/client/simple/vfsclientset/clientset.go:44 +0x4d
main.RunEditCluster(0xc420822460, 0xc420058fc0, 0xc4207f74a0, 0x0, 0x1, 0x5aeb180, 0xc42000e018, 0x5cb0060, 0x1, 0xc42000e528)
	/Users/erickt/gopath/src/k8s.io/kops/cmd/kops/edit_cluster.go:247 +0x1221
main.NewCmdEditCluster.func1(0xc420058fc0, 0xc4207f74a0, 0x0, 0x1)
	/Users/erickt/gopath/src/k8s.io/kops/cmd/kops/edit_cluster.go:70 +0x71
k8s.io/kops/vendor/github.com/spf13/cobra.(*Command).execute(0xc420058fc0, 0xc4207f7490, 0x1, 0x1, 0xc420058fc0, 0xc4207f7490)
	/Users/erickt/gopath/src/k8s.io/kops/vendor/github.com/spf13/cobra/command.go:603 +0x234
k8s.io/kops/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x5c7b8e0, 0x385bc00, 0x0, 0x0)
	/Users/erickt/gopath/src/k8s.io/kops/vendor/github.com/spf13/cobra/command.go:689 +0x2fe
k8s.io/kops/vendor/github.com/spf13/cobra.(*Command).Execute(0x5c7b8e0, 0x5cb0060, 0x0)
	/Users/erickt/gopath/src/k8s.io/kops/vendor/github.com/spf13/cobra/command.go:648 +0x2b
main.Execute()
	/Users/erickt/gopath/src/k8s.io/kops/cmd/kops/root.go:98 +0x91
main.main()
	/Users/erickt/gopath/src/k8s.io/kops/cmd/kops/main.go:25 +0x20
@chrislovecnm
Copy link
Contributor

@erickt we need to improve validation, but you should not be able to change that field ;)

@chrislovecnm
Copy link
Contributor

Somehow the old cluster is coming back as nil, probably because he name has changed :) We need to fix the nil, and fix the validation.

@justinsb
Copy link
Member

justinsb commented Dec 2, 2017

We're no longer going to segfault as of #3935. We do need validation that changing the name is not permitted.

@justinsb justinsb modified the milestones: 1.8.0, 1.8.1 Dec 2, 2017
@justinsb justinsb modified the milestones: 1.8.1, 1.9 Feb 21, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 22, 2018
@justinsb justinsb modified the milestones: 1.9.0, 1.10 May 26, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 25, 2018
@mikesplain
Copy link
Contributor

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants