mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-9187 - Makes code ready for more something like ethXXXX, if we ever get that far
- Adds log info to NetworkOrchestrator in order to make the work of the Net-Scavenger more visible.
This commit is contained in:
parent
2aab4c142d
commit
f5a6dee8dd
|
|
@ -586,6 +586,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||
@Override
|
||||
public boolean start() {
|
||||
final int netGcInterval = NumbersUtil.parseInt(_configDao.getValue(NetworkGcInterval.key()), 60);
|
||||
s_logger.info("Network Manager will run the NetworkGarbageCollector every '" + netGcInterval + "' seconds.");
|
||||
|
||||
_executor.scheduleWithFixedDelay(new NetworkGarbageCollector(), netGcInterval, netGcInterval, TimeUnit.SECONDS);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2445,7 +2447,9 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||
final HashMap<Long, Long> stillFree = new HashMap<Long, Long>();
|
||||
|
||||
final List<Long> networkIds = _networksDao.findNetworksToGarbageCollect();
|
||||
final int netGcWait = NumbersUtil.parseInt(_configDao.getValue(NetworkGcWait.key()), 1);
|
||||
final int netGcWait = NumbersUtil.parseInt(_configDao.getValue(NetworkGcWait.key()), 60);
|
||||
s_logger.info("NetworkGarbageCollector uses '" + netGcWait + "' seconds for GC interval.");
|
||||
|
||||
for (final Long networkId : networkIds) {
|
||||
|
||||
if (!_networkModel.isNetworkReadyForGc(networkId)) {
|
||||
|
|
|
|||
|
|
@ -51,13 +51,15 @@ class CsAddress(CsDataBag):
|
|||
Return CsInterface object for the lowest in use guest interface
|
||||
"""
|
||||
guest_interface = None
|
||||
lowest_device = 99
|
||||
lowest_device = 1000
|
||||
for ip in self.get_ips():
|
||||
if ip.is_guest() and ip.is_added():
|
||||
devive_sufix = int(ip.get_device()[-1:])
|
||||
if devive_sufix < lowest_device:
|
||||
lowest_device = devive_sufix
|
||||
device = ip.get_device()
|
||||
device_suffix = int(''.join([digit for digit in device if digit.isdigit()]))
|
||||
if device_suffix < lowest_device:
|
||||
lowest_device = device_suffix
|
||||
guest_interface = ip
|
||||
logging.debug("Guest interface will be set on device '%s' and IP '%s'" % (guest_interface.get_device(), guest_interface.get_ip()))
|
||||
return guest_interface
|
||||
|
||||
def get_guest_ip(self):
|
||||
|
|
|
|||
|
|
@ -523,8 +523,7 @@ class TestVPCRedundancy(cloudstackTestCase):
|
|||
self.fail("Failed to SSH into VM - %s" % (public_ip.ipaddress.ipaddress))
|
||||
|
||||
@attr(tags=["advanced", "intervlan"], required_hardware="true")
|
||||
def test_04_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL(self):
|
||||
self.skipTest("Skipping for now...")
|
||||
def test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL(self):
|
||||
""" Create a redundant VPC with two networks with two VMs in each network """
|
||||
self.logger.debug("Starting test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL")
|
||||
self.query_routers()
|
||||
|
|
@ -549,8 +548,7 @@ class TestVPCRedundancy(cloudstackTestCase):
|
|||
self.do_vpc_test(False)
|
||||
|
||||
@attr(tags=["advanced", "intervlan"], required_hardware="true")
|
||||
def test_05_redundant_VPC_default_routes(self):
|
||||
self.skipTest("Skipping for now...")
|
||||
def test_02_redundant_VPC_default_routes(self):
|
||||
""" Create a redundant VPC with two networks with two VMs in each network and check default routes"""
|
||||
self.logger.debug("Starting test_02_redundant_VPC_default_routes")
|
||||
self.query_routers()
|
||||
|
|
@ -562,7 +560,6 @@ class TestVPCRedundancy(cloudstackTestCase):
|
|||
|
||||
@attr(tags=["advanced", "intervlan"], required_hardware="true")
|
||||
def test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers(self):
|
||||
self.skipTest("Skipping for now...")
|
||||
""" Create a redundant VPC with two networks with two VMs in each network """
|
||||
self.logger.debug("Starting test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL")
|
||||
self.query_routers()
|
||||
|
|
@ -580,7 +577,7 @@ class TestVPCRedundancy(cloudstackTestCase):
|
|||
self.do_vpc_test(False)
|
||||
|
||||
@attr(tags=["advanced", "intervlan"], required_hardware="true")
|
||||
def test_01_rvpc_network_garbage_collector_nics(self):
|
||||
def test_04_rvpc_network_garbage_collector_nics(self):
|
||||
""" Create a redundant VPC with 1 Tier, 1 VM, 1 ACL, 1 PF and test Network GC Nics"""
|
||||
self.logger.debug("Starting test_04_rvpc_network_garbage_collector_nics")
|
||||
self.query_routers()
|
||||
|
|
@ -597,7 +594,7 @@ class TestVPCRedundancy(cloudstackTestCase):
|
|||
self.logger.debug("network.gc.wait is ==> %s" % gc_wait)
|
||||
self.logger.debug("network.gc.interval is ==> %s" % gc_wait)
|
||||
|
||||
total_sleep = 90
|
||||
total_sleep = 120
|
||||
if gc_wait and gc_interval:
|
||||
total_sleep = int(gc_wait[0].value) + int(gc_interval[0].value)
|
||||
else:
|
||||
|
|
@ -611,7 +608,7 @@ class TestVPCRedundancy(cloudstackTestCase):
|
|||
self.do_vpc_test(False)
|
||||
|
||||
@attr(tags=["advanced", "intervlan"], required_hardware="true")
|
||||
def test_02_rvpc_multi_tiers(self):
|
||||
def test_05_rvpc_multi_tiers(self):
|
||||
""" Create a redundant VPC with 1 Tier, 1 VM, 1 ACL, 1 PF and test Network GC Nics"""
|
||||
self.logger.debug("Starting test_04_rvpc_network_garbage_collector_nics")
|
||||
self.query_routers()
|
||||
|
|
|
|||
Loading…
Reference in New Issue