Sometime in last few releases init containers stopped being debuggable with `oc debug pod/foo -c <init_container_name>`. The root cause is the wait logic for the pod container to be running ignores init containers. The fix is to adjust the wait logic to correctly read init containers. Also, I simplified and removed some logic that was subject to exiting early on errors that might be transient (for instance, the first image pull can fail and the second can succeed) and replaced those with warning messages. May need a backport for 4.6.
Sounds like this is a regression but not a new one. Moving to blocker- to denote that we won't block the release on this.
Confirmed with latest oc client, can't reproduce the issue now: [root@dhcp-140-138 ~]# oc version --client -o yaml clientVersion: buildDate: "2021-01-06T04:18:42Z" compiler: gc gitCommit: d69d7c45db12728241a16411bf81d534fbcad7c4 gitTreeState: clean gitVersion: 4.7.0-202101060325.p0-d69d7c4 goVersion: go1.15.5 major: "" minor: "" platform: linux/amd64 [root@dhcp-140-138 ~]# oc debug po/openshift-kube-scheduler-ip-1xxxx.compute.internal -c wait-for-host-port .... If you don't see a command prompt, try pressing enter. sh-4.4# exit exit Removing debug pod ...
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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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/RHSA-2020:5633