Skip to content

Commit 8889b5d

Browse files
authored
Merge pull request #58144 from MirzWeiss/OCPBUGS-9933
OCPBUGS:9933 - Updated procedure for changing log_level to debug for CRI-O in OSC
2 parents b3de46d + 9fe0696 commit 8889b5d

File tree

1 file changed

+8
-40
lines changed

1 file changed

+8
-40
lines changed

modules/sandboxed-containers-enable-debug-crio.adoc

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,68 +6,36 @@
66
[id="sandboxed-containers-enable-debug-logs_{context}"]
77
= Enabling debug logs for {sandboxed-containers-first}
88

9-
As a cluster administrator, you can collect a more detailed level of logs for {sandboxed-containers-first}. Enhance logging by changing the `log_level` in the CRI-O runtime for the worker nodes running {sandboxed-containers-first}.
9+
As a cluster administrator, you can collect a more detailed level of logs for {sandboxed-containers-first}. You can also enhance logging by changing the `logLevel` field in the `KataConfig` CR. This changes the `log_level` in the CRI-O runtime for the worker nodes running {sandboxed-containers-first}.
1010

1111
.Procedure
1212

13-
. Create a YAML file for the `ContainerRuntimeConfig` CR with the following manifest:
14-
+
15-
[source,yaml]
16-
----
17-
apiVersion: machineconfiguration.openshift.io/v1
18-
kind: ContainerRuntimeConfig
19-
metadata:
20-
name: crio-debug
21-
spec:
22-
machineConfigPoolSelector:
23-
matchLabels:
24-
pools.operator.machineconfiguration.openshift.io/worker: '' <1>
25-
containerRuntimeConfig:
26-
logLevel: debug
27-
----
28-
<1> Specify a label for the machine config pool that you want you want to modify.
13+
. Change the `logLevel` field in your existing `KataConfig` CR to `debug`:
2914

30-
. Create the `ContainerRuntimeConfig` CR:
31-
+
3215
[source,terminal]
3316
----
34-
$ oc create -f ctrcfg.yaml
17+
$ oc patch kataconfig <name_of_kataconfig_file> --type merge --patch '{"spec":{"logLevel":"debug"}}'
3518
----
3619

37-
+
3820
[NOTE]
3921
====
40-
The file name listed above is a suggestion. You can create this file using another name.
22+
When running this command, reference the name of your `KataConfig` CR. This is the name you used to create the CR when setting up {sandboxed-containers-first}.
4123
====
4224

43-
. Verify the CR is created:
44-
+
45-
[source,terminal]
46-
----
47-
$ oc get ctrcfg
48-
----
49-
+
50-
.Example output
51-
[source,terminal]
52-
----
53-
NAME AGE
54-
crio-debug 3m19s
55-
----
56-
5725
.Verification
5826

59-
. Monitor the machine config pool until the `UPDATED` field for all worker nodes appears as `True`:
27+
. Monitor the `kata-oc` machine config pool until the `UPDATED` field appears as `True`, meaning all worker nodes are updated:
6028
+
6129
[source,terminal]
6230
----
63-
$ oc get mcp worker
31+
$ oc get mcp kata-oc
6432
----
6533
+
6634
.Example output
6735
[source,terminal]
6836
----
69-
NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE
70-
worker rendered-worker-169 False True False 3 1 1 0 9h
37+
NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE
38+
kata-oc rendered-kata-oc-169 False True False 3 1 1 0 9h
7139
----
7240

7341
. Verify that the `log_level` was updated in CRI-O:

0 commit comments

Comments
 (0)