From 45b7e135293d20364b8fef1e39795188fa25a24e Mon Sep 17 00:00:00 2001 From: Edison Su Date: Thu, 6 Oct 2011 17:19:16 -0700 Subject: [PATCH] bug 11583: it's a timing issue, if you hot plug a nic to domR, need to make sure the device is shown up in the domr, then you can programming ipassoc rules. Wait 20s after hot plug the nic, then programming the ipassoc rules status 11583: resolved fixed --- .../resource/computing/LibvirtComputingResource.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java index dbcb830e4e2..dfe19744029 100644 --- a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java +++ b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java @@ -1105,8 +1105,14 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv InterfaceDef nic = createVif(conn, nicTO, InterfaceDef.nicModel.VIRTIO); Domain vm = getDomain(conn, vmName); vm.attachDevice(nic.toString()); + + try { + Thread.sleep(10000); + } catch (InterruptedException e) { + } + } - + public Answer execute(IpAssocCommand cmd) { String routerName = cmd.getAccessDetail(NetworkElementCommand.ROUTER_NAME); String routerIp = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);