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

node-driver-registrar preStop fails because /bin/sh doesn't exist #747

Closed
kgtw opened this issue Feb 16, 2021 · 7 comments
Closed

node-driver-registrar preStop fails because /bin/sh doesn't exist #747

kgtw opened this issue Feb 16, 2021 · 7 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@kgtw
Copy link

kgtw commented Feb 16, 2021

/kind bug

What happened?

preStop lifecycle hook isn't executed because /bin/sh doesn't exist within the registrar docker image.

See: https://github.com/kubernetes-csi/node-driver-registrar/blob/v2.0.1/Dockerfile

What you expected to happen?

lifecycle hook to execute successfully.

How to reproduce it (as minimally and precisely as possible)?

Deploy latest manifests with registrar version v2.0.1 and observe when the pod/container is shutting down the preStop command fails to execute.

Exec lifecycle hook ([/bin/sh -c rm -rf /registration/ebs.csi.aws.com-reg.sock /csi/csi.sock]) for Container "node-driver-registrar" in Pod "ebs-csi-node-96jbk_ebs-csi(a82c6d41-bd2b-42dd-b092-e3acd4c43b62)" failed - error: command '/bin/sh -c rm -rf /registration/ebs.csi.aws.com-reg.sock /csi/csi.sock' exited with 126: , message: "OCI runtime exec failed: exec failed: container_linux.go:370: starting container process caused: exec: \"/bin/sh\": stat /bin/sh: no such file or directory: unknown\r\n"

See: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/deploy/kubernetes/base/node.yaml#L71-L80

Anything else we need to know?:

Environment

  • Kubernetes version (use kubectl version): 1.19.7
  • Driver version:

provider-aws/aws-ebs-csi-driver:v0.9.0
k8scsi/csi-node-driver-registrar:v2.0.1
k8scsi/livenessprobe:v2.1.0

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 16, 2021
@tsunny
Copy link
Contributor

tsunny commented Mar 4, 2021

We are seeing the same issue on our clusters too.

@wongma7
Copy link
Contributor

wongma7 commented Mar 4, 2021

LEt's remove the hook, node driver registrar already does this by itself kubernetes-csi/node-driver-registrar#61

@tsunny
Copy link
Contributor

tsunny commented Mar 4, 2021

@wongma7 - thanks for the response. This should be updated in the helm templates in the repo right? #747 (comment)

@wongma7
Copy link
Contributor

wongma7 commented Mar 4, 2021

Yes, (and the kustomize via make generate-kustomize

tsunny pushed a commit to tsunny/aws-ebs-csi-driver that referenced this issue Mar 4, 2021
@tsunny
Copy link
Contributor

tsunny commented Mar 4, 2021

@wongma7 - PR for this - #778.
TIA

AndyXiangLi pushed a commit to AndyXiangLi/aws-ebs-csi-driver that referenced this issue Mar 5, 2021
@krmichel
Copy link
Contributor

@wongma7 Looks like this didn't get linked to PR #778 and therefore didn't get closed.

@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-contributor-experience at kubernetes/community.
/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 Jun 23, 2021
@wongma7 wongma7 closed this as completed Jun 23, 2021
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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

6 participants