Bug 2072957 - ContainerCreateError loop leads to several thousand empty logfiles in the file system
Summary: ContainerCreateError loop leads to several thousand empty logfiles in the fil...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.11.0
Assignee: Peter Hunt
QA Contact: MinLi
URL:
Whiteboard:
: 2052450 (view as bug list)
Depends On:
Blocks: 2088478 2088480 2088482
TreeView+ depends on / blocked
 
Reported: 2022-04-07 10:49 UTC by Rainer Beyel
Modified: 2022-08-10 11:04 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2088478 (view as bug list)
Environment:
Last Closed: 2022-08-10 11:04:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github cri-o cri-o pull 5800 0 None Merged oci: cleanup log path if the container failed to create 2022-06-07 15:57:30 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:04:59 UTC

Description Rainer Beyel 2022-04-07 10:49:18 UTC
Description of problem:
  We see deployments in our production clusters being stuck in a `ContainerCreateError` loop which leads to hundreds/thousands of empty logfiles in the filesystem which then again leads to high memory/cpu load and open file handles on the log ingester process which ultimately leads to severe performance and stability issues on the cluster node itself, if not mitigated fast by manually scaling down the rogue deployment.

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

How reproducible:

# cat troubleshoot_CreateContainerError.yml 
apiVersion: v1
kind: Pod
metadata:
 name: demo-pod
spec:
 containers:
 - name: demo-container
   image: quay.io/bitnami/nginx
   command: ["/bin/bla"]
   resources:
     limits:
       memory: "100Mi"
       cpu: "1"
     requests:
       memory: "100Mi"
       cpu: "1"

# oc apply -f troubleshoot_CreateContainerError.yml
...

# oc get pods
NAME                              READY   STATUS                 RESTARTS     AGE
demo-pod                          0/1     CreateContainerError   0            24m

[core@xxxx ~]$ find /var/log/pods -type f | grep demo-pod
/var/log/pods/rainer_demo-pod_e964ff25-07f9-40ec-89da-1b378ea2fb89/1ebb9bcde6fcdc87d049eeacfb8448bfe165499a486001b97b4b0a043081ea5f.log
/var/log/pods/rainer_demo-pod_e964ff25-07f9-40ec-89da-1b378ea2fb89/demo-container/0.log
...
/var/log/pods/rainer_demo-pod_e964ff25-07f9-40ec-89da-1b378ea2fb89/demo-container/10.log
...
/var/log/pods/rainer_demo-pod_e964ff25-07f9-40ec-89da-1b378ea2fb89/demo-container/40.log
...


Actual results:
  - "ContainerCreateError" loop which leads to hundreds/thousands of empty logfiles in the filesystem
  - Which then again leads to high memory/cpu load and open file handles on the log ingester process
  - Which ultimately leads to severe performance and stability issues on the cluster node itself
  - If not mitigated fast by manually scaling down the rogue deployment

Expected results:
  - No empty logfiles are created
  - No severe performance and stability issues

Additional info:
  Creating this new bug as erratum from bug 2060494 doesn't solve the issue.
  Reference: Initially bug 2052450 was created, which was CLOSED DUPLICATE of bug 2042175, which was CLOSED DUPLICATE of bug 2060494, which resulted in an erratum, erratum doesn't fix the issue.

Comment 9 Ryan Phillips 2022-04-13 18:01:43 UTC
*** Bug 2052450 has been marked as a duplicate of this bug. ***

Comment 17 MinLi 2022-05-11 08:55:50 UTC
verified!

% oc get clusterversion 
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-0.nightly-2022-05-10-182617   True        False         85m     Cluster version is 4.10.0-0.nightly-2022-05-10-182617

% oc get pod
NAME                                            READY   STATUS                 RESTARTS   AGE
demo-pod                                        0/1     CreateContainerError   0          6m49s

sh-4.4# find /var/log/pods/ -type f | grep demo
sh-4.4# 

when ContainerCreateError loop, not generate any empty logfiles.

Comment 34 errata-xmlrpc 2022-08-10 11:04:38 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security 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-2022:5069


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