IBM / ibm-common-service-operator

Operator to install IBM Common Services
https://www.ibm.com/support/knowledgecenter/SSHKN6/kc_welcome_cs.html
Apache License 2.0
19 stars 67 forks source link

Add more debug info on subscription during install and upgrade #2081

Closed Daniel-Fan closed 2 months ago

Daniel-Fan commented 2 months ago

What this PR does / why we need it: When the operator is been installed or upgraded by OLM, script will print out additional status from subscription .status.conditions during each RETRY.

Which issue(s) this PR fixes: For debugging

Test result

When the operator is been installed or upgraded by OLM, script will print out additional status from subscription .status.conditions.

> ./cp3pt0-deployment/setup_tenant.sh --operator-namespace cpd-control-2 --tethered-namespaces cpd-2 --license-accept -c v4.7
...
subscription.operators.coreos.com/ibm-common-service-operator created
[INFO] Waiting for operator ibm-common-service-operator CSV in namespace cpd-control-2 to be bound to Subscription
[DEBUG] oc get subscription.operators.coreos.com -l operators.coreos.com/ibm-common-service-operator.cpd-control-2='' -n cpd-control-2 -o jsonpath='{.items[*].status.conditions}' -> 
[{"lastTransitionTime":"2024-07-04T17:42:37Z","message":"all available catalogsources are healthy","reason":"AllCatalogSourcesHealthy","status":"False","type":"CatalogSourcesUnhealthy"}]

[INFO] RETRYING: Waiting for operator ibm-common-service-operator CSV in namespace cpd-control-2 to be bound to Subscription (180 left)
[DEBUG] oc get subscription.operators.coreos.com -l operators.coreos.com/ibm-common-service-operator.cpd-control-2='' -n cpd-control-2 -o jsonpath='{.items[*].status.conditions}' -> 
[{"lastTransitionTime":"2024-07-04T17:42:37Z","message":"all available catalogsources are healthy","reason":"AllCatalogSourcesHealthy","status":"False","type":"CatalogSourcesUnhealthy"}]

[INFO] RETRYING: Waiting for operator ibm-common-service-operator CSV in namespace cpd-control-2 to be bound to Subscription (179 left)
[DEBUG] oc get subscription.operators.coreos.com -l operators.coreos.com/ibm-common-service-operator.cpd-control-2='' -n cpd-control-2 -o jsonpath='{.items[*].status.conditions}' -> 
[{"lastTransitionTime":"2024-07-04T17:42:37Z","message":"all available catalogsources are healthy","reason":"AllCatalogSourcesHealthy","status":"False","type":"CatalogSourcesUnhealthy"},{"reason":"UnpackingInProgress","status":"True","type":"BundleUnpacking"}]

[INFO] RETRYING: Waiting for operator ibm-common-service-operator CSV in namespace cpd-control-2 to be bound to Subscription (178 left)
[✔] Operator ibm-common-service-operator CSV in namespace cpd-control-2 is bound to Subscription
ibm-ci-bot commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bitscuit, Daniel-Fan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/IBM/ibm-common-service-operator/blob/scripts-dev/OWNERS)~~ [Daniel-Fan,bitscuit] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment