incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jayapal Reddy Uradi <>
Subject RE: [ISSUE] Failed to create vm instance from template or ISO due to null Exception
Date Wed, 29 Aug 2012 09:13:20 GMT
Hi Gavin,

There is a mistake  while committing to ASF,  changes
applied incorrectly.
The new changes are committed to ASF.
You can't change to findByNetworkIdAndType because it will cause wrong dns ip to VM in multiple
pods case.

Thanks for finding the issue.


-----Original Message-----
From: Gavin Lee [] 
Sent: Tuesday, August 28, 2012 4:22 PM
Subject: [ISSUE] Failed to create vm instance from template or ISO due to null Exception

I recently encountered this issue when first time create instance from template or ISO.
Each time after domR created, the UI will pop up below message:
Resource [Host:1] is unreachable: Host 1: Unable to start instance due to null

Further analysis in CS log indicates the null exception in below location:

I found the function call change from _nicDao.findByNetworkIdAndType to _nicDao.findByNetworkIdTypeAndGateway,
see below:

git diff a5248f1cfc20faab30c6a6b02f55d9b697ffbe1d
diff --git a/server/src/com/cloud/network/router/
index 5528f79..730ce28 100755
--- a/server/src/com/cloud/network/router/
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager
@@ -2414,7 +2414,7 @@ public class VirtualNetworkApplianceManagerImpl
implements VirtualNetworkApplian

                //find domR's nic in the network
-               NicVO domrDefaultNic =
VirtualMachine.Type.DomainRouter, defaultNic.getGateway());
+               NicVO domrDefaultNic =
                return domrDefaultNic.getIp4Address();

When I change back to use function _nicDao.findByNetworkIdAndType, issue resolved.

The commit log says the change to "Fix for dns issue in multiple pods";

I think the change caused a side-effect. If we are good to use function findByNetworkIdAndType,
I will submit a patch.



View raw message