Bug 1845494 - File restoration doesn't work as expected when it is not owned by an rpm but available in /usr/etc/
Summary: File restoration doesn't work as expected when it is not owned by an rpm but ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Machine Config Operator
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.3.z
Assignee: Sinny Kumari
QA Contact: Michael Nguyen
URL:
Whiteboard:
Depends On: 1845492
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-09 11:40 UTC by Sinny Kumari
Modified: 2020-08-05 10:54 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1843974
Environment:
Last Closed: 2020-08-05 10:54:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 1796 0 None closed Bug 1845494: daemon: fix restoring file logic to avoid unnecessary deletion 2020-08-17 07:38:21 UTC
Red Hat Product Errata RHBA-2020:3180 0 None None None 2020-08-05 10:54:34 UTC

Comment 5 Michael Nguyen 2020-07-27 17:54:15 UTC
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.3.0-0.nightly-2020-07-25-094223   True        False         19m     Cluster version is 4.3.0-0.nightly-2020-07-25-094223
$ oc get node
NAME                                         STATUS   ROLES    AGE   VERSION
ip-10-0-130-138.us-west-2.compute.internal   Ready    master   45m   v1.16.2+117aea2
ip-10-0-140-254.us-west-2.compute.internal   Ready    worker   33m   v1.16.2+117aea2
ip-10-0-148-188.us-west-2.compute.internal   Ready    master   46m   v1.16.2+117aea2
ip-10-0-157-39.us-west-2.compute.internal    Ready    worker   34m   v1.16.2+117aea2
ip-10-0-160-177.us-west-2.compute.internal   Ready    master   46m   v1.16.2+117aea2
ip-10-0-175-5.us-west-2.compute.internal     Ready    worker   34m   v1.16.2+117aea2
$ oc debug node/ip-10-0-175-5.us-west-2.compute.internal
Starting pod/ip-10-0-175-5us-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# 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   CREATED
00-master                                                   55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
00-worker                                                   55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
01-master-container-runtime                                 55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
01-master-kubelet                                           55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
01-worker-container-runtime                                 55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
01-worker-kubelet                                           55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
99-iscsi-initiator                                                                                     2.2.0             4s
99-master-0fc3212b-dd10-41e3-b2e8-de636df1df24-registries   55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
99-master-ssh                                                                                          2.2.0             47m
99-worker-0abeec28-a55a-4f00-a9e1-31efc068eb16-registries   55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
99-worker-ssh                                                                                          2.2.0             47m
rendered-master-e02ee38642fd62bb971b1a349cfcfc40            55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
rendered-worker-f0a26b781d6da9e91ff4a498a58f68a9            55f7317224e7d8badc98879662771a14185e5739   2.2.0             46m
$ oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT
master   rendered-master-e02ee38642fd62bb971b1a349cfcfc40   True      False      False      3              3                   3                     0
worker   rendered-worker-f0a26b781d6da9e91ff4a498a58f68a9   False     True       False      3              0                   0                     0
$ watch oc get node
$ oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT
master   rendered-master-e02ee38642fd62bb971b1a349cfcfc40   True      False      False      3              3                   3                     0
worker   rendered-worker-cd042c42f525401ea0a31368331fe8ee   True      False      False      3              3                   3                     0
$ oc get mc
NAME                                                        GENERATEDBYCONTROLLER                      IGNITIONVERSION   CREATED
00-master                                                   55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
00-worker                                                   55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
01-master-container-runtime                                 55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
01-master-kubelet                                           55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
01-worker-container-runtime                                 55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
01-worker-kubelet                                           55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
99-iscsi-initiator                                                                                     2.2.0             49m
99-master-0fc3212b-dd10-41e3-b2e8-de636df1df24-registries   55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
99-master-ssh                                                                                          2.2.0             96m
99-worker-0abeec28-a55a-4f00-a9e1-31efc068eb16-registries   55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
99-worker-ssh                                                                                          2.2.0             96m
rendered-master-e02ee38642fd62bb971b1a349cfcfc40            55f7317224e7d8badc98879662771a14185e5739   2.2.0             95m
rendered-worker-cd042c42f525401ea0a31368331fe8ee            55f7317224e7d8badc98879662771a14185e5739   2.2.0             49m
rendered-worker-f0a26b781d6da9e91ff4a498a58f68a9            55f7317224e7d8badc98879662771a14185e5739   2.2.0             95m
$ oc debug node/ip-10-0-175-5.us-west-2.compute.internal
Starting pod/ip-10-0-175-5us-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 delete mc 99-iscsi-initiator
machineconfig.machineconfiguration.openshift.io "99-iscsi-initiator" deleted
$ oc get mc
NAME                                                        GENERATEDBYCONTROLLER                      IGNITIONVERSION   CREATED
00-master                                                   55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
00-worker                                                   55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
01-master-container-runtime                                 55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
01-master-kubelet                                           55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
01-worker-container-runtime                                 55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
01-worker-kubelet                                           55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
99-master-0fc3212b-dd10-41e3-b2e8-de636df1df24-registries   55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
99-master-ssh                                                                                          2.2.0             97m
99-worker-0abeec28-a55a-4f00-a9e1-31efc068eb16-registries   55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
99-worker-ssh                                                                                          2.2.0             97m
rendered-master-e02ee38642fd62bb971b1a349cfcfc40            55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
rendered-worker-cd042c42f525401ea0a31368331fe8ee            55f7317224e7d8badc98879662771a14185e5739   2.2.0             50m
rendered-worker-f0a26b781d6da9e91ff4a498a58f68a9            55f7317224e7d8badc98879662771a14185e5739   2.2.0             96m
$ oc get mcp/worker
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT
worker   rendered-worker-cd042c42f525401ea0a31368331fe8ee   False     True       False      3              0                   0                     0
$ watch oc get node
$ oc get mcp/worker
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT
worker   rendered-worker-f0a26b781d6da9e91ff4a498a58f68a9   True      False      False      3              3                   3                     0
$ oc debug node/ip-10-0-175-5.us-west-2.compute.internal
Starting pod/ip-10-0-175-5us-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:72f21b2b1788
sh-4.4# exit
exit
sh-4.2# exit
exit

Removing debug pod ...

Comment 7 errata-xmlrpc 2020-08-05 10:54: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 (OpenShift Container Platform 4.3.31 bug fix 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/RHBA-2020:3180


Note You need to log in before you can comment on or make changes to this bug.