Description of problem:
In some situation original file doesn't get restored while they are available in /usr/etc/.
Reproducible when try to modify a file available in /usr/etc/ and /etc/ but not owned by any rpm.
Steps to Reproduce:
1. Install a 4.6 or older version cluster (also observed on 4.3). Get shell access into one of the worker node. Notice that /etc/iscsi/initiatorname.iscsi and /usr/etc/initiatorname.iscsi both exist but not owned by any rpm package.
$ rpm -qf /etc/iscsi/initiatorname.iscsi
file /etc/iscsi/initiatorname.iscsi is not owned by any package
2. Create following Machinconfig
$ cat iscsi-mc.yaml
2. Apply the Machinconfig by running `oc create -f iscsi-mc.yaml`
3. MachineConfig is successfully applied on worker node, can be verified by getting access to one of worker node and check content of /etc/iscsi/initiatorname.iscsi
3. Now delete the applied MachineConfig by running `oc delete mc 99-iscsi-initiator`
4. Observe the MCD log and will see in the log
"Deleting stale config file: /etc/iscsi/initiatorname.iscsi"
/etc/iscsi/initiatorname.iscsi gets restored with file content available in /usr/etc/iscsi/initiatorname.iscsi
Tested with 4.6.0-0.nightly-2020-06-17-180933 with the steps mentioned. Can confirm that the file was correctly restored after MC is deleted.
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 (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.