Merge pull request #1681 from murali-reddy/router_eth_device_index CLOUDSTACK-9491: incorrect parsing of device list to find ethernet index of plugged NICIn VmwareResource, findRouterEthDeviceIndex() method find ethernet interface index given the mac address. This method is used, once a nic is plugged to determine ethernet interface. "/proc/sys/net/ipv4/conf" from the VR and looped through the devices to find the right ethernet interface. Howver current logic read it once, and loops through the device list. Its observerd device may not show up '/proc/sys/net/ipv4/conf' immediatly once NIC is plugged in the VM from vCenter.
Fix ensured, while waiting for 15 sec in the loop, read the latest content from /proc/sys/net/ipv4/conf , so that right device list is processed. Manual tested VPC scenarios of adding new tiers which uses findRouterEthDeviceIndex, to find the guest/public network ethernet index. * pr/1681: CLOUDSTACK-9491: incorrect parsing of device list to find ethernet index of plugged NIC Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1f218480 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1f218480 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1f218480 Branch: refs/heads/master Commit: 1f2184800bd93d7a020a8a66d19c22be68b1d508 Parents: 55b9180 b449351 Author: Rohit Yadav <[email protected]> Authored: Wed Nov 23 14:28:12 2016 +0530 Committer: Rohit Yadav <[email protected]> Committed: Wed Nov 23 14:28:12 2016 +0530 ---------------------------------------------------------------------- .../hypervisor/vmware/resource/VmwareResource.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f218480/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java ----------------------------------------------------------------------
