Bug 1815394 - [RHV] machine instance-state annotation discrepancy with providerStatus.instanceState
Summary: [RHV] machine instance-state annotation discrepancy with providerStatus.insta...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Evgeny Slutsky
QA Contact: Jianwei Hou
URL:
Whiteboard:
Depends On:
Blocks: 1886848 1949506
TreeView+ depends on / blocked
 
Reported: 2020-03-20 06:41 UTC by Milind Yadav
Modified: 2021-04-14 13:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1886848 (view as bug list)
Environment:
Last Closed: 2020-11-24 12:44:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milind Yadav 2020-03-20 06:41:31 UTC
This bug was initially created as a copy of Bug #1796599

I am copying this bug because: 



Description of problem:
The instance-state annotation and the providerStatus.instanceState occasionally showing different values [1]. This should never happen as they consume from the same source. This is likely to be an issue on the client failing to patch the status or patching it wrongly. 

[1] https://storage.googleapis.com/origin-ci-test/logs/release-openshift-ocp-installer-e2e-aws-4.4/866/artifacts/e2e-aws/machines.json

Version-Release number of selected component (if applicable):
oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.4.0-0.nightly-2020-03-18-102708   True        False         37h     Cluster version is 4.4.0-0.nightly-2020-03-18-102708



How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
instance state, contains a whole machine spec
In case  more info needed refer - https://bugzilla.redhat.com/show_bug.cgi?id=1796599, it works like mentioned there on other Iaas ( ex AWS )

Comment 1 Jianwei Hou 2020-03-20 08:32:22 UTC
This is a machine spec from RHV, the instance-status annotation contains a dump of the machine spec.

```
- apiVersion: machine.openshift.io/v1beta1
        kind: Machine
        metadata:
          annotations:
            instance-status: |
              {"kind":"Machine","apiVersion":"machine.openshift.io/v1beta1","metadata":{"name":"six-g7gng-master-2","namespace":"openshift-machine-api","selfLink":"/apis/machine.openshift.io/v1beta1/namespaces/openshift-machine-api/machines/six-g7gng-master-2","uid":"8ecad490-6e9d-4e60-ad38-6e01938441a6","resourceVersion":"1457573","generation":1,"creationTimestamp":"2020-03-18T15:41:17Z","labels":{"machine.openshift.io/cluster-api-cluster":"six-g7gng","machine.openshift.io/cluster-api-machine-role":"master","machine.openshift.io/cluster-api-machine-type":"master"},"annotations":{"VmId":"09cadc05-09be-4dbc-ba75-fe50848fbbd1","instance-status":""},"finalizers":["machine.machine.openshift.io"]},"spec":{"metadata":{"creationTimestamp":null},"providerSpec":{"value":{"apiVersion":"ovirtproviderconfig.openshift.io/v1beta1","cluster_id":"7321c6b7-9abb-4de6-affa-b4ce9b4124a0","credentialsSecret":{"name":"ovirt-credentials"},"id":"","kind":"OvirtMachineProviderSpec","metadata":{"creationTimestamp":null},"name":"","template_name":"six-g7gng-rhcos","userDataSecret":{"name":"master-user-data"}}},"providerID":"09cadc05-09be-4dbc-ba75-fe50848fbbd1"},"status":{"nodeRef":{"kind":"Node","name":"six-g7gng-master-2","uid":"f484cd00-3bfe-47b5-9d6e-9feb4a5d7a27"},"lastUpdated":"2020-03-20T03:36:51Z","providerStatus":{"metadata":{"creationTimestamp":null},"instanceId":"six-g7gng-master-2","instanceState":"up","conditions":[{"type":"MachineCreated","status":"True","lastProbeTime":"2020-03-20T03:36:51Z","lastTransitionTime":"2020-03-20T03:36:51Z","reason":"machineCreationSucceedReason","message":"machineCreationSucceedMessage"}]},"addresses":[{"type":"InternalDNS","address":"six-g7gng-master-2"},{"type":"InternalIP","address":"10.37.142.208"}],"phase":"Running"}}
          creationTimestamp: "2020-03-18T15:41:17Z"
          finalizers:
          - machine.machine.openshift.io
          generation: 1
          labels:
            machine.openshift.io/cluster-api-cluster: six-g7gng
            machine.openshift.io/cluster-api-machine-role: master
            machine.openshift.io/cluster-api-machine-type: master
          name: six-g7gng-master-2
          namespace: openshift-machine-api
          resourceVersion: "1457607"
          selfLink: /apis/machine.openshift.io/v1beta1/namespaces/openshift-machine-api/machines/six-g7gng-master-2
          uid: 8ecad490-6e9d-4e60-ad38-6e01938441a6
        spec:
          metadata:
            creationTimestamp: null
          providerSpec:
            value:
              apiVersion: ovirtproviderconfig.openshift.io/v1beta1
              cluster_id: 7321c6b7-9abb-4de6-affa-b4ce9b4124a0
              credentialsSecret:
                name: ovirt-credentials
              id: ""
              kind: OvirtMachineProviderSpec
              metadata:
                creationTimestamp: null
              name: ""
              template_name: six-g7gng-rhcos
              userDataSecret:
                name: master-user-data
        status:
          addresses:
          - address: six-g7gng-master-2
            type: InternalDNS
          - address: 10.37.142.208
            type: InternalIP
          lastUpdated: "2020-03-20T03:36:51Z"
          nodeRef:
            kind: Node
            name: six-g7gng-master-2
            uid: f484cd00-3bfe-47b5-9d6e-9feb4a5d7a27
          phase: Running
          providerStatus:
            conditions:
            - lastProbeTime: "2020-03-20T03:36:51Z"
              lastTransitionTime: "2020-03-20T03:36:51Z"
              message: machineCreationSucceedMessage
              reason: machineCreationSucceedReason
              status: "True"
              type: MachineCreated
            instanceId: six-g7gng-master-2
            instanceState: up
            metadata:
              creationTimestamp: null
```

Comment 2 Alberto 2020-03-20 09:19:23 UTC
Any bz pointing a release different than the current one being targeted must have a parent BZ targeting 4.5.
Only release blockers must point to 4.4.0, they should point to 4.4.z otherwise. Thanks!

Comment 5 Douglas Schilling Landgraf 2020-07-09 12:08:25 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Comment 6 Evgeny Slutsky 2020-09-10 12:12:54 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Comment 7 Gal Zaidman 2020-11-24 12:44:53 UTC
Looking at the other fixes, I belive this was fixed by
https://github.com/openshift/cluster-api-provider-ovirt/pull/53/files#diff-ec03c5cc5e98ce98b95b49638d4c1baf2e7c88d106e8005c56a334709596b8f7R261-R270
tried to look at my local cluster and couldn't reproduce...
Closing this


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