Questo contenuto non è disponibile nella lingua selezionata.
Chapter 6. Upgrading Service Telemetry Framework to version 1.4
To migrate from Service Telemetry Framework (STF) v1.3 to STF v1.4, you must replace the ClusterServiceVersion and Subscription objects in the service-telemetry namespace on your Red Hat OpenShift Container Platform environment.
Prerequisites
- You have upgraded your Red Hat OpenShift Container Platform environment to v4.8. STF v1.4 does not run on Red Hat OpenShift Container Platform versions less than v4.8.
-
You have backed up your data. Upgrading STF v1.3 to v1.4 results in a brief outage while the Smart Gateways and other components are updated. Additionally, changes to the
ServiceTelemetryandSmartGatewayobjects do not have any effect while the Operators are being replaced.
To upgrade from STF v1.3 to v1.4, complete the following procedures:
6.1. Removing STF 1.3 Smart Gateway Operator Copia collegamentoCollegamento copiato negli appunti!
Remove the Smart Gateway Operator from STF 1.3.
Procedure
- Log in to Red Hat OpenShift Container Platform.
Change to the
service-telemetrynamespace:oc project service-telemetry
$ oc project service-telemetryCopy to Clipboard Copied! Toggle word wrap Toggle overflow Retrieve the
Subscriptionname of the Smart Gateway Operator. Replaceservice-telemetryin the selector with the namespace that hosts your STF instance if it is different from the default namespace. Verify that only one subscription is returned:oc get sub --selector=operators.coreos.com/smart-gateway-operator.service-telemetry
$ oc get sub --selector=operators.coreos.com/smart-gateway-operator.service-telemetry NAME PACKAGE SOURCE CHANNEL smart-gateway-operator-stable-1.3-redhat-operators-openshift-marketplace smart-gateway-operator redhat-operators stable-1.3Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the Smart Gateway Operator subscription:
oc delete sub --selector=operators.coreos.com/smart-gateway-operator.service-telemetry
$ oc delete sub --selector=operators.coreos.com/smart-gateway-operator.service-telemetry subscription.operators.coreos.com "smart-gateway-operator-stable-1.3-redhat-operators-openshift-marketplace" deletedCopy to Clipboard Copied! Toggle word wrap Toggle overflow Retrieve the Smart Gateway Operator ClusterServiceVersion and verify that only one ClusterServiceVersion is returned:
oc get csv --selector=operators.coreos.com/smart-gateway-operator.service-telemetry
$ oc get csv --selector=operators.coreos.com/smart-gateway-operator.service-telemetry NAME DISPLAY VERSION REPLACES PHASE smart-gateway-operator.v3.0.1635451893 Smart Gateway Operator 3.0.1635451893 SucceededCopy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the Smart Gateway Operator ClusterServiceVersion:
oc delete csv --selector=operators.coreos.com/smart-gateway-operator.service-telemetry
$ oc delete csv --selector=operators.coreos.com/smart-gateway-operator.service-telemetry clusterserviceversion.operators.coreos.com "smart-gateway-operator.v3.0.1635451893" deletedCopy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the SmartGateway Custom Resource Definition (CRD). After removal of the CRD, no data flows to STF until the upgrade is completed and the Smart Gateway instances are reinstantiated:
oc delete crd smartgateways.smartgateway.infra.watch
$ oc delete crd smartgateways.smartgateway.infra.watch customresourcedefinition.apiextensions.k8s.io "smartgateways.smartgateway.infra.watch" deletedCopy to Clipboard Copied! Toggle word wrap Toggle overflow
6.2. Updating the Service Telemetry Operator to 1.4 Copia collegamentoCollegamento copiato negli appunti!
You must change the subscription channel of the Service Telemetry Operator which manages the STF instances to the stable-1.4 channel.
Procedure
- Log in to Red Hat OpenShift Container Platform.
Change to the
service-telemetrynamespace:oc project service-telemetry
$ oc project service-telemetryCopy to Clipboard Copied! Toggle word wrap Toggle overflow Patch the Service Telemetry Operator Subscription to use the stable-1.4 channel. Replace the
service-telemetryin the selector with the namespace that hosts your STF instance if it is different from the default namespace:oc patch $(oc get sub --selector=operators.coreos.com/service-telemetry-operator.service-telemetry -oname) --patch $'spec:\n channel: stable-1.4' --type=merge
$ oc patch $(oc get sub --selector=operators.coreos.com/service-telemetry-operator.service-telemetry -oname) --patch $'spec:\n channel: stable-1.4' --type=merge subscription.operators.coreos.com/service-telemetry-operator patchedCopy to Clipboard Copied! Toggle word wrap Toggle overflow Monitor the output of the
oc get csvcommand until the Smart Gateway Operator is installed and Service Telemetry Operator moves through the update phases. When the phase changes toSucceeded, the Service Telemetry Operator has completed the update:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Validate that all pods are ready and running. Your environment might differ from the following example output:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow