Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1845492

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: Sinny Kumari <skumari>
Component: Machine Config OperatorAssignee: Sinny Kumari <skumari>
Status: CLOSED ERRATA QA Contact: Michael Nguyen <mnguyen>
Severity: high Docs Contact:
Priority: high    
Version: 4.4CC: amurdaca, kgarriso, mnguyen, walters
Target Milestone: ---   
Target Release: 4.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1843974 Environment:
Last Closed: 2020-07-21 10:31:06 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: 1845457    
Bug Blocks: 1845494    

Comment 5 Michael Nguyen 2020-07-10 19:05:43 UTC
Verified on 4.4.0-0.nightly-2020-07-10-113925



$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.4.0-0.nightly-2020-07-10-113925   True        False         122m    Cluster version is 4.4.0-0.nightly-2020-07-10-113925
$ oc get node
NAME                                         STATUS   ROLES    AGE    VERSION
ip-10-0-129-214.us-west-2.compute.internal   Ready    worker   101m   v1.17.1+b8568b3
ip-10-0-136-187.us-west-2.compute.internal   Ready    master   111m   v1.17.1+b8568b3
ip-10-0-167-13.us-west-2.compute.internal    Ready    master   111m   v1.17.1+b8568b3
ip-10-0-179-148.us-west-2.compute.internal   Ready    worker   101m   v1.17.1+b8568b3
ip-10-0-218-79.us-west-2.compute.internal    Ready    master   112m   v1.17.1+b8568b3
ip-10-0-222-123.us-west-2.compute.internal   Ready    worker   101m   v1.17.1+b8568b3
$ oc debug node/ip-10-0-129-214.us-west-2.compute.internal
Starting pod/ip-10-0-129-214us-west-2computeinternal-debug ...
To use host binaries, run `chroot /host`
If you don't see a command prompt, try pressing enter.
sh-4.2# chroot /host
sh-4.4# ls /etc/iscsi/initiatorname.iscsi 
/etc/iscsi/initiatorname.iscsi
sh-4.4# cat /etc/iscsi/initiatorname.iscsi 
InitiatorName=iqn.1994-05.com.redhat:6ceff1ad2a
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 ...
$ cat << EOF > 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
> EOF
$ oc create -f iscsi-mc.yaml 
machineconfig.machineconfiguration.openshift.io/99-iscsi-initiator created
$ oc get mc
NAME                                                        GENERATEDBYCONTROLLER                      IGNITIONVERSION   AGE
00-master                                                   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
00-worker                                                   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
01-master-container-runtime                                 601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
01-master-kubelet                                           601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
01-worker-container-runtime                                 601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
01-worker-kubelet                                           601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
99-iscsi-initiator                                                                                     2.2.0             9s
99-master-935773d3-4661-426b-87bc-2aab21a726d5-registries   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
99-master-ssh                                                                                          2.2.0             116m
99-worker-0b441796-7cf8-443f-92c1-c8010f64a6c2-registries   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
99-worker-ssh                                                                                          2.2.0             116m
rendered-master-a455e300199b914dd6085709e374616b            601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
rendered-worker-773781ae3d6c099d1c0ee9b0dce3aaad            601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             115m
rendered-worker-a39bf5e00544c3c9ea41b18078efa767            601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             4s
$ oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
master   rendered-master-a455e300199b914dd6085709e374616b   True      False      False      3              3                   3                     0                      116m
worker   rendered-worker-773781ae3d6c099d1c0ee9b0dce3aaad   False     True       False      3              0                   0                     0                      116m

$ oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
master   rendered-master-a455e300199b914dd6085709e374616b   True      False      False      3              3                   3                     0                      123m
worker   rendered-worker-a39bf5e00544c3c9ea41b18078efa767   True      False      False      3              3                   3                     0                      123m
$ oc debug node/ip-10-0-129-214.us-west-2.compute.internal
Starting pod/ip-10-0-129-214us-west-2computeinternal-debug ...
To use host binaries, run `chroot /host`
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 ...
$ oc get mc
NAME                                                        GENERATEDBYCONTROLLER                      IGNITIONVERSION   AGE
00-master                                                   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
00-worker                                                   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
01-master-container-runtime                                 601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
01-master-kubelet                                           601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
01-worker-container-runtime                                 601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
01-worker-kubelet                                           601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
99-iscsi-initiator                                                                                     2.2.0             8m49s
99-master-935773d3-4661-426b-87bc-2aab21a726d5-registries   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
99-master-ssh                                                                                          2.2.0             124m
99-worker-0b441796-7cf8-443f-92c1-c8010f64a6c2-registries   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
99-worker-ssh                                                                                          2.2.0             124m
rendered-master-a455e300199b914dd6085709e374616b            601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
rendered-worker-773781ae3d6c099d1c0ee9b0dce3aaad            601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
rendered-worker-a39bf5e00544c3c9ea41b18078efa767            601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             8m44s
$ oc delete mc/99-iscsi-initiator
machineconfig.machineconfiguration.openshift.io "99-iscsi-initiator" deleted
$ oc get mc
NAME                                                        GENERATEDBYCONTROLLER                      IGNITIONVERSION   AGE
00-master                                                   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
00-worker                                                   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
01-master-container-runtime                                 601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
01-master-kubelet                                           601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
01-worker-container-runtime                                 601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
01-worker-kubelet                                           601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
99-master-935773d3-4661-426b-87bc-2aab21a726d5-registries   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
99-master-ssh                                                                                          2.2.0             125m
99-worker-0b441796-7cf8-443f-92c1-c8010f64a6c2-registries   601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
99-worker-ssh                                                                                          2.2.0             125m
rendered-master-a455e300199b914dd6085709e374616b            601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
rendered-worker-773781ae3d6c099d1c0ee9b0dce3aaad            601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             124m
rendered-worker-a39bf5e00544c3c9ea41b18078efa767            601c2285f497bf7c73d84737b9977a0e697cb86a   2.2.0             9m6s
$ oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
master   rendered-master-a455e300199b914dd6085709e374616b   True      False      False      3              3                   3                     0                      125m
worker   rendered-worker-a39bf5e00544c3c9ea41b18078efa767   True      False      False      3              3                   3                     0                      125m
$ oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
master   rendered-master-a455e300199b914dd6085709e374616b   True      False      False      3              3                   3                     0                      125m
worker   rendered-worker-a39bf5e00544c3c9ea41b18078efa767   False     True       False      3              0                   0                     0                      125m

$ oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
master   rendered-master-a455e300199b914dd6085709e374616b   True      False      False      3              3                   3                     0                      140m
worker   rendered-worker-773781ae3d6c099d1c0ee9b0dce3aaad   True      False      False      3              3                   3                     0                      140m
$ oc debug node/ip-10-0-129-214.us-west-2.compute.internal
Starting pod/ip-10-0-129-214us-west-2computeinternal-debug ...
To use host binaries, run `chroot /host`
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:6ceff1ad2a
sh-4.4# exit
exit
sh-4.2# exit
exit

Removing debug pod ...
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.4.0-0.nightly-2020-07-10-113925   True        False         122m    Cluster version is 4.4.0-0.nightly-2020-07-10-113925

Comment 7 errata-xmlrpc 2020-07-21 10:31:06 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, 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:2913