-
Bug
-
Resolution: Done
-
Undefined
-
openshift-4.13
-
None
-
False
-
False
-
None
Add different cpus worker node into the same mcp, you will see the warn message "Profiles with bootcmdline conflict" when executing <oc get co/node-tuning>, the message will disappear when removing one worker node from mcp. but sometime the warn message won't disappear.
How to re-produce the issue:
- label current one worker node as <node-role.kubernetes.io/worker-diffcpus=> as first node
- add a new machineset MACHINE_SET=`oc get machineset -n openshift-machine-api |grep worker | awk '{print $1}' | sort | tail -1`
oc get machineset $MACHINE_SET -n openshift-machine-api -o json>./differnode.json
cat ./differnode.json |grep $MACHINE_SET
echo "Replace name "
sed -i "s/$MACHINE_SET/openshift-psap-qe-gpu-node01/g"./differnode.json
grep openshift-psap-qe-gpu-node01 ./differnode.json
sed -i 's/"instanceType":.*/"instanceType": "m6i.2xlarge",/' ./differnode.json
sed -i 's/"replicas": 2,/"replicas": 1,/' ./differnode.json
grep instanceType ./differnode.json
oc get machines -n openshift-machine-api |grep m6i.2xlarge - oc create -f ./differnode.json
- label the new worker node as <node-role.kubernetes.io/worker-diffcpus=> as second worker node
- Create mcp
- oc apply
f<<EOF
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: worker-diffcpus
labels:
worker-diffcpus: ""
spec:
machineConfigSelector:
matchExpressions:
- {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,worker-diffcpus]}
nodeSelector:
matchLabels:
node-role.kubernetes.io/worker-diffcpus: ""
EOF - Create custom profile
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
name: openshift-bootcmdline-cpu
namespace: openshift-cluster-node-tuning-operator
spec:
profile:
- data: |
[main]
summary=Custom OpenShift profile
[bootloader]
cmdline=+cpus=${f:exec:/usr/bin/bash:-c:nproc|tr -d '\n'}
name: openshift-bootcmdline-cpu
recommend:
- machineConfigLabels:
machineconfiguration.openshift.io/role: "worker-diffcpus"
priority: 20
profile: openshift-bootcmdline-cpu
- check NTO operator pod and oc get co/node-tuning, you will see the WARN message "Profiles with bootcmdline conflict"
- unlabel second worker. It will remove from mcp
- wait for status of mcp is ready
- unabel first worker node and wait for mcp is ready
- delete mcp
- Repeat step 1-12 again, the warn message "Profiles with bootcmdline conflict" will not disappear when executing oc get co/node-tuning