Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 7. Updating Logging
There are two types of logging updates: minor release updates (5.y.z) and major release updates (5.y).
7.1. Minor release updates Link kopierenLink in die Zwischenablage kopiert!
If you installed the logging Operators using the Automatic update approval option, your Operators receive minor version updates automatically. You do not need to complete any manual update steps.
If you installed the logging Operators using the Manual update approval option, you must manually approve minor version updates. For more information, see Manually approving a pending Operator update.
7.2. Major release updates Link kopierenLink in die Zwischenablage kopiert!
For major version updates you must complete some manual steps.
For major release version compatibility and support information, see OpenShift Operator Life Cycles.
7.3. Upgrading the Red Hat OpenShift Logging Operator to watch all namespaces Link kopierenLink in die Zwischenablage kopiert!
In logging 5.7 and older versions, the Red Hat OpenShift Logging Operator only watches the openshift-logging
namespace. If you want the Red Hat OpenShift Logging Operator to watch all namespaces on your cluster, you must redeploy the Operator. You can complete the following procedure to redeploy the Operator without deleting your logging components.
Prerequisites
-
You have installed the OpenShift CLI (
oc
). - You have administrator permissions.
Procedure
Delete the subscription by running the following command:
oc -n openshift-logging delete subscription <subscription>
$ oc -n openshift-logging delete subscription <subscription>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the Operator group by running the following command:
oc -n openshift-logging delete operatorgroup <operator_group_name>
$ oc -n openshift-logging delete operatorgroup <operator_group_name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the cluster service version (CSV) by running the following command:
oc delete clusterserviceversion cluster-logging.<version>
$ oc delete clusterserviceversion cluster-logging.<version>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Redeploy the Red Hat OpenShift Logging Operator by following the "Installing Logging" documentation.
Verification
Check that the
targetNamespaces
field in theOperatorGroup
resource is not present or is set to an empty string.To do this, run the following command and inspect the output:
oc get operatorgroup <operator_group_name> -o yaml
$ oc get operatorgroup <operator_group_name> -o yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.4. Updating the Red Hat OpenShift Logging Operator Link kopierenLink in die Zwischenablage kopiert!
To update the Red Hat OpenShift Logging Operator to a new major release version, you must modify the update channel for the Operator subscription.
Prerequisites
- You have installed the Red Hat OpenShift Logging Operator.
- You have administrator permissions.
- You have access to the OpenShift Container Platform web console and are viewing the Administrator perspective.
Procedure
-
Navigate to Operators
Installed Operators. - Select the openshift-logging project.
- Click the Red Hat OpenShift Logging Operator.
- Click Subscription. In the Subscription details section, click the Update channel link. This link text might be stable or stable-5.9, depending on your current update channel.
-
In the Change Subscription Update Channel window, select the latest major version update channel, stable-5.9, and click Save. Note the
cluster-logging.v5.9.<z>
version. -
Wait for a few seconds, and then go to Operators
Installed Operators to verify that the Red Hat OpenShift Logging Operator version matches the latest cluster-logging.v5.9.<z>
version. -
On the Operators
Installed Operators page, wait for the Status field to report Succeeded. -
Check if the
LokiStack
custom resource contains thev13
schema version and add it if it is missing. For correctly adding thev13
schema version, see "Upgrading the LokiStack storage schema".
7.5. Updating the Loki Operator Link kopierenLink in die Zwischenablage kopiert!
To update the Loki Operator to a new major release version, you must modify the update channel for the Operator subscription.
Prerequisites
- You have installed the Loki Operator.
- You have administrator permissions.
- You have access to the OpenShift Container Platform web console and are viewing the Administrator perspective.
Procedure
-
Navigate to Operators
Installed Operators. - Select the openshift-operators-redhat project.
- Click the Loki Operator.
- Click Subscription. In the Subscription details section, click the Update channel link. This link text might be stable or stable-5.y, depending on your current update channel.
-
In the Change Subscription Update Channel window, select the latest major version update channel, stable-5.y, and click Save. Note the
loki-operator.v5.y.z
version. -
Wait for a few seconds, then click Operators
Installed Operators. Verify that the Loki Operator version matches the latest loki-operator.v5.y.z
version. -
On the Operators
Installed Operators page, wait for the Status field to report Succeeded. -
Check if the
LokiStack
custom resource contains thev13
schema version and add it if it is missing. For correctly adding thev13
schema version, see "Upgrading the LokiStack storage schema".
7.6. Upgrading the LokiStack storage schema Link kopierenLink in die Zwischenablage kopiert!
If you are using the Red Hat OpenShift Logging Operator with the Loki Operator, the Red Hat OpenShift Logging Operator 5.9 or later supports the v13
schema version in the LokiStack
custom resource. Upgrading to the v13
schema version is recommended because it is the schema version to be supported going forward.
Procedure
Add the
v13
schema version in theLokiStack
custom resource as follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow TipTo edit the
LokiStack
custom resource, you can run theoc edit
command:oc edit lokistack <name> -n openshift-logging
$ oc edit lokistack <name> -n openshift-logging
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
-
On or after the specified
effectiveDate
date, check that there is no LokistackSchemaUpgradesRequired alert in the web console in AdministratorObserve Alerting.
7.7. Updating the OpenShift Elasticsearch Operator Link kopierenLink in die Zwischenablage kopiert!
To update the OpenShift Elasticsearch Operator to the current version, you must modify the subscription.
The Logging 5.9 release does not contain an updated version of the OpenShift Elasticsearch Operator. If you currently use the OpenShift Elasticsearch Operator released with Logging 5.8, it will continue to work with Logging until the EOL of Logging 5.8. As an alternative to using the OpenShift Elasticsearch Operator to manage the default log storage, you can use the Loki Operator. For more information on the Logging lifecycle dates, see Platform Agnostic Operators.
Prerequisites
If you are using Elasticsearch as the default log store, and Kibana as the UI, update the OpenShift Elasticsearch Operator before you update the Red Hat OpenShift Logging Operator.
ImportantIf you update the Operators in the wrong order, Kibana does not update and the Kibana custom resource (CR) is not created. To fix this issue, delete the Red Hat OpenShift Logging Operator pod. When the Red Hat OpenShift Logging Operator pod redeploys, it creates the Kibana CR and Kibana becomes available again.
The Logging status is healthy:
-
All pods have a
ready
status. - The Elasticsearch cluster is healthy.
-
All pods have a
- Your Elasticsearch and Kibana data is backed up.
- You have administrator permissions.
-
You have installed the OpenShift CLI (
oc
) for the verification steps.
Procedure
-
In the OpenShift Container Platform web console, click Operators
Installed Operators. - Select the openshift-operators-redhat project.
- Click OpenShift Elasticsearch Operator.
-
Click Subscription
Channel. -
In the Change Subscription Update Channel window, select stable-5.y and click Save. Note the
elasticsearch-operator.v5.y.z
version. -
Wait for a few seconds, then click Operators
Installed Operators. Verify that the OpenShift Elasticsearch Operator version matches the latest elasticsearch-operator.v5.y.z
version. -
On the Operators
Installed Operators page, wait for the Status field to report Succeeded.
Verification
Verify that all Elasticsearch pods have a Ready status by entering the following command and observing the output:
oc get pod -n openshift-logging --selector component=elasticsearch
$ oc get pod -n openshift-logging --selector component=elasticsearch
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME READY STATUS RESTARTS AGE elasticsearch-cdm-1pbrl44l-1-55b7546f4c-mshhk 2/2 Running 0 31m elasticsearch-cdm-1pbrl44l-2-5c6d87589f-gx5hk 2/2 Running 0 30m elasticsearch-cdm-1pbrl44l-3-88df5d47-m45jc 2/2 Running 0 29m
NAME READY STATUS RESTARTS AGE elasticsearch-cdm-1pbrl44l-1-55b7546f4c-mshhk 2/2 Running 0 31m elasticsearch-cdm-1pbrl44l-2-5c6d87589f-gx5hk 2/2 Running 0 30m elasticsearch-cdm-1pbrl44l-3-88df5d47-m45jc 2/2 Running 0 29m
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the Elasticsearch cluster status is
green
by entering the following command and observing the output:oc exec -n openshift-logging -c elasticsearch elasticsearch-cdm-1pbrl44l-1-55b7546f4c-mshhk -- health
$ oc exec -n openshift-logging -c elasticsearch elasticsearch-cdm-1pbrl44l-1-55b7546f4c-mshhk -- health
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
{ "cluster_name" : "elasticsearch", "status" : "green", }
{ "cluster_name" : "elasticsearch", "status" : "green", }
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the Elasticsearch cron jobs are created by entering the following commands and observing the output:
oc project openshift-logging
$ oc project openshift-logging
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc get cronjob
$ oc get cronjob
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE elasticsearch-im-app */15 * * * * False 0 <none> 56s elasticsearch-im-audit */15 * * * * False 0 <none> 56s elasticsearch-im-infra */15 * * * * False 0 <none> 56s
NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE elasticsearch-im-app */15 * * * * False 0 <none> 56s elasticsearch-im-audit */15 * * * * False 0 <none> 56s elasticsearch-im-infra */15 * * * * False 0 <none> 56s
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the log store is updated to the correct version and the indices are
green
by entering the following command and observing the output:oc exec -c elasticsearch <any_es_pod_in_the_cluster> -- indices
$ oc exec -c elasticsearch <any_es_pod_in_the_cluster> -- indices
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the output includes the
app-00000x
,infra-00000x
,audit-00000x
,.security
indices:Example 7.1. Sample output with indices in a green status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the log visualizer is updated to the correct version by entering the following command and observing the output:
oc get kibana kibana -o json
$ oc get kibana kibana -o json
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the output includes a Kibana pod with the
ready
status:Example 7.2. Sample output with a ready Kibana pod
Copy to Clipboard Copied! Toggle word wrap Toggle overflow