Bug 1114903

Summary: Reason does not get updated when trying to shut down a VM which is Powering up of Shutting Down
Product: [Retired] oVirt Reporter: Maor <mlipchuk>
Component: ovirt-engine-coreAssignee: Ravi Nori <rnori>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5CC: amureini, gklein, iheim, jbelka, ofrenkel, oourfali, rbalakri, rnori, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: infra
Fixed In Version: ovirt-3.5.0-beta1.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:37:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log
none
engine.log none

Description Maor 2014-07-01 08:56:19 UTC
Created attachment 913707 [details]
engine.log

Description of problem:
When trying to stop the VM while it is powering up or shutting down, the reason comment does not get saved in the DB

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


How reproducible:
100%

Steps to Reproduce:
1. Update the cluster to enable optional reason
2. Run a VM and wait until it is UP
3. Shut down the VM with some reason
4. While the VM is powering down, shut down the VM again, and add a new comment

Actual results:
The Reason gets deleted.

Expected results:
On the second shut down, the reason text box should be initialized with the former reason text, and the user will be allowed to edit it as he will

Additional info:

Comment 1 Jiri Belka 2014-07-31 08:56:04 UTC
Created attachment 922856 [details]
engine.log

Not sure it works as it should:

- shutdown (reason: 1)
- shutdown (reason: 1j - previous msg is visible, I just appended 'j')

'1j' is not saved, am I slow or is it broken? Please see attached log.

Comment 2 Jiri Belka 2014-07-31 08:56:40 UTC
Please see #1. Thank you.

Comment 3 Jiri Belka 2014-07-31 08:58:35 UTC
...
thread-25) [3d2aa247] Running command: StopVmCommand(StopVmType = CANNOT_SHUTDOWN, StopReason = , QuotaId = null, VmId = 5f7fab0f-30dd-4033-92e2-115221892c80) internal: true. Entities affected :  ID: 5f7fab0f-30dd-4033-92e2-115221892c80 Type: VM
2014-07-31 10:51:24,505 INFO  [org.ovirt.engine.core.vdsbroker.DestroyVmVDSCommand] (org.ovirt.thread.pool-8-thread-25) [3d2aa247] START, DestroyVmVDSCommand(HostName = dell-r210ii-03,
...

StopReason is empty (it was 1j before), then there's destroy of the vm?

Comment 4 Ravi Nori 2014-07-31 13:45:09 UTC
There was an issue while invoking two consecutive Shutdown commands, I have pushed a patch for that

Comment 5 Sandro Bonazzola 2014-10-17 12:37:41 UTC
oVirt 3.5 has been released and should include the fix for this issue.