Skip to content

PreStop hook always fails #175

Closed
@jsafrane

Description

@jsafrane

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions