Bug 1829333 - vSphere - Don't reconcile power state
Summary: vSphere - Don't reconcile power state
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Alexander Demicev
QA Contact: Milind Yadav
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-29 12:03 UTC by Alexander Demicev
Modified: 2020-07-13 17:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:32:50 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-api-operator pull 573 0 None closed Bug 1829333: vSphere - Don't reconcile power state 2020-06-24 01:28:32 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:33:01 UTC

Description Alexander Demicev 2020-04-29 12:03:59 UTC
Description of problem:

We should support the ability to switch off VM but current implementation turns on VM in every machine update.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Milind Yadav 2020-05-12 11:12:00 UTC
Please help to figure out steps to reproduce it

Comment 5 Milind Yadav 2020-05-13 06:41:18 UTC
Steps :
1.Logged into VMsphere client and powered-off vm (miyadav-11-rdnr9-worker-vzds4)

2.Validate the machine status:
 oc get machines
NAME                            PHASE     TYPE   REGION   ZONE   AGE
miyadav-11-rdnr9-master-0       Running                          3h27m
miyadav-11-rdnr9-master-1       Running                          3h27m
miyadav-11-rdnr9-master-2       Running                          3h27m
miyadav-11-rdnr9-worker-4gqcp   Running                          3h19m
miyadav-11-rdnr9-worker-r84ws   Running                          62m
miyadav-11-rdnr9-worker-vzds4   Running                          3h19m

[miyadav@miyadav bugvsphere]$ oc get nodes
NAME                            STATUS     ROLES    AGE     VERSION
miyadav-11-rdnr9-master-0       Ready      master   3h28m   v1.18.2
miyadav-11-rdnr9-master-1       Ready      master   3h28m   v1.18.2
miyadav-11-rdnr9-master-2       Ready      master   3h28m   v1.18.2
miyadav-11-rdnr9-worker-4gqcp   Ready      worker   3h16m   v1.18.2
miyadav-11-rdnr9-worker-r84ws   Ready      worker   59m     v1.18.2
miyadav-11-rdnr9-worker-vzds4   NotReady   worker   3h16m   v1.18.2


Actual & Expected :
VM should not be reconciled as it is in power-off status


Additional info :
.
.
.
I0513 06:24:04.842226       1 reconciler.go:224] miyadav-11-rdnr9-worker-vzds4: reconciling network
I0513 06:24:04.845646       1 reconciler.go:823] Getting network status: object reference: vm-133
I0513 06:24:04.845669       1 reconciler.go:832] Getting network status: device: VM Network, macAddress: 00:50:56:ab:b2:1b
I0513 06:24:04.845674       1 reconciler.go:837] Getting network status: getting guest info
I0513 06:24:04.847497       1 reconciler.go:324] miyadav-11-rdnr9-worker-vzds4: reconciling network: IP addresses: [{InternalDNS miyadav-11-rdnr9-worker-vzds4}]
I0513 06:24:04.847579       1 reconciler.go:620] miyadav-11-rdnr9-worker-vzds4: Updating provider status
I0513 06:24:04.851413       1 machine_scope.go:99] miyadav-11-rdnr9-worker-vzds4: patching machine
.
Do we need another PR to show the status as "not running" when machine is already powered off ?

Comment 6 Alberto 2020-05-13 07:24:30 UTC
He Milind Phase=running is expected (it means the machine have a node associated regardless of the particular provider state) and there's a separate ticket to communicate that in a more meaningful manner.

What do you get with oc get machines -owide?

Comment 7 Milind Yadav 2020-05-13 08:17:04 UTC
hi Alberto, I get this :

[miyadav@miyadav bugvsphere]$ oc get machines -o wide
NAME                            PHASE     TYPE   REGION   ZONE   AGE    NODE                            PROVIDERID                                       STATE
miyadav-11-rdnr9-master-0       Running                          5h9m   miyadav-11-rdnr9-master-0       vsphere://422bf7b4-e5a5-4cd2-688b-8a5066b953f9   
miyadav-11-rdnr9-master-1       Running                          5h9m   miyadav-11-rdnr9-master-1       vsphere://422b7892-468b-6e9c-d789-da7d2dd4529f   
miyadav-11-rdnr9-master-2       Running                          5h9m   miyadav-11-rdnr9-master-2       vsphere://422b253b-cc8e-849b-1646-c44374b14589   
miyadav-11-rdnr9-worker-4gqcp   Running                          5h     miyadav-11-rdnr9-worker-4gqcp   vsphere://422bec97-5caa-d7ca-7a1d-fa464da67adb   
miyadav-11-rdnr9-worker-r84ws   Running                          163m   miyadav-11-rdnr9-worker-r84ws   vsphere://422b1512-4878-8ae2-04ba-d1589baa2117   
miyadav-11-rdnr9-worker-vzds4   Running                          5h     miyadav-11-rdnr9-worker-vzds4   vsphere://422b9b12-73dc-f5c5-8905-06d1e9459e9d   


Other info that I wanted to share is , the instanceState is updated in the poweredoff machine properly :
.
.
  providerStatus:
    conditions:
    - lastProbeTime: "2020-05-13T03:14:22Z"
      lastTransitionTime: "2020-05-13T03:14:22Z"
      message: Machine successfully created
      reason: MachineCreationSucceeded
      status: "True"
      type: MachineCreation
    instanceId: 422b9b12-73dc-f5c5-8905-06d1e9459e9d
    instanceState: poweredOff
    taskRef: task-652

Comment 8 Milind Yadav 2020-05-13 08:25:03 UTC
Missed adding cluster version to comment#5 adding here : [miyadav@miyadav bugvsphere]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.nightly-2020-05-12-224129   True        False         4h55m   Cluster version is 4.5.0-0.nightly-2020-05-12-224129

Comment 9 Alberto 2020-05-13 08:49:53 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1829333#c7

ok, that lgtm. There's a separate ticket to fill the STATE field.

Comment 10 errata-xmlrpc 2020-07-13 17:32:50 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:2409


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