Bug 1802331

Summary: UPI installs reporting as IPI in telemetry
Product: OpenShift Container Platform Reporter: Alex Crawford <crawford>
Component: InstallerAssignee: Abhinav Dahiya <adahiya>
Installer sub component: openshift-installer QA Contact: Yang Yang <yanyang>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified    
Version: 4.3.z   
Target Milestone: ---   
Target Release: 4.3.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-25 06:18:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1797806    
Bug Blocks:    

Description Alex Crawford 2020-02-12 22:42:23 UTC
This bug was initially created as a copy of Bug #1797806

I am copying this bug because: 



When doing a UPI install, the cluster will report as having gone through the IPI installation flow if the OPENSHIFT_INSTALL_INVOKER environment variable is specified. This was the intended behavior from https://bugzilla.redhat.com/show_bug.cgi?id=1791437, but we've since decided that we would like to distinguish between UPI and IPI more accurately. We need to follow up and change the way that the metrics count an IPI vs a UPI installation.

Comment 3 Yang Yang 2020-02-18 06:57:25 UTC
Verified with 4.3.0-0.nightly-2020-02-16-235204

Steps of verification are as below:
1. Create a UPI GCP cluster with OPENSHIFT_INSTALL_INVOKER=yanyang specified
# oc get cm openshift-install-manifests -n openshift-config -o yaml
apiVersion: v1
data:
  invoker: yanyang
  version: v4.3.3
kind: ConfigMap
metadata:
  creationTimestamp: "2020-02-17T09:45:29Z"
  name: openshift-install-manifests
  namespace: openshift-config
  resourceVersion: "966"
  selfLink: /api/v1/namespaces/openshift-config/configmaps/openshift-install-manifests
  uid: 96fa2ed3-09c0-4ee7-9711-a8185381363b

# token=`oc sa get-token prometheus-k8s -n openshift-monitoring`
# oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?query=cluster_installer' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   396  100   396    0     0   2472      0 --:--:-- --:--:-- --:--:--  2475
{
  "status": "success",
  "data": {
    "resultType": "vector",
    "result": [
      {
        "metric": {
          "__name__": "cluster_installer",
          "endpoint": "metrics",
          "instance": "10.0.0.4:9099",
          "invoker": "yanyang",
          "job": "cluster-version-operator",
          "namespace": "openshift-cluster-version",
          "pod": "cluster-version-operator-56cbdc889-jlxrb",
          "service": "cluster-version-operator",
          "type": "other",
          "version": "v4.3.3"
        },
        "value": [
          1581993379.548,
          "1"
        ]
      }
    ]
  }
}

2. Create a UPI gcp cluster with OPENSHIFT_INSTALL_INVOKER=yanyang specified
# oc get cm openshift-install -n openshift-config -o yaml
apiVersion: v1
data:
  invoker: yanyang
  version: v4.3.3
kind: ConfigMap
metadata:
  creationTimestamp: "2020-02-18T06:22:44Z"
  name: openshift-install
  namespace: openshift-config
  resourceVersion: "875"
  selfLink: /api/v1/namespaces/openshift-config/configmaps/openshift-install
  uid: 2c3dd3d7-9749-46e3-814d-c8729d0d3f2a

# oc get cm openshift-install-manifests -n openshift-config -o yaml
apiVersion: v1
data:
  invoker: yanyang
  version: v4.3.3
kind: ConfigMap
metadata:
  creationTimestamp: "2020-02-18T06:22:43Z"
  name: openshift-install-manifests
  namespace: openshift-config
  resourceVersion: "868"
  selfLink: /api/v1/namespaces/openshift-config/configmaps/openshift-install-manifests
  uid: 90a52cde-fcf7-46e7-b86e-9fd6af7326f2

# token=`oc sa get-token prometheus-k8s -n openshift-monitoring`

# oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?query=cluster_installer' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   408  100   408    0     0   2518      0 --:--:-- --:--:-- --:--:--  2534
{
  "status": "success",
  "data": {
    "resultType": "vector",
    "result": [
      {
        "metric": {
          "__name__": "cluster_installer",
          "endpoint": "metrics",
          "instance": "10.0.0.3:9099",
          "invoker": "yanyang",
          "job": "cluster-version-operator",
          "namespace": "openshift-cluster-version",
          "pod": "cluster-version-operator-56cbdc889-r9v7c",
          "service": "cluster-version-operator",
          "type": "openshift-install",
          "version": "v4.3.3"
        },
        "value": [
          1582008906.697,
          "1"
        ]
      }
    ]
  }
}

The test results are as expected hence moving it to verified state.

Comment 4 Yang Yang 2020-02-18 06:59:12 UTC
Correct the desciption

> 2. Create a UPI gcp cluster with OPENSHIFT_INSTALL_INVOKER=yanyang specified

2. Create an IPI gcp cluster with OPENSHIFT_INSTALL_INVOKER=yanyang specified

Comment 6 errata-xmlrpc 2020-02-25 06:18:20 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-2020:0528