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

PreStop hook always fails #175

Closed
jsafrane opened this issue Apr 16, 2020 · 2 comments · Fixed by #176
Closed

PreStop hook always fails #175

jsafrane opened this issue Apr 16, 2020 · 2 comments · Fixed by #176
Assignees

Comments

@jsafrane
Copy link
Contributor

jsafrane commented Apr 16, 2020

csi-hostpath manifests here and in kubernetes/kubernetes contains PreStop hook to remove the driver socket before containers dies.

Since node-driver-registrar container is distroless, the hook always fails:

I0330 08:31:17.836238 1362 event.go:278] Event(v1.ObjectReference{Kind:"Pod", Namespace:"ephemeral-5231", Name:"csi-hostpathplugin-0", UID:"ad6006d7-6425-4661-829e-8106640183fb", APIVersion:"v1", ResourceVersion:"1676", FieldPath:"spec.containers{node-driver-registrar}"}): type: 'Warning' reason: 'FailedPreStopHook' Exec lifecycle hook ([/bin/sh -c rm -rf /registration/csi-hostpath /registration/csi-hostpath-reg.sock]) for Container "node-driver-registrar" in Pod "csi-hostpathplugin-0_ephemeral-5231(ad6006d7-6425-4661-829e-8106640183fb)" failed - error: command '/bin/sh -c rm -rf /registration/csi-hostpath /registration/csi-hostpath-reg.sock' exited with 126: , message: "OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused \"exec: \\\"/bin/sh\\\": stat /bin/sh: no such file or directory\": unknown\r\n"

Sadly, events are not available in prow job artifacts, it's visible only in kubelet logs.

@Madhu-1
Copy link
Contributor

Madhu-1 commented Apr 16, 2020

@jsafrane
Copy link
Contributor Author

Nice! I'll remove the PreStop from manifests here, they don't work and there is no plan to add shell to node-driver-registrar.
/assign

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

Successfully merging a pull request may close this issue.

2 participants