Bug 1898954

Summary: Backup script does not take /etc/kubernetes/static-pod-resources on a reliable way
Product: OpenShift Container Platform Reporter: Andreas Nowak <anowak>
Component: EtcdAssignee: Suresh Kolichala <skolicha>
Status: CLOSED ERRATA QA Contact: ge liu <geliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: aygarg, jkaur, mjahangi, skolicha
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Backup script uses last modified timestamp to determine the latest revision. Consequence: Incorrect static pod resources stored in the backup. Fix: Use a reliable way to determine the latest revision by looking into the manifest files. Result: Correct static pod resources are stored in the backup.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:34:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1905566    

Comment 8 aygarg 2021-01-22 09:28:10 UTC
Hello Suresh,

In one of the case, I got the same error while restoring the ETCD backup.

~~~
tar: *restore-etcd-pod/pod.yaml: Not found in archive
tar: Exiting with failure status due to previous errors
~~~

After that the ETCD is completely down and due to that we can't even follow the below workaround.

~~~
$ oc debug node/master-0.example.com
sh-4.2# chroot /host
sh-4.4# touch $(crictl inspect $(crictl ps --name etcd$ -q) | jq -r '.status.mounts | .[] | select (.containerPath=="/etc/kubernetes/static-pod-resources") | .hostPath')
~~~

Is there any method or steps to fix this now? Will it work if we manually untar the backup and create the missing file with proper contents?

Regards,
Ayush Garg

Comment 11 errata-xmlrpc 2021-02-24 15:34:18 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 (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