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 if storageClassName not defined #36

Open
Julusian opened this issue May 17, 2020 · 1 comment
Open

segfault if storageClassName not defined #36

Julusian opened this issue May 17, 2020 · 1 comment

Comments

@Julusian
Copy link

If I don't define storageClassName, then the provisioner will segfault.
While this may be unlikely, I hit this because I have a bunch of pvc resources which I am moving across to this provisioner, and a lot of them specify the class via an annotation (I wrote them years ago)

I0517 22:29:47.841178       1 controller.go:926] provision "ci/builds-minio-data" class "zfs-array": started
I0517 22:29:47.841397       1 controller.go:926] provision "ci/builds-minio-config" class "zfs-array": started
E0517 22:29:47.843664       1 runtime.go:69] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:76
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
/home/travis/.gimme/versions/go1.10.8.linux.amd64/src/runtime/asm_amd64.s:573
/home/travis/.gimme/versions/go1.10.8.linux.amd64/src/runtime/panic.go:502
/home/travis/.gimme/versions/go1.10.8.linux.amd64/src/runtime/panic.go:63
/home/travis/.gimme/versions/go1.10.8.linux.amd64/src/runtime/signal_unix.go:388
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/provisioner/provisioner.go:243
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:1014
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:786
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:759
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:683
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:697
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:657
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:616
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134
/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88
/home/travis/.gimme/versions/go1.10.8.linux.amd64/src/runtime/asm_amd64.s:2361
I0517 22:29:47.843651       1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"ci", Name:"builds-minio-data", UID:"6347a89e-cba8-47fb-9bf6-979f1ba741db", APIVersion:"v1", ResourceVersion:"106896691", FieldPath:""}): type: 'Normal' reason: 'Provisioning' External provisioner is provisioning volume for claim "ci/builds-minio-data"
I0517 22:29:47.843765       1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"ci", Name:"builds-minio-config", UID:"0f0366b2-0c04-4f9c-a98e-a66b6fa1e1ef", APIVersion:"v1", ResourceVersion:"106896687", FieldPath:""}): type: 'Normal' reason: 'Provisioning' External provisioner is provisioning volume for claim "ci/builds-minio-config"
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x107fec1]

goroutine 106 [running]:
github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x107
panic(0x11e5de0, 0x1cc7c60)
	/home/travis/.gimme/versions/go1.10.8.linux.amd64/src/runtime/panic.go:502 +0x229
github.com/nmaupu/freenas-provisioner/provisioner.(*freenasProvisioner).Provision(0xc420401f40, 0xc4200ae69a, 0x6, 0xc4203ec210, 0x28, 0x0, 0x0, 0x0, 0xc420010b98, 0xc420729f80, ...)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/provisioner/provisioner.go:243 +0x61
github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller.(*ProvisionController).provisionClaimOperation(0xc4204d8000, 0xc420010b98, 0x1cda720, 0xc42073e6e0)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:1014 +0xcf8
github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller.(*ProvisionController).syncClaim(0xc4204d8000, 0x134e0c0, 0xc420010b98, 0x134e0c0, 0xc420010b98)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:786 +0xaf
github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller.(*ProvisionController).syncClaimHandler(0xc4204d8000, 0xc42073e6e0, 0x14, 0x11804c0, 0xc4200a21d0)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:759 +0x8d
github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller.(*ProvisionController).processNextClaimWorkItem.func1(0xc4204d8000, 0x11804c0, 0xc4200a21d0, 0x0, 0x0)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:683 +0xe3
github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller.(*ProvisionController).processNextClaimWorkItem(0xc4204d8000, 0xc4200b4201)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:697 +0x55
github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller.(*ProvisionController).runClaimWorker(0xc4204d8000)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:657 +0x2b
github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller.(*ProvisionController).(github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller.runClaimWorker)-fm()
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:616 +0x2a
github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc4205b60a0)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x54
github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc4205b60a0, 0x3b9aca00, 0x0, 0x1, 0x0)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbd
github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc4205b60a0, 0x3b9aca00, 0x0)
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller.(*ProvisionController).Run.func1
	/home/travis/gopath/src/github.com/nmaupu/freenas-provisioner/vendor/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller/controller.go:616 +0x3e1
@travisghansen
Copy link
Collaborator

If you’re moving to something new I highly recommend migrating to the new csi version of this. This project is effectively in maintenance mode (as are all non-csi drivers generally).

https://github.com/democratic-csi

I haven’t documented it as well as this is which is the only reason it’s not mentioned more prominently.

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

No branches or pull requests

2 participants