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
This commit is contained in:
Edison Su 2011-10-06 17:19:16 -07:00
parent dce06146af
commit 45b7e13529
1 changed files with 7 additions and 1 deletions

View File

@ -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);