Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 2. Updating OpenShift Logging
You can update Logging for Red Hat OpenShift by modifying the Operator subscription update channel.
Logging for Red Hat OpenShift update considerations:
- If you are on an Extended Update Support (EUS) release of Logging for Red Hat OpenShift, it is recommended to update to an EUS release. For information about the support cycle for releases, see OpenShift Operator Life Cycles.
- You must update the Red Hat OpenShift Logging Operator and the Loki Operator to the same major and minor version.
- The maximum supported update channel for Loki Operator is the N+2 version, where N is your current version. Updating to a version that is more than two versions newer is not supported.
You only need to update the Operators for Logging for Red Hat OpenShift that you have installed. The following list describes the high-level steps for updating Logging for Red Hat OpenShift.
- Only the Red Hat OpenShift Logging Operator is installed
- Check the update readiness for the Red Hat OpenShift Logging Operator.
- Update the Red Hat OpenShift Logging Operator.
- The Red Hat OpenShift Logging Operator and the Loki Operator are installed
Update the Operators in the following order:
ImportantYou must update the Red Hat OpenShift Logging Operator and the Loki Operator to the same channel.
- Check the update readiness for both the Loki Operator and the Red Hat OpenShift Logging Operator.
- Update the Loki Operator.
- Update the Red Hat OpenShift Logging Operator.
- The Red Hat OpenShift Logging Operator, the Loki Operator, and Cluster Observability Operator (COO) are installed
Update the Operators in the following order:
ImportantYou must update the Red Hat OpenShift Logging Operator and the Loki Operator to the same channel.
- Check the update readiness for both the Loki Operator and the Red Hat OpenShift Logging Operator.
- Update the Loki Operator.
- Update the Red Hat OpenShift Logging Operator.
Update the Cluster Observability Operator (COO).
For information about updating COO, the see Cluster Observability Operator (COO) documentation.
2.1. Checking update readiness Copier lienLien copié sur presse-papiers!
2.1.1. Checking update readiness of Red Hat OpenShift Logging Operator Copier lienLien copié sur presse-papiers!
Before you update Red Hat OpenShift Logging Operator, ensure that there are no alerts listed and all pods run correctly. This check ensures a smooth update.
Prerequisites
- You have installed Red Hat OpenShift Logging Operator v6.
- You have administrator permissions.
- You have access to the OpenShift Container Platform web console.
-
You have installed the OpenShift CLI (
oc).
Procedure
Verify that no alerts are listed for Red Hat OpenShift Logging Operator:
- Navigate to Observe > Alerting.
Use this filter to check alerts:
Source: platform Alert State: Firing Label: namespace=openshift-loggingEnsure that no upgrade-blocking alerts are listed.
In the OpenShift CLI (
oc), verify that all the pods have all the containers in theREADYstate and have theSTATUSasRunning.Issue the following command:
$ oc get pod -l app.kubernetes.io/component=collector -AExample output
NAMESPACE NAME READY STATUS RESTARTS AGE openshift-logging instance-8f6r8 1/1 Running 0 13m openshift-logging instance-bbjxv 1/1 Running 0 13m openshift-logging instance-f6dkj 1/1 Running 0 13m openshift-logging instance-g28np 1/1 Running 0 13m openshift-logging instance-h4w2t 1/1 Running 0 13m openshift-logging instance-vh8tw 1/1 Running 0 13m
2.1.2. Checking update readiness of Loki Operator Copier lienLien copié sur presse-papiers!
Before you update Loki Operator, ensure that there are no alerts listed and all pods run correctly. This check ensures a smooth update.
Prerequisites
- You have installed Loki Operator v6.
- You have administrator permissions.
- You have access to the OpenShift Container Platform web console.
-
You have installed the OpenShift CLI (
oc).
Procedure
Verify that no alerts are listed for Loki Operator:
- Navigate to Observe > Alerting.
Use this filter to check alerts:
Source: platform Alert State: Firing Label: namespace=openshift-loggingEnsure that no upgrade-blocking alerts are listed.
In the OpenShift CLI (
oc), verify that all the pods have all the containers in theREADYstate and have theSTATUSasRunning.Issue the following command:
$ oc get pods -l app.kubernetes.io/managed-by=lokistack-controller -n openshift-loggingExample output
NAME READY STATUS RESTARTS AGE logging-loki-compactor-0 1/1 Running 0 18m logging-loki-distributor-55dd9d9dd-bzbhg 1/1 Running 0 18m logging-loki-distributor-55dd9d9dd-fvt56 1/1 Running 0 3m23s logging-loki-gateway-cf7fb7479-jdr2t 2/2 Running 0 18m logging-loki-gateway-cf7fb7479-qr7t9 2/2 Running 0 18m logging-loki-index-gateway-0 1/1 Running 0 18m logging-loki-index-gateway-1 1/1 Running 0 2m51s logging-loki-ingester-0 1/1 Running 0 18m logging-loki-ingester-1 1/1 Running 0 2m50s logging-loki-ingester-2 1/1 Running 0 15m logging-loki-querier-5c4bf778b-hh24t 1/1 Running 0 18m logging-loki-querier-5c4bf778b-nfzv6 1/1 Running 0 18m logging-loki-query-frontend-f5f845489-5ztqd 1/1 Running 0 18m logging-loki-query-frontend-f5f845489-wddw7 1/1 Running 0 18m
2.2. Updating OpenShift Logging by using the CLI Copier lienLien copié sur presse-papiers!
2.2.1. Updating the Loki Operator by using the CLI Copier lienLien copié sur presse-papiers!
To update the Loki Operator to a new version, modify the update channel for the Operator subscription.
Prerequisites
- You have checked readiness for update.
- You have installed Loki Operator v6.
- The Loki Operator version you are updating from is not more than two versions older than 6.5.0.
-
You have installed the OpenShift CLI (
oc).
Procedure
Find the name of the subscription for the Loki Operator by using the following command:
$ oc get subscription -n openshift-operators-redhatExample output
NAME PACKAGE SOURCE CHANNEL loki-operator loki-operator redhat-operators stable-6.<y>Look for the value of
PACKAGElisted forLoki Operatorin theNAMEcolumn. The subscription name in the example output isloki-operator.Patch the subscription channel by using the following command:
$ oc patch subscription loki-operator -n openshift-operators-redhat \ --type='merge' \ -p '{"spec":{"channel":"<channel>"}}'Replace
<channel>with the valuestable-6.5.ImportantThe maximum supported update channel is N+2 version, where N is your current version. For example, if you are updating from Logging 6.0, only select a maximum of
stable-6.2version as the update channel. Updating to a version that is more than two versions newer is not supported.Check whether the
installPlanApprovalvalue is set toAutomaticorManual.Find the install plan by using the following command:
$ oc get installplan -n openshift-operators-redhatExample output
NAME CSV APPROVAL APPROVED install-mfvsm loki-operator.v6.y.z Automatic trueIf the
installPlanApprovalvalue is set toManual, approve the plan by using the following command:$ oc patch installplan <plan_name> -n openshift-operators-redhat --type merge -p '{"spec":{"approved":true}}'Replace
<plan_name>with the result obtained in the previous step.
Verification
Check the ClusterServiceVersion (CSV) in the namespace.
$ oc get csv -n openshift-operators-redhat | grep loki-operatorExample output
NAME DISPLAY VERSION REPLACES PHASE loki-operator.v6.5.0 Loki Operator 6.5.0 loki-operator.v6.y.z Succeeded
Next steps
- Update the Red Hat OpenShift Logging Operator.
2.2.2. Updating the Red Hat OpenShift Logging Operator by using the CLI Copier lienLien copié sur presse-papiers!
To update the Red Hat OpenShift Logging Operator to a new version, modify the update channel for the Operator subscription.
Prerequisites
- You have installed Red Hat OpenShift Logging Operator v6.
-
You have installed the OpenShift CLI (
oc). - If you use Loki storage, ensure that you update Loki Operator first.
Procedure
Find the name of the subscription for the Red Hat OpenShift Logging Operator by using the following command:
$ oc get subscription -n openshift-loggingExample output
NAME PACKAGE SOURCE CHANNEL cluster-logging cluster-logging redhat-operators stable-6.<y>Look for the value of
PACKAGElisted forcluster-loggingin theNAMEcolumn. The subscription name in the example output iscluster-logging.Patch the subscription channel by using the following command:
$ oc patch subscription <subscription_name> -n openshift-logging \ --type='merge' \ -p '{"spec":{"channel":"<channel>"}}'Replace
<subscription_name>with the subscription name obtained in the previous step and<channel>with the valuestable-6.5.Check whether the
installPlanApprovalvalue equalsAutomaticorManual.Find the install plan by using the following command:
$ oc get installplan -n openshift-loggingExample output
NAME CSV APPROVAL APPROVED install-7cnnf cluster-logging.v6.y.z Automatic true install-gsmb4 cluster-logging.v6.y.z Automatic trueIf the
installPlanApprovalvalue is set toManual, approve the plan by using the following command:$ oc patch installplan <plan_name> -n openshift-logging --type merge -p '{"spec":{"approved":true}}'Replace
<plan_name>with the result obtained in the previous step.
Verification
Check the ClusterServiceVersion (CSV) in the namespace.
$ oc get csv -n openshift-logging | grep cluster-loggingExample output
NAME DISPLAY VERSION REPLACES PHASE cluster-logging.v6.5.0 Red Hat OpenShift Logging 6.5.0 cluster-logging.v6.y.z Succeeded
2.3. Updating OpenShift Logging by using the web console Copier lienLien copié sur presse-papiers!
2.3.1. Updating the Loki Operator Copier lienLien copié sur presse-papiers!
To update the Loki Operator to a new version, you must modify the update channel for the Operator subscription.
Prerequisites
- You have installed Loki Operator v6.
- The Loki Operator version you are updating from is not more than two versions older than 6.5.0.
- You have administrator permissions.
- You have access to the OpenShift Container Platform web console.
Procedure
Navigate to the list of installed Operators.
If your version of OpenShift Container Platform is 4.19 or earlier:
Navigate to OpenShift Console > Administrator view > OperatorHub > Operators > Installed Operators.
If your version of OpenShift Container Platform is 4.20 or later:
Navigate to OpenShift Console > Administrator view > Ecosystem > Software Catalog > 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.
In the Change Subscription Update Channel window, select the update channel, stable-6.5.
ImportantThe maximum supported update channel is N+2 version, where N is your current version. For example, if you are updating from Logging 6.0, only select a maximum of
stable-6.2version as the update channel. Updating to a version that is more than two versions newer is not supported.-
If the Update approval field is set to
Automatic, Click Save. If the Update approval field is set to
Manual, the Upgrade status displays Upgrade available. In this case, follow these steps:- Click Upgrade available.
- Click Preview InstallPlan.
- Review the displayed install plan and click Approve.
-
If the Update approval field is set to
- Wait for the operator to update.
Navigate to the list of installed Operators.
If your version of OpenShift Container Platform is 4.19 or earlier:
Navigate to OpenShift Console > Administrator view > OperatorHub > Operators > Installed Operators.
If your version of OpenShift Container Platform is 4.20 or later:
Navigate to OpenShift Console > Administrator view > Ecosystem > Software Catalog > Operators > Installed Operators.
-
Verify that the Loki Operator version matches the
loki-operator.v6.5.0version. - On the Operators > Installed Operators page, wait for the Status field to report Succeeded.
-
Check whether the
LokiStackcustom resource contains thev13schema version. If thev13schema version is missing, add it. For information about adding thev13schema version, see Upgrading the LokiStack storage schema.
2.3.2. Updating the Red Hat OpenShift Logging Operator Copier lienLien copié sur presse-papiers!
To update the Red Hat OpenShift Logging Operator to a new minor version, modify the update channel for the Operator subscription.
Prerequisites
- You have installed Red Hat OpenShift Logging Operator v6.
- You have administrator permissions.
- You have access to the Red Hat OpenShift Logging web console.
Procedure
Navigate to the list of installed Operators.
If your version of OpenShift Container Platform is 4.19 or earlier:
Navigate to OpenShift Console > Administrator view > OperatorHub > Operators > Installed Operators.
If your version of OpenShift Container Platform is 4.20 or later:
Navigate to OpenShift Console > Administrator view > Ecosystem > Software Catalog > 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.
In the Change Subscription Update Channel window, select the update channel, stable-6.5.
-
If the Update approval field is set to
Automatic, Click Save. If the Update approval field is set to
Manual, the Upgrade status displays Upgrade available. In this case, follow these steps:- Click Upgrade available.
- Click Preview InstallPlan.
- Review the displayed install plan and click Approve.
-
If the Update approval field is set to
Verification
Navigate to the list of installed Operators.
If your version of OpenShift Container Platform is 4.19 or earlier:
Navigate to OpenShift Console > Administrator view > OperatorHub > Operators > Installed Operators.
If your version of OpenShift Container Platform is 4.20 or later:
Navigate to OpenShift Console > Administrator view > Ecosystem > Software Catalog > Operators > Installed Operators.
- Wait for the Status field to report Succeeded.