Bug 1845457
| Summary: | File restoration doesn't work as expected when it is not owned by an rpm but available in /usr/etc/ | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | OpenShift BugZilla Robot <openshift-bugzilla-robot> |
| Component: | Machine Config Operator | Assignee: | Sinny Kumari <skumari> |
| Status: | CLOSED ERRATA | QA Contact: | Micah Abbott <miabbott> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.6 | CC: | amurdaca, jerzhang, miabbott, walters |
| Target Milestone: | --- | ||
| Target Release: | 4.5.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: | 2020-07-13 17:43:40 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: | 1843974 | ||
| Bug Blocks: | 1845492 | ||
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, 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:2409 |
Verified with 4.5.0-0.nightly-2020-06-18-114733: ``` $ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.5.0-0.nightly-2020-06-18-114733 True False 2m27s Cluster version is 4.5.0-0.nightly-2020-06-18-114733 $ oc get nodes NAME STATUS ROLES AGE VERSION ip-10-0-128-94.us-west-2.compute.internal Ready worker 14m v1.18.3+91d0edd ip-10-0-138-65.us-west-2.compute.internal Ready master 23m v1.18.3+91d0edd ip-10-0-178-167.us-west-2.compute.internal Ready master 23m v1.18.3+91d0edd ip-10-0-178-71.us-west-2.compute.internal Ready worker 14m v1.18.3+91d0edd ip-10-0-208-127.us-west-2.compute.internal Ready master 24m v1.18.3+91d0edd ip-10-0-214-255.us-west-2.compute.internal Ready worker 14m v1.18.3+91d0edd ``` Check original file on node: ``` $ oc debug node/ip-10-0-128-94.us-west-2.compute.internal Starting pod/ip-10-0-128-94us-west-2computeinternal-debug ... To use host binaries, run `chroot /host` Pod IP: 10.0.128.94 If you don't see a command prompt, try pressing enter. sh-4.2# chroot /host sh-4.4# cat /etc/iscsi/initiatorname.iscsi InitiatorName=iqn.1994-05.com.redhat:3b31b0d08931 sh-4.4# rpm -qf /etc/iscsi/initiatorname.iscsi file /etc/iscsi/initiatorname.iscsi is not owned by any package sh-4.4# exit exit sh-4.2# exit exit Removing debug pod ... ``` Create MC and apply: ``` $ 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 $ oc create -f iscsi-mc.yaml machineconfig.machineconfiguration.openshift.io/99-iscsi-initiator created $ oc get mc NAME GENERATEDBYCONTROLLER IGNITIONVERSION AGE 00-master f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m 00-worker f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m 01-master-container-runtime f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m 01-master-kubelet f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m 01-worker-container-runtime f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m 01-worker-kubelet f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m 99-iscsi-initiator 2.2.0 11s 99-master-946f070c-9566-42e1-884e-3f8b272c67d3-registries f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m 99-master-ssh 2.2.0 32m 99-worker-529cae59-8a78-4eb9-8b8b-31893150c553-registries f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m 99-worker-ssh 2.2.0 32m rendered-master-01acfbc1d243b63a18878994e2359610 f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m rendered-worker-14ff1846ac0713cfb30cd1cbcf9d6b0d f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 23m rendered-worker-e3d6d8734c82cd939fbb2480e705ea59 f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 6s $ oc get mcp NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE master rendered-master-01acfbc1d243b63a18878994e2359610 True False False 3 3 3 0 24m worker rendered-worker-14ff1846ac0713cfb30cd1cbcf9d6b0d False True False 3 0 0 0 24m ``` Check node for new file content: ``` $ oc debug node/ip-10-0-128-94.us-west-2.compute.internal Starting pod/ip-10-0-128-94us-west-2computeinternal-debug ... To use host binaries, run `chroot /host` Pod IP: 10.0.128.94 If you don't see a command prompt, try pressing enter. sh-4.2# chroot /host sh-4.4# cat /etc/iscsi/initiatorname.iscsi InitiatorName=iqn.1994-05.com.nutanix:k8s-worker sh-4.4# exit exit sh-4.2# exit exit Removing debug pod ... ``` Delete MC and check node again: ``` $ oc delete mc/99-iscsi-initiator machineconfig.machineconfiguration.openshift.io "99-iscsi-initiator" deleted $ oc get mc NAME GENERATEDBYCONTROLLER IGNITIONVERSION AGE 00-master f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m 00-worker f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m 01-master-container-runtime f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m 01-master-kubelet f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m 01-worker-container-runtime f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m 01-worker-kubelet f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m 99-master-946f070c-9566-42e1-884e-3f8b272c67d3-registries f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m 99-master-ssh 2.2.0 40m 99-worker-529cae59-8a78-4eb9-8b8b-31893150c553-registries f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m 99-worker-ssh 2.2.0 40m rendered-master-01acfbc1d243b63a18878994e2359610 f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m rendered-worker-14ff1846ac0713cfb30cd1cbcf9d6b0d f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 30m rendered-worker-e3d6d8734c82cd939fbb2480e705ea59 f155fb8add7f3f12da39eef6a0d3a7634443d525 2.2.0 7m33s $ oc get mcp NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE master rendered-master-01acfbc1d243b63a18878994e2359610 True False False 3 3 3 0 31m worker rendered-worker-e3d6d8734c82cd939fbb2480e705ea59 False True False 3 0 0 0 31m $ oc get mcp NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE master rendered-master-01acfbc1d243b63a18878994e2359610 True False False 3 3 3 0 37m worker rendered-worker-14ff1846ac0713cfb30cd1cbcf9d6b0d True False False 3 3 3 0 37m $ oc debug node/ip-10-0-128-94.us-west-2.compute.internal Starting pod/ip-10-0-128-94us-west-2computeinternal-debug ... To use host binaries, run `chroot /host` Pod IP: 10.0.128.94 If you don't see a command prompt, try pressing enter. sh-4.2# chroot /host sh-4.4# cat /etc/iscsi/initiatorname.iscsi InitiatorName=iqn.1994-05.com.redhat:3b31b0d08931 sh-4.4# exit exit sh-4.2# exit exit Removing debug pod ... ```