Charm doesn't make a determination about the default storage-class
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Kubernetes Control Plane Charm |
Fix Released
|
Undecided
|
Adam Dyess |
Bug Description
While testing the aws-k8s-storage charm, bootstrapping a k8s juju controller encountered an error
(https:/
-------
2022-11-16-19:47:06 root ERROR [localhost] Command failed: juju add-k8s kubernetes_cloud --client --cloud aws --region us-east-1
2022-11-16-19:47:06 root ERROR [localhost] STDOUT follows:
2022-11-16-19:47:06 root ERROR [localhost] STDERR follows:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x1a32a70]
goroutine 1 [running]:
github.
/build/
github.
/build/
github.
/build/
github.
/build/
github.
/build/
github.
/build/
github.
/build/
github.
/build/
github.
/build/
main.main()
/build/
-------
Looking at the cluster there appeared two storage classes, neither of which was the default. This is likely the culprit for the juju client trying to bootstrap a controller.
-------
$ kubectl --kubeconfig=
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPA
cdk-ebs kubernetes.
csi-aws-ebs-default ebs.csi.aws.com Delete WaitForFirstCon
-------
However, there's trouble here:
1) cdk-addons is installing a cdk-ebs storage-class that really can no longer be used in 1.25 because the provisioner kubernetes.
2) csi-aws-ebs-default is the name of the storage class that the aws-k8s-storage charm installed -- but it's not the default storage class. SHOULD IT BE?
3) If there are multiple storage backends (cloud backed and maybe ceph storage) shouldn't the cluster admin get the choice of which on to use -- why should the charms enforce their will on the cluster?
3a) perhaps the charms can enforce their will through the use of config -- but that just begs the question what should the default config be on each of the charms and how to interlock them?
3b) some suggested that "first storage class installed should win" but this could lead to the same bundles yielding different default storage based on which charm installs their storage-class first
Changed in charm-aws-k8s-storage: | |
status: | New → Incomplete |
status: | Incomplete → Confirmed |
Changed in charm-azure-cloud-provider: | |
status: | New → Incomplete |
status: | Incomplete → New |
Changed in charm-kubernetes-master: | |
assignee: | nobody → Adam Dyess (addyess) |
Changed in charm-kubernetes-master: | |
status: | Fix Committed → Fix Released |
Changed in charm-kubernetes-master: | |
status: | In Progress → Fix Committed |
Changed in charm-kubernetes-master: | |
status: | Fix Committed → Fix Released |
The bug for the juju panic can be found at: /bugs.launchpad .net/juju/ +bug/1996808
https:/
in the case of 2
you have decided the name of the storage in the charm, should the storage name also be something the user can configure? I fear that may also cause some confusion further down the line when it comes to juju add-k8s. Otherwise if the name is going to have "default" in it, I'd assume it would be the default unless I said otherwise.
If someone is using 2 kinds of storage, can you assume that they are advanced enough to also select which storage they want to use? I cant say for certain but my gut says that the average user wont be using more than 1 kind of storage