[
https://issues.apache.org/jira/browse/CLOUDSTACK-9207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260903#comment-15260903
]
ASF GitHub Bot commented on CLOUDSTACK-9207:
--------------------------------------------
Github user swill commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1304#discussion_r61333278
--- Diff: test/integration/component/test_vpc_network.py ---
@@ -2683,6 +2687,65 @@ def setUp(self):
def tearDown(self):
return
+ def listRouter(self):
+ routers = Router.list(
+ self.apiclient,
+ vpcid=self.vpc.id,
+ listall="true"
+ )
+ self.assertEqual(validateList(routers)[0], PASS, "Invalid router
response")
+ return routers[0]
+
+ def secondaryIP(self, router):
+ hosts = list_hosts(
+ self.apiclient,
+ id=router.hostid
+ )
+ self.assertEqual(validateList(hosts)[0], PASS, "Invalid host
response")
+ host = hosts[0]
+ if self.hypervisor.lower() in ('vmware', 'hyperv'):
+ # SSH into system vms is done via management server for Vmware
and
+ # Hyper-V
+ result = get_process_status(
+ self.apiclient.connection.mgtSvr,
+ 22,
+ self.apiclient.connection.user,
+ self.apiclient.connection.passwd,
+ router.privateip,
+ "ip addr show",
+ hypervisor=self.hypervisor
+ )
+ else:
+ try:
+ host.user, host.passwd = get_host_credentials(
+ self.config, host.ipaddress
+ )
+ result = get_process_status(
+ host.ipaddress,
+ 22,
+ host.user,
+ host.passwd,
+ router.linklocalip,
+ "ip addr show"
+ )
+ except KeyError:
+ self.skipTest("Marvin configuration has no host
credentials to check router services")
+ return result
+
+ def validateResult(self, output):
+ ip = self.public_ip_1.ipaddress.ipaddress
+ reg = re.compile(ip)
+ for line in output:
+ m = reg.search(line)
+ if m:
+ break
+ if m.group(0) == ip and re.search("secondary", line):
--- End diff --
`m` is not guaranteed to be set. You need to check `if m and len(m.group)
> 0 ...` before you can try to access it. Check the `Error` in the CI result.
> Test to verify if additional ipaddress on vpcVR is removed if the network is
> restarted with cleanup
> ---------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-9207
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9207
> Project: CloudStack
> Issue Type: Test
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Sanjeev N
> Assignee: Sanjeev N
>
> Test to check restarting vpc network (tier) with cleanup does not delete the
> secondary ip address from the VR.
> Steps followed:
> ============
> 1.Create VPC, tier and deploy vm in the tier
> 2.Acquire additional IP address and configure StaticNAT with vm created in
> step1
> 3.Restart vpc network with clean up
> Expected Result:
> ==============
> Secondary ip address (IP configured on VPC VR's public interface) should not
> be deleted ( or it should be configured on vr) after network restart with
> cleanup.
> RootCause:
> =========
> As part of clean up, CS deletes all the network configuration from the VR and
> it configures again. However, the reconfiguration did not include the
> additional ip addresses.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)