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

Registrar command should fail upon unrecoverable error #62

Closed
vladimirvivien opened this issue Oct 4, 2018 · 2 comments
Closed

Registrar command should fail upon unrecoverable error #62

vladimirvivien opened this issue Oct 4, 2018 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@vladimirvivien
Copy link
Member

vladimirvivien commented Oct 4, 2018

Currently the registrar code is setup in a loop to continuously (https://github.com/kubernetes-csi/driver-registrar/blob/master/cmd/driver-registrar/k8s_register.go#L89) to attempt to reconcile the CSIDriver CRD object associated with the driver. However, when an unrecoverable error occur, the loop continues. This causes the container not to report the failure but instead continues to work.

For instance, the hostpath plugin pod shows that all containers are running

$> kubectl get pods
NAME                         READY   STATUS    RESTARTS   AGE
csi-hostpath-attacher-0      1/1     Running   0          15m
csi-hostpath-provisioner-0   1/1     Running   0          15m
csi-hostpathplugin-bshzn     3/3     Running   0          15m

However, the logs for the containers in the hostpath plugin shows unrecoverable errors:

E1004 20:40:29.135920       1 k8s_register.go:118] Failed to create CSIDriver object: csidrivers.csi.storage.k8s.io is forbidden: User "system:serviceaccount:default:csi-nodeplugin" cannot create resource "csidrivers" in API group "csi.storage.k8s.io" at the cluster scope
E1004 20:42:29.147958       1 k8s_register.go:118] Failed to create CSIDriver object: csidrivers.csi.storage.k8s.io is forbidden: User "system:serviceaccount:default:csi-nodeplugin" cannot create resource "csidrivers" in API group "csi.storage.k8s.io" at the cluster scope
E1004 20:44:29.154980       1 k8s_register.go:118] Failed to create CSIDriver object: csidrivers.csi.storage.k8s.io is forbidden: User "system:serviceaccount:default:csi-nodeplugin" cannot create resource "csidrivers" in API group "csi.storage.k8s.io" at the cluster scope
E1004 20:46:29.160309       1 k8s_register.go:118] Failed to create CSIDriver object: csidrivers.csi.storage.k8s.io is forbidden: User "system:serviceaccount:default:csi-nodeplugin" cannot create resource "csidrivers" in API group "csi.storage.k8s.io" at the cluster scope
E1004 20:48:29.166816       1 k8s_register.go:118] Failed to create CSIDriver object: csidrivers.csi.storage.k8s.io is forbidden: User "system:serviceaccount:default:csi-nodeplugin" cannot create resource "csidrivers" in API group "csi.storage.k8s.io" at the cluster scope

What I expected is the container should fail when it is unable to create CRD type.

@vladimirvivien
Copy link
Member Author

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 4, 2018
@lpabon
Copy link
Member

lpabon commented Jan 9, 2019

🛂 ⛔️
Hi, this repo has been split up into two repos:

This repo has been closed, and no new changes will be accepted. Please move your content to one of these repos.

Thank you,

@lpabon lpabon closed this as completed Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants