Description of problem:
When you use power operation shutdown guest on RHV VM, the Last Boot Time operation is lost without any good reason.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Have a CFME appliance with RHV as infrastructure provider
2. Provision a VM from a template on RHV provider
3. Wait for that VM to be provision and make sure it's up. Take note of Power Management -> Last Boot Time
4. Go to VM's detail page -> Power -> Shutdown Guest. Wait for the VM to be shut down.
5. Refresh VM's details page and inspect Power Management -> Last Boot Time
The content of Last Boot Time is "N/A".
Even though VM is not up, there's no reason to lose information about time of VM's last boot. Therefore I'd expect it to be available.
I can still able to reproduce this issue on version: 126.96.36.199
Hence reopening this BZ.
Discussed with @Roberto,
1] For rhv43 provider, If Vm is in off state(by shutdown or power off operations) then we lose 'Last Boot Time' always. And it changes to 'N/A'
2] Also checked with VMWare provider, In this case, sometimes we lose 'Last Boot Time' for Vm which is in 'Off' power state. This is not always reproducible.
New commit detected on ManageIQ/manageiq-providers-ovirt/master:
Author: Roberto Ciatti <firstname.lastname@example.org>
AuthorDate: Fri Aug 30 10:16:16 2019 -0400
Commit: Roberto Ciatti <email@example.com>
CommitDate: Fri Aug 30 10:16:16 2019 -0400
Preserving Last Boot time
When a vm goes in down status, the start_time info is missing and we can
avoid to overwrite with a nil the information we may already have.
app/models/manageiq/providers/redhat/inventory/parser/infra_manager.rb | 14 +-
spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_async_graph_spec.rb | 17 +
2 files changed, 27 insertions(+), 4 deletions(-)