From 8691c5245b01600d425d1fffe53e1db5e8f76095 Mon Sep 17 00:00:00 2001 From: cbippley Date: Mon, 24 Mar 2025 13:47:44 -0400 Subject: [PATCH] OSDOCS-12713 Module for changing CVO log levels --- modules/changing-cvo-log-level.adoc | 42 +++++++++++++++++++ .../gathering-data-cluster-update.adoc | 2 + 2 files changed, 44 insertions(+) create mode 100644 modules/changing-cvo-log-level.adoc diff --git a/modules/changing-cvo-log-level.adoc b/modules/changing-cvo-log-level.adoc new file mode 100644 index 0000000000..b677fa2bbe --- /dev/null +++ b/modules/changing-cvo-log-level.adoc @@ -0,0 +1,42 @@ +// Module included in the following assemblies: +// +// * updating/troubleshooting_updates/gathering-data-cluster-update.adoc + +:_mod-docs-content-type: PROCEDURE +[id="changing-log-data_{context}"] += Changing CVO log level (Technology Preview) + +:FeatureName: Changing the CVO log level +include::snippets/technology-preview.adoc[] + +The Cluster Version Operator (CVO) log level verbosity can be changed by the cluster administrator. There are four log levels. + +* `Normal` - The default log level. Contains working log information. Used when everything is fine. Provides helpful notices for auditing or common operations. +* `Debug` - Used when something goes wrong. Expect a higher quantity of notices. +* `Trace` - Used to diagnose errors. +* `TraceAll` - Used to get the complete body content of the logs. + +[NOTE] +==== +If `TraceAll` is turned on in a production cluster it may cause widespread performance issues and large log files. +==== + +.Prerequisites +* You have access to the cluster as a user with the `cluster-admin` role. +* You have installed the {oc-first}. +* You have the `TechPreviewNoUpgrade` feature set enabled. + +.Procedure + +. Enter the following command into the CLI to change the log level. + +[source,terminal] +---- +$ oc patch clusterversionoperator/cluster --type=merge --patch '{"spec":{"operatorLogLevel":""}}' +---- + +.Example output +[source,terminal] +---- +clusterversionoperator.operator.openshift.io/cluster patched +---- \ No newline at end of file diff --git a/updating/troubleshooting_updates/gathering-data-cluster-update.adoc b/updating/troubleshooting_updates/gathering-data-cluster-update.adoc index 1f08905d44..d7d3e8c9ca 100644 --- a/updating/troubleshooting_updates/gathering-data-cluster-update.adoc +++ b/updating/troubleshooting_updates/gathering-data-cluster-update.adoc @@ -15,6 +15,8 @@ endif::openshift-origin[] include::modules/gathering-log-data.adoc[leveloffset=+1] +include::modules/changing-cvo-log-level.adoc[leveloffset=+1] + include::modules/update-upgrading-oc-adm-upgrade-status.adoc[leveloffset=+1] include::modules/gathering-clusterversion-history.adoc[leveloffset=+1]