Re: stopVirtualMachine command ignores the forced parameter

2016-08-10 Thread Jeff Hair
Looks like Nathan has already opened a PR for this:
https://github.com/apache/cloudstack/pull/1632

*Jeff Hair*
Technical Lead and Software Developer

Tel: (+354) 415 0200
j...@greenqloud.com
www.greenqloud.com

On Wed, Aug 10, 2016 at 7:01 AM, Wei ZHOU  wrote:

> We also noticed this issue.
>
>
>
> 2016-08-09 19:21 GMT+02:00 Jeff Hair :
>
> > Hi,
> >
> > I'm looking at the documentation and then the code for
> stopVirtualMachine.
> > The forced parameter is passed down into the VM manager, where it seems
> to
> > be ignored. This means that cleanupEvenIfFailed during VM stop will
> always
> > be false, despite what the API command says. Going back to commit
> a4f4c986
> > in 2013, we can see that the forced parameter was used. During subsequent
> > refactoring, this seems to have vanished.
> >
>


Re: stopVirtualMachine command ignores the forced parameter

2016-08-10 Thread Wei ZHOU
We also noticed this issue.



2016-08-09 19:21 GMT+02:00 Jeff Hair :

> Hi,
>
> I'm looking at the documentation and then the code for stopVirtualMachine.
> The forced parameter is passed down into the VM manager, where it seems to
> be ignored. This means that cleanupEvenIfFailed during VM stop will always
> be false, despite what the API command says. Going back to commit a4f4c986
> in 2013, we can see that the forced parameter was used. During subsequent
> refactoring, this seems to have vanished.
>


Re: stopVirtualMachine command ignores the forced parameter

2016-08-09 Thread Nathan Johnson
Jeff Hair  wrote:

> Hi,
>
> I'm looking at the documentation and then the code for stopVirtualMachine.
> The forced parameter is passed down into the VM manager, where it seems to
> be ignored. This means that cleanupEvenIfFailed during VM stop will always
> be false, despite what the API command says. Going back to commit a4f4c986
> in 2013, we can see that the forced parameter was used. During subsequent
> refactoring, this seems to have vanished.



Jeff, after digging in I agree with you, this does look to be ignored.  So
I guess the question is: does cleanupEvenIfFailed mean the same thing as
the “forced" parameter?  If so, we could create a new overloaded
VMEntityManager / VMEntityManagerImpl stopvirtualmachine method with a bool
parameter, and then have that pass off to a new UserVMManagerImpl stop
method with a bool tacked on, and then it could pass this bool into
advanceStop.  Kind of messy, but overall wouldn’t be that much code to
change.

Thoughts?


Re: stopVirtualMachine command ignores the forced parameter

2016-08-09 Thread Simon Weller
Well, that's not good!


We were just about to implement this feature, so we'll go digging on this as 
well.


- Si


From: Jeff Hair <j...@greenqloud.com>
Sent: Tuesday, August 9, 2016 12:21 PM
To: dev@cloudstack.apache.org
Subject: stopVirtualMachine command ignores the forced parameter

Hi,

I'm looking at the documentation and then the code for stopVirtualMachine.
The forced parameter is passed down into the VM manager, where it seems to
be ignored. This means that cleanupEvenIfFailed during VM stop will always
be false, despite what the API command says. Going back to commit a4f4c986
in 2013, we can see that the forced parameter was used. During subsequent
refactoring, this seems to have vanished.


stopVirtualMachine command ignores the forced parameter

2016-08-09 Thread Jeff Hair
Hi,

I'm looking at the documentation and then the code for stopVirtualMachine.
The forced parameter is passed down into the VM manager, where it seems to
be ignored. This means that cleanupEvenIfFailed during VM stop will always
be false, despite what the API command says. Going back to commit a4f4c986
in 2013, we can see that the forced parameter was used. During subsequent
refactoring, this seems to have vanished.