This fixes a null pointer if selected pool on which to deploy is unable
to be looked up via id. Used the same coding style found in the original
code (large if/else block).
If this is accepted, I'll fix master too. This patch doesn't apply
cleanly, but the code is very similar.
Testing:
Fixed broken system, tested against devcloud to ensure that it didn't
break a stock/fresh install (advanced zone with 3 storage pools).
Restarted VMs to ensure that the planner still functioned that way as
well.
Signed-off-by: Chip Childers <chip.childers@gmail.com>
an IP. This seems to be possible if expunge fails at some point after freeing
an IP, on subsequent expunge tries the IP is freed already and gets null pointer
when looking for account id.
BUG-ID: CLOUDSTACK-2279
Bugfix-for: 4.1,4.2
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1367251304 -0600
pass back null if we fail to connect to agent or stop the vm, rather
than something that looks like success to the stopVirtualMachine api
command.
Testing:
Applied to 4.1 branch, attempted to stop VM with KVM agent disconnected,
finally saw it fail. The logs also showed why, which is good:
2013-04-25 17:37:09,933 ERROR [cloud.vm.VirtualMachineManagerImpl]
(Job-Executor-1:job-44) Unable to stop vm, agent unavailable:
com.cloud.exception.AgentUnavailableException: Resource [Host:1] is
unreachable: Host 1: Host with specified id is not in the right state:
Disconnected
Started the KVM agent, and stopping succeeded.
Signed-off-by: Chip Childers <chip.childers@gmail.com>
In the applicationContext .xml , the context of the 'UserConcentratedPodPlanner' needs to include the list of allocators.
This will ensure that when this component is loaded by Spring, the allocators gets initialized.
Add migration to 4.1.0 in the PremiumDatabaseUpgradeChecker, like in the
DatabaseUpgradeChecker.
I opened the ticket CS 2172, and this fix corrects the issue.
Regards.
Signed-off-by: Chip Childers <chip.childers@gmail.com>
The KVM HA runner uses any NFS secondary storage resource available to a
host to store it's HA data. This causes template deletes to fail because
it cannot delete KVMHA, which is a directory that is not empty. So if
KVMHA directory is found, delete it's contents before trying to delete
it.
Tested with a new 4.1 zone deployment. Verified bug was reproducable
with 4.1 HEAD, applied patch, ran through adding two NFS primary
storages, verified KVM heartbeat was working on them, then ran various
secondary storage operations (register template, download volume, take
snapshot) and verified that they worked, and that KVM heartbeat
operations were NOT acting on them.
Signed-off-by: Chip Childers <chip.childers@gmail.com>
Fix the annotation so cloudmonkey, marvin and apidocs can process the
response of createAccount as AccountResponse and not UserResponse as was
previously mapped.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>