Bug 1824596 - PreStop hook fails in csi-hostpath driver pod used in tests
Summary: PreStop hook fails in csi-hostpath driver pod used in tests
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Jan Safranek
QA Contact: Qin Ping
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-16 11:03 UTC by Jan Safranek
Modified: 2020-07-13 17:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:27:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift origin pull 24892 0 None closed Bug 1824596: UPSTREAM: 90234: Remove PreStop hook from hostpath CSI driver 2020-06-30 14:44:59 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:28:23 UTC

Description Jan Safranek 2020-04-16 11:03:38 UTC
Description of problem:

See https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/openshift_cluster-etcd-operator/312/pull-ci-openshift-cluster-etcd-operator-master-e2e-gcp/1175

Apr 16 02:47:54.240 W ns/e2e-volumemode-7208 pod/csi-hostpathplugin-0 node/ci-op-8lmbm-w-b-g294t.c.openshift-gce-devel-ci.internal 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_e2e-volumemode-7208(c3a0be58-f762-4513-ad18-e4e8d183d547)" failed - error: rpc error: code = Unknown desc = command error: time="2020-04-16T02:47:54Z" level=error msg="exec failed: container_linux.go:349: starting container process caused \"exec: \\\"/bin/sh\\\": stat /bin/sh: no such file or directory\""\nexec failed: container_linux.go:349: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory"\n, stdout: , stderr: , exit code -1, message: ""

A CSI tests is cleaning up and deletes csi-hostpath driver pod. The driver pod has PreStop hook to delete driver's socket, however, there is no /bin/sh in the node driver registrar image (we're using distroless) and the hook fails.

The test itself succeeds, however, logs are full of hard to understand errors, which complicates debugging of other failures.

Version-Release number of selected component (if applicable):
4.5

Comment 1 Jan Safranek 2020-04-16 13:11:12 UTC
Note: this is e2e tests we got from upstream, i.e. it uses upstream node registrar image that is distroless.

Our OCP images are based on RHEL and they have a shell.

Comment 2 Jan Safranek 2020-04-16 13:19:38 UTC
Upstream PR: https://github.com/kubernetes-csi/csi-driver-host-path/pull/176

Comment 3 Jan Safranek 2020-04-17 07:57:53 UTC
"backport" to kubernetes/kubernetes: https://github.com/kubernetes/kubernetes/pull/90234

Comment 7 errata-xmlrpc 2020-07-13 17:27:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2409


Note You need to log in before you can comment on or make changes to this bug.