Bug 1741661

Summary: Telemetry should include the ClusterVersion conditions with reasons
Product: OpenShift Container Platform Reporter: W. Trevor King <wking>
Component: Cluster Version OperatorAssignee: Abhinav Dahiya <adahiya>
Status: CLOSED ERRATA QA Contact: liujia <jiajliu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.1.zCC: adahiya, aos-bugs, jiajliu, jokerman
Target Milestone: ---   
Target Release: 4.1.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1741645 Environment:
Last Closed: 2019-08-28 19:55:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1741645    
Bug Blocks:    

Description W. Trevor King 2019-08-15 18:21:32 UTC
+++ This bug was initially created as a clone of Bug #1741645 +++

Bug 1717617 (4.2) and bug 1717619 (4.1.z) added Telemetry for ClusterOperator conditions.  We should add it for ClusterVersion conditions as well, so we can get things like UpdatePayloadClusterError reasons [1] out of Telemetry without requiring cluster access for 'oc get' or must-gather commands.

This bug is about backporting bug 1741645 to 4.1.z.

[1]:  https://bugzilla.redhat.com/show_bug.cgi?id=1740838#c20

Comment 2 liujia 2019-08-23 03:31:32 UTC
Version: 4.1.0-0.nightly-2019-08-22-165647

Checked "version" operator was added into cluster_operator_conditions metric.

Element	Value
cluster_operator_conditions{condition="Available",endpoint="metrics",instance="10.0.142.221:9099",job="cluster-version-operator",name="version",namespace="openshift-cluster-version",pod="cluster-version-operator-744fdf9989-4vc85",service="cluster-version-operator"}	1
cluster_operator_conditions{condition="Failing",endpoint="metrics",instance="10.0.142.221:9099",job="cluster-version-operator",name="version",namespace="openshift-cluster-version",pod="cluster-version-operator-744fdf9989-4vc85",service="cluster-version-operator"}	0
cluster_operator_conditions{condition="Progressing",endpoint="metrics",instance="10.0.142.221:9099",job="cluster-version-operator",name="version",namespace="openshift-cluster-version",pod="cluster-version-operator-744fdf9989-4vc85",service="cluster-version-operator"}	0
cluster_operator_conditions{condition="RetrievedUpdates",endpoint="metrics",instance="10.0.142.221:9099",job="cluster-version-operator",name="version",namespace="openshift-cluster-version",pod="cluster-version-operator-744fdf9989-4vc85",reason="RemoteFailed",service="cluster-version-operator"}	0

All conditions of "version" comply with the clusterversion object.
# ./oc get clusterversion -o json|jq ".items[0].status.conditions"
[
  {
    "lastTransitionTime": "2019-08-23T02:43:40Z",
    "message": "Done applying 4.1.0-0.nightly-2019-08-22-165647",
    "status": "True",
    "type": "Available"
  },
  {
    "lastTransitionTime": "2019-08-23T02:39:55Z",
    "status": "False",
    "type": "Failing"
  },
  {
    "lastTransitionTime": "2019-08-23T02:43:40Z",
    "message": "Cluster version is 4.1.0-0.nightly-2019-08-22-165647",
    "status": "False",
    "type": "Progressing"
  },
  {
    "lastTransitionTime": "2019-08-23T02:31:52Z",
    "message": "Unable to retrieve available updates: currently installed version 4.1.0-0.nightly-2019-08-22-165647 not found in the \"stable-4.1\" channel",
    "reason": "RemoteFailed",
    "status": "False",
    "type": "RetrievedUpdates"
  }
]

Comment 4 errata-xmlrpc 2019-08-28 19:55:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2547