mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge pull request #1274 from anshul1886/CLOUDSTACK-9196
CLOUDSTACK-9196: Fixing null pointer exception when vm meta data is synced on upgraded setuphttps://issues.apache.org/jira/browse/CLOUDSTACK-9196 NullPointerException can occur if XenServer reports non-existing VM in cloud DB. * pr/1274: CLOUDSTACK-9196: Fixing null pointer exception when vm meta data is synced on upgraded setup. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
commit
b98a989e3d
@ -2642,7 +2642,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||||||
|
|
||||||
if(!found) {
|
if(!found) {
|
||||||
VMInstanceVO vm = _vmDao.findVMByInstanceName(name);
|
VMInstanceVO vm = _vmDao.findVMByInstanceName(name);
|
||||||
if(vm.getType() == VirtualMachine.Type.User) {
|
if(vm != null && vm.getType() == VirtualMachine.Type.User) {
|
||||||
updateVmMetaData(vm.getId(), platform);
|
updateVmMetaData(vm.getId(), platform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user