You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/04/17 21:13:16 UTC

[jira] [Commented] (CLOUDSTACK-2071) calling startVirtualMachine can report success even when VMs fail to start

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

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

Commit 8d0bea994dcd74cd6707b58ac2e4060a93f52d96 in branch refs/heads/master from Marcus Sorensen <ma...@betterservers.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=8d0bea9 ]

CLOUDSTACK-2071 - VirtualMachineManagerImpl.java start() method for instance
can fail to start a VM without notifying caller, if no exception is triggered.
The result is that VM start looks successful but was not. This fixes it by
throwing an exception at the very end if the object to be passed back is still
null.

Signed-off-by: Marcus Sorensen <ma...@betterservers.com> 1366225829 -0600

                
> calling startVirtualMachine can report success even when VMs fail to start
> --------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-2071
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2071
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.1.0, 4.2.0
>            Reporter: Marcus Sorensen
>            Assignee: Marcus Sorensen
>            Priority: Blocker
>             Fix For: 4.1.0, 4.2.0
>
>
> startVirtualMachine eventually ends up in VMEntityManagerImpl.java, which calls:
>  VMInstanceVO vmDeployed = _itMgr.start(vm, params, _userDao.findById(new Long(caller)), _accountDao.findById(vm.getAccountId()), plan);
> It does nothing with vmDeployed. Now, looking at that start() method in VirtualMachineManagerImpl.java, if startAnswer.getResult is true, we populate the "startedVm" variable and pass it back. If false ( vm failed to start), we print the error in the management server's log, then we catch a bunch of exceptions that could occur, but then happily pass back null in the variable "startedVm". No exception was thrown, so the management server acts as though the start of the VM succeeded.
> This was previously masked by an exception thrown by the host agent, which was recently fixed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira