You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by miguelaferreira <gi...@git.apache.org> on 2015/10/23 17:03:40 UTC

[GitHub] cloudstack pull request: Fix error message in test_isolate_network...

GitHub user miguelaferreira opened a pull request:

    https://github.com/apache/cloudstack/pull/972

    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'"

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/miguelaferreira/cloudstack test_isolate_network_FW_PF_default_routes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/972.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #972
    
----
commit c59de915c6d1f860368a01d8256ff1ff24996759
Author: Miguel Ferreira <mi...@me.com>
Date:   2015-10-23T10:03:55Z

    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'"

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix error message in test_isolate_network...

Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on the pull request:

    https://github.com/apache/cloudstack/pull/972#issuecomment-150635269
  
    Thanks @miguelaferreira, run the tests and it works fine! LGTM
    
    ```
    nosetests --with-marvin --marvin-config=${marvinCfg} -s -a tags=advanced,required_hardware=true component/test_routers_network_ops.py
    ```
    
    Result:
    ```
    [root@cs1 integration]# cat /tmp/MarvinLogs/test_routers_network_ops_7G39VV/results.txt 
    Stop existing router, add a PF rule and check we can access the VM ... === TestName: test_isolate_network_FW_PF_default_routes | Status : SUCCESS ===
    ok
    Test redundant router internals ... === TestName: test_RVR_Network_FW_PF_SSH_default_routes | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 2 tests in 826.664s
    
    OK
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix error message in test_isolate_network...

Posted by borisroman <gi...@git.apache.org>.
Github user borisroman commented on the pull request:

    https://github.com/apache/cloudstack/pull/972#issuecomment-150668944
  
    Ok, here they are:
    
    ```
    === TestName: test_isolate_network_FW_PF_default_routes | Status : SUCCESS ===
    ok
    === TestName: test_RVR_Network_FW_PF_SSH_default_routes | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 2 tests in 625.122s
    
    OK
    ```
    
    LGTM :+1: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix error message in test_isolate_network...

Posted by miguelaferreira <gi...@git.apache.org>.
Github user miguelaferreira commented on the pull request:

    https://github.com/apache/cloudstack/pull/972#issuecomment-150602167
  
    I've tested this in a 2 KVM hosts setup (a.k.a [mct-zone1-kvm1-kvm2.cfg](https://github.com/schubergphilis/MCT-shared/blob/master/marvin/mct-zone1-kvm1-kvm2.cfg)) 
    ```
    nosetests --with-marvin --marvin-config=mct-zone1-kvm1-kvm2.cfg test/integration/component/test_routers_network_ops.py -s -a tags=advanced,required_hardware=true
    ```
    and these were the results (with a couple extra line breaks for readability):
    ```
    Stop existing router, add a PF rule and check we can access the VM ...
    === TestName: test_isolate_network_FW_PF_default_routes | Status : SUCCESS ===
    ok
    Test redundant router internals ... 
    === TestName: test_RVR_Network_FW_PF_SSH_default_routes | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 2 tests in 884.044s
    
    OK
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix error message in test_isolate_network...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/972


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---