[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-6402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13968249#comment-13968249
 ] 

ASF subversion and git services commented on CLOUDSTACK-6402:
-------------------------------------------------------------

Commit 800e9dbac5f1a2ccdb8b202d9061239ee71879fb in cloudstack's branch 
refs/heads/4.4 from [~koushikd]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=800e9db ]

CLOUDSTACK-6402: Fix StopCommand so that VMs are not removed accidentally as 
part of vmsync
Added a new flag 'checkBeforeCleanup' to StopCommand based on which check is 
done to see if VM is running in HV host.
If VM is running then in this case it is not stopped and the operation bails 
out.
Also modified the MS code to call the StopCommand with appropriate value for 
the flag based on the context.
Currently it is only set to 'true' when called from the new vmsync logic based 
on powerstate of VM. For rest it
is set to 'false' meaning no change in behaviour.


> Fix StopCommand so that VMs are not removed accidentally as part of vmsync
> --------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-6402
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6402
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Hypervisor Controller, Management Server
>    Affects Versions: 4.4.0
>            Reporter: Koushik Das
>            Assignee: Koushik Das
>             Fix For: 4.4.0
>
>
> In order to prevent any side effects of out of band StopCommand issued by MS 
> as part of vmsync, some changes are required in the HV specific resource 
> layer. The StopCommand handler needs to be slightly changed as follows:
> 1. A new flag 'checkBeforeCleanup' will be introduced in the StopCommand
> 2. If the flag is not set (i.e. checkBeforeCleanup = false) then the existing 
> behaviour holds
> 3. If the flag is set (i.e. checkBeforeCleanup = true) then check status of 
> VM on the HV
> a. If VM is running on HV then simply bailout without doing anything (return 
> an answer like StopAnswer(cmd, "VM is running on host, bailing out", false)
> b. If not then do the same as step 2.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to