Skip to content

Commit b32f074

Browse files
jmencakopenshift-cherrypick-robot
authored andcommitted
Do not cause kubelet failed dependency by ocp-tuned-one-shot.service
Change #1045 introduced systemd ocp-tuned-one-shot.service unit which runs and blocks kubelet. This service is important for reducing the number of Inter-processor interrupts interfering with low-latency workloads. In order to minimize the number of reboots, ocp-tuned-one-shot.service uses an environment file which references NTO image from the release payload. This way the unit file does not need to change when the release payload changes thus lowering the number of reboots due to lower number of MachineConfig changes. Unfortunately, this is not a good solution. Sometimes, the ocp-tuned-one-shot.service needs to be changed. When it needs to be changed and a power cut or a reboot happens between the time the environment file changes and the MachineConfig of the ocp-tuned-one-shot.service unit is updated, the ocp-tuned-one-shot.service may fail thus causing a failed dependency for the kubelet. Until we find to merge these machine configs into one or stop MCO treating these machine configs as separate, make the ocp-tuned-one-shot.service always succeed. Resolves: OCPBUGS-62940
1 parent b593115 commit b32f074

File tree

10 files changed

+20
-10
lines changed

10 files changed

+20
-10
lines changed

assets/performanceprofile/configs/ocp-tuned-one-shot.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RestartSec=5s
1818
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
1919
ExecStartPre=/bin/bash -c " \
2020
mkdir -p /run/tuned "
21-
ExecStart=/usr/bin/podman run \
21+
ExecStart=-/usr/bin/podman run \
2222
--rm \
2323
--name openshift-tuned \
2424
--privileged \
@@ -40,6 +40,7 @@ ExecStart=/usr/bin/podman run \
4040
--volume /sys:/sys:rslave \
4141
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
4242
$NTO_IMAGE
43+
ExecStart=/usr/bin/true
4344
Environment=PODMAN_SYSTEMD_UNIT=%n
4445
EnvironmentFile=/etc/mco/proxy.env
4546
EnvironmentFile=-/var/lib/ocp-tuned/image.env

test/e2e/performanceprofile/testdata/render-expected-output/bootstrap/extra-mcp/openshift-bootstrap-master_machineconfig.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ spec:
157157
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
158158
ExecStartPre=/bin/bash -c " \
159159
mkdir -p /run/tuned "
160-
ExecStart=/usr/bin/podman run \
160+
ExecStart=-/usr/bin/podman run \
161161
--rm \
162162
--name openshift-tuned \
163163
--privileged \
@@ -179,6 +179,7 @@ spec:
179179
--volume /sys:/sys:rslave \
180180
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
181181
$NTO_IMAGE
182+
ExecStart=/usr/bin/true
182183
Environment=PODMAN_SYSTEMD_UNIT=%n
183184
EnvironmentFile=/etc/mco/proxy.env
184185
EnvironmentFile=-/var/lib/ocp-tuned/image.env

test/e2e/performanceprofile/testdata/render-expected-output/bootstrap/extra-mcp/openshift-bootstrap-worker_machineconfig.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ spec:
157157
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
158158
ExecStartPre=/bin/bash -c " \
159159
mkdir -p /run/tuned "
160-
ExecStart=/usr/bin/podman run \
160+
ExecStart=-/usr/bin/podman run \
161161
--rm \
162162
--name openshift-tuned \
163163
--privileged \
@@ -179,6 +179,7 @@ spec:
179179
--volume /sys:/sys:rslave \
180180
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
181181
$NTO_IMAGE
182+
ExecStart=/usr/bin/true
182183
Environment=PODMAN_SYSTEMD_UNIT=%n
183184
EnvironmentFile=/etc/mco/proxy.env
184185
EnvironmentFile=-/var/lib/ocp-tuned/image.env

test/e2e/performanceprofile/testdata/render-expected-output/bootstrap/no-mcp/openshift-bootstrap-master_machineconfig.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ spec:
157157
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
158158
ExecStartPre=/bin/bash -c " \
159159
mkdir -p /run/tuned "
160-
ExecStart=/usr/bin/podman run \
160+
ExecStart=-/usr/bin/podman run \
161161
--rm \
162162
--name openshift-tuned \
163163
--privileged \
@@ -179,6 +179,7 @@ spec:
179179
--volume /sys:/sys:rslave \
180180
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
181181
$NTO_IMAGE
182+
ExecStart=/usr/bin/true
182183
Environment=PODMAN_SYSTEMD_UNIT=%n
183184
EnvironmentFile=/etc/mco/proxy.env
184185
EnvironmentFile=-/var/lib/ocp-tuned/image.env

test/e2e/performanceprofile/testdata/render-expected-output/bootstrap/no-mcp/openshift-bootstrap-worker_machineconfig.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ spec:
157157
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
158158
ExecStartPre=/bin/bash -c " \
159159
mkdir -p /run/tuned "
160-
ExecStart=/usr/bin/podman run \
160+
ExecStart=-/usr/bin/podman run \
161161
--rm \
162162
--name openshift-tuned \
163163
--privileged \
@@ -179,6 +179,7 @@ spec:
179179
--volume /sys:/sys:rslave \
180180
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
181181
$NTO_IMAGE
182+
ExecStart=/usr/bin/true
182183
Environment=PODMAN_SYSTEMD_UNIT=%n
183184
EnvironmentFile=/etc/mco/proxy.env
184185
EnvironmentFile=-/var/lib/ocp-tuned/image.env

test/e2e/performanceprofile/testdata/render-expected-output/default/arm/manual_machineconfig.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ spec:
174174
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
175175
ExecStartPre=/bin/bash -c " \
176176
mkdir -p /run/tuned "
177-
ExecStart=/usr/bin/podman run \
177+
ExecStart=-/usr/bin/podman run \
178178
--rm \
179179
--name openshift-tuned \
180180
--privileged \
@@ -196,6 +196,7 @@ spec:
196196
--volume /sys:/sys:rslave \
197197
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
198198
$NTO_IMAGE
199+
ExecStart=/usr/bin/true
199200
Environment=PODMAN_SYSTEMD_UNIT=%n
200201
EnvironmentFile=/etc/mco/proxy.env
201202
EnvironmentFile=-/var/lib/ocp-tuned/image.env

test/e2e/performanceprofile/testdata/render-expected-output/default/cpuFrequency/manual_machineconfig.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ spec:
159159
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
160160
ExecStartPre=/bin/bash -c " \
161161
mkdir -p /run/tuned "
162-
ExecStart=/usr/bin/podman run \
162+
ExecStart=-/usr/bin/podman run \
163163
--rm \
164164
--name openshift-tuned \
165165
--privileged \
@@ -181,6 +181,7 @@ spec:
181181
--volume /sys:/sys:rslave \
182182
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
183183
$NTO_IMAGE
184+
ExecStart=/usr/bin/true
184185
Environment=PODMAN_SYSTEMD_UNIT=%n
185186
EnvironmentFile=/etc/mco/proxy.env
186187
EnvironmentFile=-/var/lib/ocp-tuned/image.env

test/e2e/performanceprofile/testdata/render-expected-output/default/manual_machineconfig.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ spec:
175175
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
176176
ExecStartPre=/bin/bash -c " \
177177
mkdir -p /run/tuned "
178-
ExecStart=/usr/bin/podman run \
178+
ExecStart=-/usr/bin/podman run \
179179
--rm \
180180
--name openshift-tuned \
181181
--privileged \
@@ -197,6 +197,7 @@ spec:
197197
--volume /sys:/sys:rslave \
198198
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
199199
$NTO_IMAGE
200+
ExecStart=/usr/bin/true
200201
Environment=PODMAN_SYSTEMD_UNIT=%n
201202
EnvironmentFile=/etc/mco/proxy.env
202203
EnvironmentFile=-/var/lib/ocp-tuned/image.env

test/e2e/performanceprofile/testdata/render-expected-output/default/pp-norps/manual_machineconfig.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ spec:
175175
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
176176
ExecStartPre=/bin/bash -c " \
177177
mkdir -p /run/tuned "
178-
ExecStart=/usr/bin/podman run \
178+
ExecStart=-/usr/bin/podman run \
179179
--rm \
180180
--name openshift-tuned \
181181
--privileged \
@@ -197,6 +197,7 @@ spec:
197197
--volume /sys:/sys:rslave \
198198
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
199199
$NTO_IMAGE
200+
ExecStart=/usr/bin/true
200201
Environment=PODMAN_SYSTEMD_UNIT=%n
201202
EnvironmentFile=/etc/mco/proxy.env
202203
EnvironmentFile=-/var/lib/ocp-tuned/image.env

test/e2e/performanceprofile/testdata/render-expected-output/no-ref/manual_machineconfig.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ spec:
174174
ExecReload=/bin/pkill --signal HUP --pidfile /run/tuned/tuned.pid
175175
ExecStartPre=/bin/bash -c " \
176176
mkdir -p /run/tuned "
177-
ExecStart=/usr/bin/podman run \
177+
ExecStart=-/usr/bin/podman run \
178178
--rm \
179179
--name openshift-tuned \
180180
--privileged \
@@ -196,6 +196,7 @@ spec:
196196
--volume /sys:/sys:rslave \
197197
--entrypoint '["/usr/bin/cluster-node-tuning-operator","ocp-tuned","--in-cluster=false","--one-shot=true","-v=1"]' \
198198
$NTO_IMAGE
199+
ExecStart=/usr/bin/true
199200
Environment=PODMAN_SYSTEMD_UNIT=%n
200201
EnvironmentFile=/etc/mco/proxy.env
201202
EnvironmentFile=-/var/lib/ocp-tuned/image.env

0 commit comments

Comments
 (0)