You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/10/24 09:50:50 UTC

[1/2] git commit: updated refs/heads/master to 5cacd99

Repository: cloudstack
Updated Branches:
  refs/heads/master b1c7d4b20 -> 5cacd9957


Fix error message in test_isolate_network_FW_PF_default_routes

While running test_isolate_network_FW_PF_default_routes it is expected
that SSH'ing into a VM does not work immediately. However, when it fails
(as expected) witht he follwoing error

      ====Trying SSH Connection: Host:192.168.23.12 Uer:root
    Port:22 RetryCnt:1===
      Traceback (most recent call last):
        File "/home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/venv/lib/python2.7/site-packages/marvin/sshClient.py", line 121, in createConnection timeout=self.timeout)
        File "/home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/venv/lib/python2.7/site-packages/paramiko/client.py", line 251, in connect retry_on_signal(lambda: sock.connect(addr))
        File /home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/venv/lib/python2.7/site-packages/paramiko/util.py", line 270, in retry_on_signal return function()
        File /home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/venv/lib/python2.7/site-packages/paramiko/client.py", line 251, in <lambda> retry_on_signal(lambda: sock.connect(addr))
        File "/usr/lib64/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args)
      error: [Errno 113] No route to host

it would try to print a message that generates a actual error:

  DEBUG: ====Trying SSH Connection: Host:192.168.23.12 User:root
Port:22 RetryCnt:0===
  test_isolate_network_FW_PF_default_routes
(integration.component.test_routers_network_ops.TestIsolatedNetworks):
CRITICAL: EXCEPTION: test_isolate_network_FW_PF_default_routes:
    Traceback (most recent call last):,
      File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
testMethod()',
      File "/home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/test/integration/component/test_routers_network_ops.py", line 448, in test_isolate_network_FW_PF_default_routes self.fail("Failed to SSH into VM - %s" % (public_ip.ipaddress.ipaddress)),
      "AttributeError: 'unicode' object has no attribute 'ipaddress'"


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c59de915
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c59de915
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c59de915

Branch: refs/heads/master
Commit: c59de915c6d1f860368a01d8256ff1ff24996759
Parents: fb0871b
Author: Miguel Ferreira <mi...@me.com>
Authored: Fri Oct 23 12:03:55 2015 +0200
Committer: Miguel Ferreira <mi...@me.com>
Committed: Fri Oct 23 17:01:07 2015 +0200

----------------------------------------------------------------------
 .../component/test_routers_network_ops.py       | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c59de915/test/integration/component/test_routers_network_ops.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_routers_network_ops.py b/test/integration/component/test_routers_network_ops.py
index ba3e5e4..5702410 100644
--- a/test/integration/component/test_routers_network_ops.py
+++ b/test/integration/component/test_routers_network_ops.py
@@ -81,9 +81,9 @@ class TestRedundantIsolateNetworks(cloudstackTestCase):
             cls.api_client,
             cls.services["service_offering"]
         )
-        
+
         cls.services["nw_off_persistent_RVR"]["egress_policy"] = "true"
-        
+
         cls.network_offering = NetworkOffering.create(
                                             cls.api_client,
                                             cls.services["nw_off_persistent_RVR"],
@@ -95,7 +95,7 @@ class TestRedundantIsolateNetworks(cloudstackTestCase):
                         cls.service_offering,
                         cls.network_offering,
                         ]
-        
+
         cls.logger = logging.getLogger('TestRedundantIsolateNetworks')
         cls.stream_handler = logging.StreamHandler()
         cls.logger.setLevel(logging.DEBUG)
@@ -168,7 +168,7 @@ class TestRedundantIsolateNetworks(cloudstackTestCase):
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
                                   )
-        
+
         self.logger.debug("Deployed VM in network: %s" % network.id)
 
         vms = VirtualMachine.list(
@@ -305,7 +305,7 @@ class TestIsolatedNetworks(cloudstackTestCase):
             cls.api_client,
             cls.services["service_offering"]
         )
-        
+
         cls.services["network_offering"]["egress_policy"] = "true"
 
         cls.network_offering = NetworkOffering.create(cls.api_client,
@@ -313,7 +313,7 @@ class TestIsolatedNetworks(cloudstackTestCase):
                                                        conservemode=True)
 
         cls.network_offering.update(cls.api_client, state='Enabled')
-        
+
         cls.network = Network.create(cls.api_client,
                                       cls.services["network"],
                                       accountid=cls.account.name,
@@ -336,7 +336,7 @@ class TestIsolatedNetworks(cloudstackTestCase):
             cls.service_offering,
             cls.account
         ]
-        
+
         cls.logger = logging.getLogger('TestIsolatedNetworks')
         cls.stream_handler = logging.StreamHandler()
         cls.logger.setLevel(logging.DEBUG)
@@ -435,17 +435,17 @@ class TestIsolatedNetworks(cloudstackTestCase):
             'Active',
             "Check list port forwarding rules"
         )
-        
+
         result = 'failed'
         try:
             ssh_command = "ping -c 3 8.8.8.8"
-            self.logger.debug("SSH into VM with ID: %s" % nat_rule.ipaddress)
+            self.logger.debug("SSH into VM with IP: %s" % nat_rule.ipaddress)
 
             ssh = self.vm_1.get_ssh_client(ipaddress=nat_rule.ipaddress, port=self.services["natrule"]["publicport"], retries=5)
             result = str(ssh.execute(ssh_command))
             self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count("3 packets received")))
         except:
-            self.fail("Failed to SSH into VM - %s" % (public_ip.ipaddress.ipaddress))
+            self.fail("Failed to SSH into VM - %s" % (nat_rule.ipaddress))
 
         self.assertEqual(
                          result.count("3 packets received"),


[2/2] git commit: updated refs/heads/master to 5cacd99

Posted by re...@apache.org.
Merge pull request #972 from miguelaferreira/test_isolate_network_FW_PF_default_routes

Fix error message in test_isolate_network_FW_PF_default_routesWhile running test_isolate_network_FW_PF_default_routes it is expected
that SSH'ing into a VM does not work immediately. However, when it fails
(as expected) witht he follwoing error

      ====Trying SSH Connection: Host:192.168.23.12 Uer:root
    Port:22 RetryCnt:1===
      Traceback (most recent call last):
        File "/home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/venv/lib/python2.7/site-packages/marvin/sshClient.py", line 121, in createConnection timeout=self.timeout)
        File "/home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/venv/lib/python2.7/site-packages/paramiko/client.py", line 251, in connect retry_on_signal(lambda: sock.connect(addr))
        File /home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/venv/lib/python2.7/site-packages/paramiko/util.py", line 270, in retry_on_signal return function()
        File /home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/venv/lib/python2.7/site-packages/paramiko/client.py", line 251, in <lambda> retry_on_signal(lambda: sock.connect(addr))
        File "/usr/lib64/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args)
      error: [Errno 113] No route to host

it would try to print a message that generates a actual error:

```
  DEBUG: ====Trying SSH Connection: Host:192.168.23.12 User:root
Port:22 RetryCnt:0===
  test_isolate_network_FW_PF_default_routes
(integration.component.test_routers_network_ops.TestIsolatedNetworks):
CRITICAL: EXCEPTION: test_isolate_network_FW_PF_default_routes:
    Traceback (most recent call last):,
      File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
testMethod()',
      File "/home/jenkins/workspace/mccloud/mct-run-marvin-tests@2/test/integration/component/test_routers_network_ops.py", line 448, in test_isolate_network_FW_PF_default_routes self.fail("Failed to SSH into VM - %s" % (public_ip.ipaddress.ipaddress)),
      "AttributeError: 'unicode' object has no attribute 'ipaddress'"
```

* pr/972:
  Fix error message in test_isolate_network_FW_PF_default_routes

Signed-off-by: Remi Bergsma <gi...@remi.nl>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5cacd995
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5cacd995
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5cacd995

Branch: refs/heads/master
Commit: 5cacd995700a915d239a45b23bd8ea8e5a4fca8f
Parents: b1c7d4b c59de91
Author: Remi Bergsma <gi...@remi.nl>
Authored: Sat Oct 24 09:49:53 2015 +0200
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Sat Oct 24 09:49:53 2015 +0200

----------------------------------------------------------------------
 .../component/test_routers_network_ops.py       | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------