Bug 2090929

Summary: [etcd] cluster-backup.sh script has a conflict to use the '/etc/kubernetes/static-pod-certs' folder if a custom API certificate is defined
Product: OpenShift Container Platform Reporter: Vincent Lours <vlours>
Component: EtcdAssignee: Vincent Lours <vlours>
Status: CLOSED ERRATA QA Contact: ge liu <geliu>
Severity: high Docs Contact:
Priority: high    
Version: 4.11CC: geliu, tjungblu
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:14:36 UTC Type: Bug
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: 2095114    

Description Vincent Lours 2022-05-27 01:04:32 UTC
Description of problem:
the cluster-backup.sh script has a conflict to use the '/etc/kubernetes/static-pod-certs' folder if a custom API certificate is defined 

Version-Release number of selected component (if applicable):
From the current GitHub repo, this issue seems to impact all current versions.

How reproducible:
Easily

Steps to Reproduce:
1. Define a custom API certificate in the kube-apiserver config (oc edit apiserver cluste)
2. Wait for the certificate to be deployed.
3. Then running the `cluster-backup.sh` will fail as the folder **/etc/kubernetes/static-pod-certs** is already created.

Actual results:
the `etcdctl snapshot save` command failed with the error message:
~~~
  Error: open /etc/kubernetes/static-pod-certs/secrets/etcd-all-certs/etcd-peer-<nodename>.crt: no such file or directory
~~~
Expected results:
Backup to be successful.


Additional info:

Comment 14 errata-xmlrpc 2022-08-10 11:14:36 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