-
Notifications
You must be signed in to change notification settings - Fork 377
cgroup, systemd: do not override devices on update #1614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if the resources configuration on update does not contain any information on devices, do not change the current configuration. Fixes: https://issues.redhat.com/browse/OCPBUGS-45394 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This patch works as expected. $ cat kubelet-config.yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
name: cpumanager
spec:
machineConfigPoolSelector:
matchLabels:
pools.operator.machineconfiguration.openshift.io/worker: ""
kubeletConfig:
cpuManagerPolicy: "static"
cpuManagerReconcilePeriod: "5s"
reservedSystemCPUs: "0,1"
systemReserved:
cpu: "1"
memory: "1Gi"
kubeReserved:
cpu: "1"
memory: "1Gi"
tuning:
- name: cpu
tuningSet:
reservedCores: "0,1"
$ oc apply -f kubelet-config.yaml
kubeletconfig.machineconfiguration.openshift.io/cpumanager created
$ oc get nodes
NAME STATUS ROLES AGE VERSION
ci-ln-7c5d6bb-72292-x4xqq-master-0 Ready control-plane,master 125m v1.31.3
ci-ln-7c5d6bb-72292-x4xqq-master-1 Ready control-plane,master 125m v1.31.3
ci-ln-7c5d6bb-72292-x4xqq-master-2 Ready control-plane,master 125m v1.31.3
ci-ln-7c5d6bb-72292-x4xqq-worker-a-97gpq Ready worker 115m v1.31.3
ci-ln-7c5d6bb-72292-x4xqq-worker-b-ctwsj Ready worker 115m v1.31.3
ci-ln-7c5d6bb-72292-x4xqq-worker-c-8qxj6 Ready worker 115m v1.31.3
$ oc debug node/ci-ln-7c5d6bb-72292-x4xqq-worker-a-97gpq
Starting pod/ci-ln-7c5d6bb-72292-x4xqq-worker-a-97gpq-debug ...
To use host binaries, run `chroot /host`
Pod IP: 10.0.128.2
If you don't see a command prompt, try pressing enter.
sh-5.1# chroot /host
sh-5.1# rpm-ostree override replace /tmp/crun-1.18.2-1.rhaos4.18.el9.x86_64.rpm
⠁ Checking out tree 2d2d736... ⠁ Checking out tree 2d2d736... ⠉ Checking out tree 2d2d736... ⠙ Checking out tree 2d2d736... ⠚ Checking out tree 2d2d736... ⠒ Checking out tree 2d2d736... ⠂ Checking out tree 2d2d736... ⠂ Checking out tree 2d2d736... ⠒ Checking out tree 2d2d736... ⠲ Checking out tree 2d2d736... ⠴ Checking out tree 2d2d736... ⠤ Checking out tree 2d2d736... ⠄ Checking out tree 2d2d736... ⠄ Checking out tree 2d2d736... ⠤ Checking out tree 2d2d736...
oc get mc
NAME GENERATEDBYCONTROLLER IGNITIONVERSION AGE
00-master c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
00-worker c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
01-master-container-runtime c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
01-master-kubelet c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
01-worker-container-runtime c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
01-worker-kubelet c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
97-master-generated-kubelet c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
97-worker-generated-kubelet c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
98-master-generated-kubelet c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
98-worker-generated-kubelet c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
99-master-generated-registries c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
99-master-ssh 3.2.0 144m
99-worker-generated-kubelet c761b7cabfe50839e573299b02de148559e652eb 3.4.0 5s
99-worker-generated-registries c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
99-worker-ssh 3.2.0 144m
rendered-master-d4ea012541bd7ae94795f0a44bae3e75 c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
rendered-worker-068a57ca332c37d6931274039ad094fa c761b7cabfe50839e573299b02de148559e652eb 3.4.0 139m
rendered-worker-62682956c277aec76d1c218aada61265 c761b7cabfe50839e573299b02de148559e652eb 3.4.0 0s
$ oc get kubeletconfig
NAME AGE
cpumanager 47s
$ oc debug node/ci-ln-7c5d6bb-72292-x4xqq-worker-a-97gpq
Starting pod/ci-ln-7c5d6bb-72292-x4xqq-worker-a-97gpq-debug ...
To use host binaries, run `chroot /host`
Pod IP: 10.0.128.2
If you don't see a command prompt, try pressing enter.
sh-5.1# chroot /host
sh-5.1# blockdev --getsz /dev/sda
268435456
sh-5.1# crun --version
crun version 1.18.2
commit: 00ab38af875ddd0d1a8226addda52e1de18339b5
rundir: /run/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
sh-5.1# which crun
/usr/bin/crun
sh-5.1# crun --version
crun version 1.18.2
commit: 00ab38af875ddd0d1a8226addda52e1de18339b5
rundir: /run/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
sh-5.1# rpm-ostree status
State: idle
Deployments:
* ostree-unverified-registry:quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5ff97a6786cc3576f2a8363f535875a800d97f2a2d6025a0d633499aa989af4d
Digest: sha256:5ff97a6786cc3576f2a8363f535875a800d97f2a2d6025a0d633499aa989af4d
Version: 418.94.202412050001-0 (2024-12-05T00:06:11Z)
LocalOverrides: crun 1.18.2-1.rhaos4.17.el9 -> 1.18.2-1.rhaos4.18.el9
sh-5.1# exit Here's the patched rpm: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=66125550 |
sohankunkerkar
approved these changes
Dec 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/approve |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
if the resources configuration on update does not contain any information on devices, do not change the current configuration.
Fixes: https://issues.redhat.com/browse/OCPBUGS-45394