This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.Questo contenuto non è disponibile nella lingua selezionata.
Chapter 10. Updating OpenShift Logging
4.7 | 4.8 | 4.9 | |
---|---|---|---|
RHOL 5.1 | X | X | |
RHOL 5.2 | X | X | X |
RHOL 5.3 | X | X |
To upgrade from cluster logging in OpenShift Container Platform 4.6 and earlier to OpenShift Logging 5.x, you update the OpenShift Container Platform cluster to 4.7 or 4.8. Then, you update the following operators:
- From Elasticsearch Operator 4.x to OpenShift Elasticsearch Operator 5.x
- From Cluster Logging Operator 4.x to Red Hat OpenShift Logging Operator 5.x
To upgrade from a previous version of OpenShift Logging to the current version, you update OpenShift Elasticsearch Operator and Red Hat OpenShift Logging Operator to their current versions.
10.1. Updating from cluster logging in OpenShift Container Platform 4.6 or earlier to OpenShift Logging 5.x Copia collegamentoCollegamento copiato negli appunti!
OpenShift Container Platform 4.7 made the following name changes:
- The cluster logging feature became the Red Hat OpenShift Logging 5.x product.
- The Cluster Logging Operator became the Red Hat OpenShift Logging Operator.
- The Elasticsearch Operator became OpenShift Elasticsearch Operator.
To upgrade from cluster logging in OpenShift Container Platform 4.6 and earlier to OpenShift Logging 5.x, you update the OpenShift Container Platform cluster to 4.7 or 4.8. Then, you update the following operators:
- From Elasticsearch Operator 4.x to OpenShift Elasticsearch Operator 5.x
- From Cluster Logging Operator 4.x to Red Hat OpenShift Logging Operator 5.x
You must update the OpenShift Elasticsearch Operator before you update the Red Hat OpenShift Logging Operator. You must also update both Operators to the same version.
If you update the operators in the wrong order, Kibana does not update and the Kibana custom resource (CR) is not created. To work around this problem, you 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.
Prerequisites
- The OpenShift Container Platform version is 4.7 or later.
The OpenShift Logging status is healthy:
-
All pods are
ready
. - The Elasticsearch cluster is healthy.
-
All pods are
- Your Elasticsearch and Kibana data is backed up.
Procedure
Update the OpenShift Elasticsearch Operator:
-
From the web console, click Operators
Installed Operators. -
Select the
openshift-operators-redhat
project. - Click the OpenShift Elasticsearch Operator.
-
Click Subscription
Channel. - In the Change Subscription Update Channel window, select 5.0 or stable-5.1 and click Save.
Wait for a few seconds, then click Operators
Installed Operators. Verify that the OpenShift Elasticsearch Operator version is 5.x.x.
Wait for the Status field to report Succeeded.
-
From the web console, click Operators
Update the Cluster Logging Operator:
-
From the web console, click Operators
Installed Operators. -
Select the
openshift-logging
project. - Click the Cluster Logging Operator.
-
Click Subscription
Channel. - In the Change Subscription Update Channel window, select 5.0 or stable-5.1 and click Save.
Wait for a few seconds, then click Operators
Installed Operators. Verify that the Red Hat OpenShift Logging Operator version is 5.0.x or 5.1.x.
Wait for the Status field to report Succeeded.
-
From the web console, click Operators
Check the logging components:
Ensure that all Elasticsearch pods are in the Ready status:
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 Ensure that the Elasticsearch cluster is healthy:
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 { "cluster_name" : "elasticsearch", "status" : "green", }
{ "cluster_name" : "elasticsearch", "status" : "green", }
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that the Elasticsearch cron jobs are created:
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 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 5.0 or 5.1 and the indices are
green
: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 10.1. Sample output with indices in a green status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the log collector is updated to 5.0 or 5.1:
oc get ds fluentd -o json | grep fluentd-init
$ oc get ds fluentd -o json | grep fluentd-init
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the output includes a
fluentd-init
container:"containerName": "fluentd-init"
"containerName": "fluentd-init"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the log visualizer is updated to 5.0 or 5.1 using the Kibana CRD:
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 10.2. Sample output with a ready Kibana pod
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2. Updating OpenShift Logging to the current version Copia collegamentoCollegamento copiato negli appunti!
To update OpenShift Logging from 5.x to the current version, you change the subscriptions for the OpenShift Elasticsearch Operator and Red Hat OpenShift Logging Operator.
You must update the OpenShift Elasticsearch Operator before you update the Red Hat OpenShift Logging Operator. You must also update both Operators to the same version.
If you update the operators in the wrong order, Kibana does not update and the Kibana custom resource (CR) is not created. To work around this problem, you 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.
Prerequisites
- The OpenShift Container Platform version is 4.7 or later.
The OpenShift Logging status is healthy:
-
All pods are
ready
. - The Elasticsearch cluster is healthy.
-
All pods are
- Your Elasticsearch and Kibana data is backed up.
Procedure
Update the OpenShift Elasticsearch Operator:
-
From the web console, click Operators
Installed Operators. -
Select the
openshift-operators-redhat
project. - Click the OpenShift Elasticsearch Operator.
-
Click Subscription
Channel. - In the Change Subscription Update Channel window, select stable-5.x and click Save.
Wait for a few seconds, then click Operators
Installed Operators. Verify that the OpenShift Elasticsearch Operator version is 5.x.x.
Wait for the Status field to report Succeeded.
-
From the web console, click Operators
Update the Red Hat OpenShift Logging Operator:
-
From the web console, click Operators
Installed Operators. -
Select the
openshift-logging
project. - Click the Red Hat OpenShift Logging Operator.
-
Click Subscription
Channel. - In the Change Subscription Update Channel window, select stable-5.x and click Save.
Wait for a few seconds, then click Operators
Installed Operators. Verify that the Red Hat OpenShift Logging Operator version is 5.x.x.
Wait for the Status field to report Succeeded.
-
From the web console, click Operators
Check the logging components:
Ensure that all Elasticsearch pods are in the Ready status:
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 Ensure that the Elasticsearch cluster is healthy:
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 { "cluster_name" : "elasticsearch", "status" : "green", }
{ "cluster_name" : "elasticsearch", "status" : "green", }
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that the Elasticsearch cron jobs are created:
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 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 5.x and the indices are
green
: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 10.3. Sample output with indices in a green status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the log collector is updated to 5.x:
oc get ds fluentd -o json | grep fluentd-init
$ oc get ds fluentd -o json | grep fluentd-init
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the output includes a
fluentd-init
container:"containerName": "fluentd-init"
"containerName": "fluentd-init"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the log visualizer is updated to 5.x using the Kibana CRD:
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 10.4. Sample output with a ready Kibana pod
Copy to Clipboard Copied! Toggle word wrap Toggle overflow