Bug 2085245

Summary: Avoid update races between old and new NTO operands during cluster upgrades
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: Node Tuning OperatorAssignee: Jiří Mencák <jmencak>
Status: CLOSED ERRATA QA Contact: liqcui
Severity: high Docs Contact:
Priority: high    
Version: 4.9CC: dagray, liqcui
Target Milestone: ---   
Target Release: 4.8.z   
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: 2022-06-01 21:18:03 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: 2083482    
Bug Blocks:    

Comment 2 liqcui 2022-05-24 11:20:58 UTC
Verified Result:
ocpadmin@ec2-18-217-45-133 openshift-tests-private]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2022-05-24-040123   True        False         112m    Cluster version is 4.8.0-0.nightly-2022-05-24-040123
[ocpadmin@ec2-18-217-45-133 openshift-tests-private]$ oc scale deploy/cluster-version-operator --replicas=0 -n openshift-cluster-version
deployment.apps/cluster-version-operator scaled
[ocpadmin@ec2-18-217-45-133 openshift-tests-private]$ oc project openshift-cluster-node-tuning-operator
Now using project "openshift-cluster-node-tuning-operator" on server "https://api.liqcui-oc411ngtc.qe.gcp.devcluster.openshift.com:6443".
[ocpadmin@ec2-18-217-45-133 openshift-tests-private]$ oc create -f- <<'EOF'
> apiVersion: machineconfiguration.openshift.io/v1
> kind: MachineConfigPool
> metadata:
>   name: worker-rt
>   labels:
>     worker-rt: ""
> spec:
>   machineConfigSelector:
>     matchExpressions:
>       - {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,worker-rt]}
>   nodeSelector:
>     matchLabels:
>       node-role.kubernetes.io/worker-rt: ""
> EOF
machineconfigpool.machineconfiguration.openshift.io/worker-rt created
 
[ocpadmin@ec2-18-217-45-133 openshift-tests-private]$ oc -n openshift-machine-api machineset liqcui-oc411ngtc-vk7ww-worker-b --replicas=2
flags cannot be placed before plugin name: -n
[ocpadmin@ec2-18-217-45-133 openshift-tests-private]$ oc -n openshift-machine-api scale machineset liqcui-oc411ngtc-vk7ww-worker-b --replicas=2
machineset.machine.openshift.io/liqcui-oc411ngtc-vk7ww-worker-b scaled
[ocpadmin@ec2-18-217-45-133 openshift-tests-private]$ oc -n openshift-machine-api scale machineset liqcui-oc411ngtc-vk7ww-worker-c --replicas=2
machineset.machine.openshift.io/liqcui-oc411ngtc-vk7ww-worker-c scaled
[ocpadmin@ec2-18-217-45-133 openshift-tests-private]$ oc create -f- <<'EOF'
> apiVersion: tuned.openshift.io/v1
> kind: Tuned
> metadata:
>   name: openshift-tuned-fight
>   namespace: openshift-cluster-node-tuning-operator
> spec:
>   profile:
>   - data: |
>       [main]
>       summary=Custom OpenShift profile
>       [bootloader]
>       cmdline=+trigger_tuned_fight=${f:exec:/usr/bin/bash:-c:echo $RELEASE_VERSION}
>     name: openshift-tuned-fight
> 
>   recommend:
>   - machineConfigLabels:
>       machineconfiguration.openshift.io/role: "worker-rt"
>     priority: 20
>     profile: openshift-tuned-fight
> EOF
tuned.tuned.openshift.io/openshift-tuned-fight created
[ocpadmin@ec2-18-217-45-133 openshift-tests-private]$ for n in $(oc get no --selector=node-role.kubernetes.io/worker -o name) ; do oc label $n node-role.kubernetes.io/worker-rt= ; done
node/liqcui-oc411ngtc-vk7ww-worker-a-7b27p.c.openshift-qe.internal labeled
node/liqcui-oc411ngtc-vk7ww-worker-b-nx94x.c.openshift-qe.internal labeled
node/liqcui-oc411ngtc-vk7ww-worker-b-z7ps4.c.openshift-qe.internal labeled
node/liqcui-oc411ngtc-vk7ww-worker-c-fd2l8.c.openshift-qe.internal labeled
node/liqcui-oc411ngtc-vk7ww-worker-c-r876c.c.openshift-qe.internal labeled

 oc logs -f cluster-node-tuning-operator-58cf6774b6-zwvdr| grep 'kernel parameters'
I0524 11:08:16.112133       1 controller.go:715] updated MachineConfig 50-nto-worker-rt with kernel parameters: [trigger_tuned_fight=bz-verify4.8.0-0.nightly-2022-05-24-04012]

Comment 5 errata-xmlrpc 2022-06-01 21:18:03 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.8.42 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-2022:4737