[
https://issues.apache.org/jira/browse/CLOUDSTACK-7186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14076196#comment-14076196
]
Saksham Srivastava commented on CLOUDSTACK-7186:
------------------------------------------------
The issue is happening because of failure during comparison of mac address of
vpc router in nics table and the mac address of the router on the hypervisor.
In a Xenserver setup, CitrixResourceBase.java:
prepareNetworkElementCommand(SetNetworkACLCommand cmd)
NicTO nic = cmd.getNic();
VIF vif = getVifByMac(conn, router, nic.getMac());
//vif turns out to be null.
Similarly in
prepareNetworkElementCommand(SetupGuestNetworkCommand cmd)
String mac = nic.getMac();
VIF domrVif = null;
for (VIF vif : vm.getVIFs(conn)) {
String lmac = vif.getMAC(conn);
if (lmac.equals(mac)) {
domrVif = vif;
break;
}
}
if (domrVif == null) {
return new ExecutionResult(false, "Can not find vif with mac "
+ mac + " for VM " + domrName);
}
lmac and mac do not match and null value is returned and hence the NPE.
> [Automation] Router programming fails while calling SetupGuestNetworkCommand
> and VM deployment fails
> ----------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-7186
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7186
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Virtual Router
> Affects Versions: 4.5.0
> Environment: KVM (not verified with other hyper-visors)
> Master
> Reporter: Rayees Namathponnan
> Priority: Blocker
> Fix For: 4.5.0
>
>
> This issue is observed in automation run, failed to configure VR after
> deploying the VM , observed below error
> Failed to prepare VR command due to Can not find nic with mac
> 02:00:7d:56:00:02 for VM r-16-VM
> Agent log
> Can not find nic with mac 02:00:7d:56:00:02
> 2014-07-25 16:25:38,061 DEBUG [cloud.agent.Agent]
> (agentRequest-Handler-1:null) Request:Seq 2-4214524826288652384: {
> Cmd , MgmtId: 29066118877352, via: 2, Ver: v1, Flags: 100111,
> [{"com.cloud.agent.api.SetupGuestNetworkCommand":{"dhcpRange":"10.1.1.1","networkDomain":"vpc.vpn","isRedundant":false,"add":false,"nic":{"deviceId":2,"networkRateMbps":200,"defaultNic":false,"pxeDisable":true,"nicUuid":"bad86d37-eedb-4c0b-8752-0631d5e74f1a","uuid":"b34acc98-77d7-4aa6-9a97-4417b1d1f579","ip":"10.1.1.1","netmask":"255.255.255.192","gateway":"10.1.1.1","mac":"02:00:7d:56:00:02","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://2352","isolationUri":"vlan://2352","isSecurityGroupEnabled":false},"accessDetails":{"router.guest.ip":"10.1.1.1","guest.vlan.tag":"2352","guest.network.gateway":"10.1.1.1","guest.bridge":"10.1.1.63","router.ip":"169.254.2.226","router.name":"r-16-VM"},"wait":0}}]
> }
> 2014-07-25 16:25:38,062 DEBUG [cloud.agent.Agent]
> (agentRequest-Handler-1:null) Processing command:
> com.cloud.agent.api.SetupGuestNetworkCommand
> 2014-07-25 16:25:38,071 ERROR
> [resource.virtualnetwork.VirtualRoutingResource]
> (agentRequest-Handler-1:null) Failed to prepare VR command due to Can not
> find nic with mac 02:00:7d:56:00:02 for VM r-16-VM
> 2014-07-25 16:25:38,071 DEBUG [cloud.agent.Agent]
> (agentRequest-Handler-1:null) Seq 2-4214524826288652384: { Ans: , MgmtId:
> 29066118877352, via: 2, Ver: v1, Flags: 110,
> [{"com.cloud.agent.api.Answer":{"result":false,"details":"Can not find nic
> with mac 02:00:7d:56:00:02 for VM r-16-VM","wait":0}}] }
> 2014-07-25 16:25:38,171 DEBUG [cloud.agent.Agent]
> (agentRequest-Handler-2:null) Request:Seq 2-4214524826288652385: { Cmd ,
> MgmtId: 29066118877352, via: 2, Ver: v1, Flags: 100111,
> [{"com.cloud.agent.api.SetupGuestNetworkCommand":{"dhcpRange":"10.1.1.1","networkDomain":"vpc.vpn","isRedundant":false,"add":false,"nic":{"deviceId":2,"networkRateMbps":200,"defaultNic":false,"pxeDisable":true,"nicUuid":"bad86d37-eedb-4c0b-8752-0631d5e74f1a","uuid":"b34acc98-77d7-4aa6-9a97-4417b1d1f579","ip":"10.1.1.1","netmask":"255.255.255.192","gateway":"10.1.1.1","mac":"02:00:7d:56:00:02","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://2352","isolationUri":"vlan://2352","isSecurityGroupEnabled":false},"accessDetails":{"router.guest.ip":"10.1.1.1","guest.vlan.tag":"2352","guest.network.gateway":"10.1.1.1","guest.bridge":"10.1.1.63","router.ip":"169.254.2.226","router.name":"r-16-VM"},"wait":0}}]
> }
> 2014-07-25 16:25:38,172 DEBUG [cloud.agent.Agent]
> (agentRequest-Handler-2:null) Processing command:
> com.cloud.agent.api.SetupGuestNetworkCommand
> 2014-07-25 16:25:38,180 ERROR
> [resource.virtualnetwork.VirtualRoutingResource]
> (agentRequest-Handler-2:null) Failed to prepare VR command due to Can not
> find nic with mac 02:00:7d:56:00:02 for VM r-16-VM
> 2014-07-25 16:25:38,181 DEBUG [cloud.agent.Agent]
> (agentRequest-Handler-2:null) Seq 2-4214524826288652385: { Ans: , MgmtId:
> 29066118877352, via: 2, Ver: v1, Flags: 110,
> [{"com.cloud.agent.api.Answer":{"result":false,"details":"Can not find nic
> with mac 02:00:7d:56:00:02 for VM r-16-VM","wait":0}}] }
--
This message was sent by Atlassian JIRA
(v6.2#6252)