GitHub user nvazquez opened a pull request:

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

    CLOUDSTACK-9470: [BLOCKER] Fix for test_network_acl, SshHelper

    ## Problem
    In a Vmware environment, running `test_network_acl` we examined why 
sometimes it failed and sometimes it passed. It was discovered that issue was 
on `VmwareResource`:
    
    ```java
    private int findRouterEthDeviceIndex(String domrName, String routerIp, 
String mac) throws Exception {
            VmwareManager mgr = 
getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
    
            s_logger.info("findRouterEthDeviceIndex. mac: " + mac);
    
            // TODO : this is a temporary very inefficient solution, will 
refactor it later
            Pair<Boolean, String> result = SshHelper.sshExecute(routerIp, 
DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "ls 
/proc/sys/net/ipv4/conf");
    ...
    }
    ```
    
    Command sent to router returned a pair which its first parameter was always 
true but second parameter sometimes it was null and sometimes the correct 
output for given command.
    
    ## Solution
    Examining `SshHelper` we discovered that cases in which second parameter in 
result was null, didn't consume stdout properly

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

    $ git pull https://github.com/nvazquez/cloudstack sshhelperissue

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

    https://github.com/apache/cloudstack/pull/1660.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 #1660
    
----
commit ade0a795e51bdceb65311d9e8bcc81853335ffe5
Author: nvazquez <nicovazque...@gmail.com>
Date:   2016-08-24T12:32:55Z

    CLOUDSTACK-9470: Fix for SshHelper

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to