Thanks Jayapal for your kind reply. I saw the fix. On Wed, Aug 29, 2012 at 5:13 PM, Jayapal Reddy Uradi <jayapalreddy.ur...@citrix.com> wrote: > Hi Gavin, > > There is a mistake while committing VirtualNetworkApplianceManagerImpl.java > 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. > > -- > Jayapal > > > -----Original Message----- > From: Gavin Lee [mailto:gavin....@gmail.com] > Sent: Tuesday, August 28, 2012 4:22 PM > To: cloudstack-dev@incubator.apache.org > Subject: [ISSUE] Failed to create vm instance from template or ISO due to > null Exception > > Dears, > 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: > com.cloud.network.router.VirtualNetworkApplianceManagerImpl.findDefaultDnsIp(VirtualNetworkApplianceManagerImpl.java:2429) > > I found the function call change from _nicDao.findByNetworkIdAndType to > _nicDao.findByNetworkIdTypeAndGateway, see below: > > git diff a5248f1cfc20faab30c6a6b02f55d9b697ffbe1d > 2bf5c99bc6f18c751944181e687429ce4e7e4686 > server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java > diff --git > a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java > b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java > index 5528f79..730ce28 100755 > --- > a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java > +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager > +++ Impl.java > @@ -2414,7 +2414,7 @@ public class VirtualNetworkApplianceManagerImpl > implements VirtualNetworkApplian > } > > //find domR's nic in the network > - NicVO domrDefaultNic = > _nicDao.findByNetworkIdTypeAndGateway(defaultNic.getNetworkId(), > VirtualMachine.Type.DomainRouter, defaultNic.getGateway()); > + NicVO domrDefaultNic = > _nicDao.findByNetworkIdAndType(defaultNic.getNetworkId(), > VirtualMachine.Type.DomainRouter); > 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. > > Thanks. > > -- > Gavin
-- Gavin