Viewing Operator status
You can view the status of installed Operators in OpenShift Container Platform through Operator Lifecycle Manager (OLM). OLM reports subscription and catalog source conditions to help you assess Operator health.
Operator subscription condition types
Subscriptions can report the following condition types:
Subscription condition types
| Condition | Description |
|---|---|
CatalogSourcesUnhealthy | Some or all of the catalog sources to be used in resolution are unhealthy. |
InstallPlanMissing | An install plan for a subscription is missing. |
InstallPlanPending | An install plan for a subscription is pending installation. |
InstallPlanFailed | An install plan for a subscription has failed. |
ResolutionFailed | The dependency resolution for a subscription has failed. |
Default OpenShift Container Platform cluster Operators are managed by the Cluster Version Operator (CVO) and they do not have a Subscription object. Application Operators are managed by Operator Lifecycle Manager (OLM) and they have a Subscription object.
Additional resources
Viewing Operator subscription status by using the CLI
You can view Operator subscription status by using the CLI.
Prerequisites
- You have access to the cluster as a user with the
cluster-adminrole. - You have installed the OpenShift CLI (
oc).
Procedure
-
List Operator subscriptions:
$ oc get subs -n <operator_namespace> -
Use the
oc describecommand to inspect aSubscriptionresource:$ oc describe sub <subscription_name> -n <operator_namespace> -
In the command output, find the
Conditionssection for the status of Operator subscription condition types. In the following example, theCatalogSourcesUnhealthycondition type has a status offalsebecause all available catalog sources are healthy:Example outputName: cluster-loggingNamespace: openshift-loggingLabels: operators.coreos.com/cluster-logging.openshift-logging=Annotations: <none>API Version: operators.coreos.com/v1alpha1Kind: Subscription# ...Conditions:Last Transition Time: 2019-07-29T13:42:57ZMessage: all available catalogsources are healthyReason: AllCatalogSourcesHealthyStatus: FalseType: CatalogSourcesUnhealthy# ...noteDefault OpenShift Container Platform cluster Operators are managed by the Cluster Version Operator (CVO) and they do not have a
Subscriptionobject. Application Operators are managed by Operator Lifecycle Manager (OLM) and they have aSubscriptionobject.
Viewing Operator catalog source status by using the CLI
You can view the status of an Operator catalog source by using the CLI.
Prerequisites
- You have access to the cluster as a user with the
cluster-adminrole. - You have installed the OpenShift CLI (
oc).
Procedure
-
List the catalog sources in a namespace. For example, you can check the
openshift-marketplacenamespace, which is used for cluster-wide catalog sources:$ oc get catalogsources -n openshift-marketplaceExample outputNAME DISPLAY TYPE PUBLISHER AGEcertified-operators Certified Operators grpc Red Hat 55mcommunity-operators Community Operators grpc Red Hat 55mexample-catalog Example Catalog grpc Example Org 2m25sredhat-operators Red Hat Operators grpc Red Hat 55m -
Use the
oc describecommand to get more details and status about a catalog source:$ oc describe catalogsource example-catalog -n openshift-marketplaceExample outputName: example-catalogNamespace: openshift-marketplaceLabels: <none>Annotations: operatorframework.io/managed-by: marketplace-operatortarget.workload.openshift.io/management: {"effect": "PreferredDuringScheduling"}API Version: operators.coreos.com/v1alpha1Kind: CatalogSource# ...Status:Connection State:Address: example-catalog.openshift-marketplace.svc:50051Last Connect: 2021-09-09T17:07:35ZLast Observed State: TRANSIENT_FAILURERegistry Service:Created At: 2021-09-09T17:05:45ZPort: 50051Protocol: grpcService Name: example-catalogService Namespace: openshift-marketplace# ...In the preceding example output, the last observed state is
TRANSIENT_FAILURE. This state indicates that there is a problem establishing a connection for the catalog source. -
List the pods in the namespace where your catalog source was created:
$ oc get pods -n openshift-marketplaceExample outputNAME READY STATUS RESTARTS AGEcertified-operators-cv9nn 1/1 Running 0 36mcommunity-operators-6v8lp 1/1 Running 0 36mmarketplace-operator-86bfc75f9b-jkgbc 1/1 Running 0 42mexample-catalog-bwt8z 0/1 ImagePullBackOff 0 3m55sredhat-operators-smxx8 1/1 Running 0 36mWhen a catalog source is created in a namespace, a pod for the catalog source is created in that namespace. In the preceding example output, the status for the
example-catalog-bwt8zpod isImagePullBackOff. This status indicates that there is an issue pulling the catalog source’s index image. -
Use the
oc describecommand to inspect a pod for more detailed information:$ oc describe pod example-catalog-bwt8z -n openshift-marketplaceExample outputName: example-catalog-bwt8zNamespace: openshift-marketplacePriority: 0Node: ci-ln-jyryyg2-f76d1-ggdbq-worker-b-vsxjd/10.0.128.2...Events:Type Reason Age From Message---- ------ ---- ---- -------Normal Scheduled 48s default-scheduler Successfully assigned openshift-marketplace/example-catalog-bwt8z to ci-ln-jyryyf2-f76d1-fgdbq-worker-b-vsxjdNormal AddedInterface 47s multus Add eth0 [10.131.0.40/23] from openshift-sdnNormal BackOff 20s (x2 over 46s) kubelet Back-off pulling image "quay.io/example-org/example-catalog:v1"Warning Failed 20s (x2 over 46s) kubelet Error: ImagePullBackOffNormal Pulling 8s (x3 over 47s) kubelet Pulling image "quay.io/example-org/example-catalog:v1"Warning Failed 8s (x3 over 47s) kubelet Failed to pull image "quay.io/example-org/example-catalog:v1": rpc error: code = Unknown desc = reading manifest v1 in quay.io/example-org/example-catalog: unauthorized: access to the requested resource is not authorizedWarning Failed 8s (x3 over 47s) kubelet Error: ErrImagePullIn the preceding example output, the error messages indicate that the catalog source’s index image is failing to pull successfully because of an authorization issue. For example, the index image might be stored in a registry that requires login credentials.
Additional resources