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

snapshot-controller container in controller pod fails when CRDs are not installed #264

Closed
emiran-orange opened this issue Oct 12, 2023 · 6 comments

Comments

@emiran-orange
Copy link
Contributor

emiran-orange commented Oct 12, 2023

What steps did you take and what happened:
Install chart with crd.volumeSnapshot=False, wait for container snapshot-controller to crash with the following error:

E1012 16:05:19.347196       1 main.go:89] Failed to list v1 volumesnapshots with error=the server could not find the requested resource (get volumesnapshots.snapshot.storage.k8s.io)
E1012 16:05:19.347240       1 main.go:207] Exiting due to failure to ensure CRDs exist during startup: timed out waiting for the condition

What did you expect to happen:
Ability not to add snapshot-controller to pod

The output of the following commands will help us better understand what's going on:

  • kubectl logs -f openebs-lvm-controller-0 -n kube-system -c openebs-lvm-plugin
    Not relevant
  • kubectl logs -f openebs-lvm-node-[xxxx] -n kube-system -c openebs-lvm-plugin
    Not relevant
  • kubectl get pods -n kube-system
NAME                       READY   STATUS             RESTARTS   AGE
lvm-localpv-controller-0   4/5     CrashLoopBackOff   10         29m
lvm-localpv-node-5qcn5     2/2     Running            0          31m
lvm-localpv-node-8lcs7     2/2     Running            0          31m
lvm-localpv-node-ggtgs     2/2     Running            0          31m
lvm-localpv-node-kqcxs     2/2     Running            0          31m
lvm-localpv-node-qfb82     2/2     Running            0          31m
lvm-localpv-node-qnx2l     2/2     Running            0          31m
lvm-localpv-node-vgch4     2/2     Running            0          31m
  • kubectl get lvmvol -A -o yaml
    Not relevant

Anything else you would like to add:
volumeSnapshot CRDs are only conditioned on crd.volumeSnapshot while there is alos crd.enabled which is not interpreted anywhere...

Environment:

  • LVM Driver version: 1.3.0
  • Kubernetes version (use kubectl version): Not relevant
  • Kubernetes installer & version: Not relevant
  • Cloud provider or hardware configuration: Not relevant
  • OS (e.g. from /etc/os-release): Not relevant
@emiran-orange
Copy link
Contributor Author

Would it make sense to add lvmController.snapshotController.enabled and lvmController.snapshotter.enabled to condition the addition both containers to controller pod ? If so, I can drop a PR about it

@Abhinandan-Purkait
Copy link
Member

Abhinandan-Purkait commented Oct 18, 2023

@emiran-orange Is this to disable the snapshot feature? I am not sure if we want that to be configurable.
The crd.volumeSnapshot=False would be considered valid combination if the cluster already has the snapshot crds. It's not desirable to disable the crd installation if crds are not present in the cluster already.

Or are you saying even if the crds are present and we set crd.volumeSnapshot=False, the csi containers still fail?

@emiran-orange
Copy link
Contributor Author

@Abhinandan-Purkait Thanks for the highlight.

Disabling the snapshot feature was what I had in mind but I understand your position.
I'm working on a soft mutitenant cluster it seems that I can achieve the same by not defining any volumesnapshotclass

@emiran-orange
Copy link
Contributor Author

@Abhinandan-Purkait
I noticed that volumeSnapshot CRDs are only conditioned on crd.volumeSnapshot while there is also crd.enabled which is not interpreted anywhere...

Is it on purpose ?

@Abhinandan-Purkait
Copy link
Member

Okay. crd.enabled is a helm macro, which helm understands, that's the reason you aren't seeing it in any template. That is there to disable installation of all crds. FYI we have some other crds that we use for LVM. Setting crd.enabled to false will not install any crds that are a part of this helm chart. Hope that answers your question.

@emiran-orange
Copy link
Contributor Author

Thanks for your time and sorry for the disturbance of this (non)issue.

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