Hide Forgot
Description of problem: In some situation original file doesn't get restored while they are available in /usr/etc/. How reproducible: 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 apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: worker name: 99-iscsi-initiator spec: config: ignition: version: 2.2.0 storage: files: - contents: source: data:text/plain;charset=utf-8;base64,SW5pdGlhdG9yTmFtZT1pcW4uMTk5NC0wNS5jb20ubnV0YW5peDprOHMtd29ya2VyCg== filesystem: root mode: 420 path: /etc/iscsi/initiatorname.iscsi 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" Expected results: /etc/iscsi/initiatorname.iscsi gets restored with file content available in /usr/etc/iscsi/initiatorname.iscsi
Related https://github.com/open-iscsi/open-iscsi/pull/207
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. https://access.redhat.com/errata/RHBA-2020:4196