Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1686133 - Available condition on console operator is wrong
Summary: Available condition on console operator is wrong
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.1.0
Assignee: bpeterse
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-06 19:36 UTC by David Eads
Modified: 2019-03-18 13:19 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-18 13:19:03 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description David Eads 2019-03-06 19:36:14 UTC
The console should be available when one pod is available and the route has been accepted.  Right now it is waiting for all pods listed in the deployment.

Comment 1 bpeterse 2019-03-07 19:35:19 UTC
PR opened https://github.com/openshift/console-operator/pull/169

Comment 3 Yadan Pei 2019-03-18 02:32:00 UTC
===> change console deployment replicas to 0
$ oc scale deployment console -n openshift-console --replicas=0
deployment.extensions/console scaled

$ oc get pods -n openshift-console
No resources found.

$ oc get clusteroperators
NAME                                  VERSION                             AVAILABLE   PROGRESSING   FAILING   SINCE
cluster-autoscaler                    4.0.0-0.nightly-2019-03-15-063749   True        False         False     3h23m
console                               4.0.0-0.nightly-2019-03-15-063749   False       False         False     54s


===> Change console route not admitted by router
$ oc edit ingresscontroller -n openshift-ingress-operator
$ oc get ingresscontroller -n openshift-ingress-operator -o yaml
  spec:
    namespaceSelector:
      matchLabels:
        router: prod
$ oc get pods -n openshift-ingress   // ingress pods will be re-created, if new pods are pending, remove old router pods
NAME                              READY   STATUS    RESTARTS   AGE
router-default-8696c5f5bd-qmstz   1/1     Running   0          29m
router-default-8696c5f5bd-xmcjv   1/1     Running   0          25m

$ remove existing console route, set console.operator.spec.managementState to 'Removed' -> then change back to 'Managed', console route will be re-created

$ oc get route -n openshift-console -o yaml  |grep status -A 10
  status:
    ingress: null
kind: List
$ oc get pods -n openshift-console    // console pods are running
NAME                       READY   STATUS    RESTARTS   AGE
console-56c866b54d-6tcx9   1/1     Running   0          21m
console-56c866b54d-vzz7h   1/1     Running   0          21m


$ oc get clusteroperators
NAME                                  VERSION                             AVAILABLE   PROGRESSING   FAILING   SINCE
cluster-autoscaler                    4.0.0-0.nightly-2019-03-15-063749   True        False         False     3h23m
console                               4.0.0-0.nightly-2019-03-15-063749   False       False         False     54s

$ oc get clusteroperators console -o yaml
status:
  conditions:
  - lastTransitionTime: 2019-03-18T01:58:54Z
    reason: AsExpected
    status: "False"
    type: Failing
  - lastTransitionTime: 2019-03-18T01:59:04Z
    reason: AsExpected
    status: "False"
    type: Progressing
  - lastTransitionTime: 2019-03-18T01:58:54Z
    message: 'Available: No pods available for console deployment.'
    reason: Available
    status: "False"
    type: Available
  - lastTransitionTime: 2019-03-17T22:41:25Z
    reason: NoData
    status: Unknown
    type: Upgradeable

When console pods are 0 or router is not admitted, console operator Available status will be set to False

Verified on console-operator commit: b9a3350f96176c9b6291c3ba99157237866eb222
$ oc get pods -n openshift-console-operator -o yaml | grep image
      image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:54df68025ad15f041b59217e87fe5f75314f30b25995213228e38346b4948dc2
$ oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:54df68025ad15f041b59217e87fe5f75314f30b25995213228e38346b4948dc2 | grep commit
             io.openshift.build.commit.id=b9a3350f96176c9b6291c3ba99157237866eb222
             io.openshift.build.commit.url=https://github.com/openshift/console-operator/commit/b9a3350f96176c9b6291c3ba99157237866eb222
[yapei@dhcp-140-3 console-operator]$ git log b9a3350f96176c9b6291 | grep '#169'    // commit b9a3350f96176c9b6291 contains the PR fix
    Merge pull request #169 from benjaminapetersen/bug/1686133/available-condition-update


Note You need to log in before you can comment on or make changes to this bug.