cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-9470) [BLOCKER] Fix for test_network_acl, SshHelper
Date Wed, 24 Aug 2016 13:23:20 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434919#comment-15434919
] 

ASF GitHub Bot commented on CLOUDSTACK-9470:
--------------------------------------------

Github user serg38 commented on the issue:

    https://github.com/apache/cloudstack/pull/1660
  
    Also we wrote a tester for SshHelper.sshExecute method. It was returning output of SSHexecute
command as it gets received by sshExecute. Here they are 100 sequential runs (success if result
is 100) :
    Before the fix:
    
    [root@ussarlabcsmgt41 t_vazqnadmin]# for i in `seq 1 100`;do curl "http://10.144.31.41:8096/client/api?command=testNicoSSHCommand&hostip=10.140.32.220&sshcommand=echo%20success"
2>/dev/null|head -1|grep success;done|wc -l
    ## **58**
    
    [root@ussarlabcsmgt41 t_vazqnadmin]# for i in `seq 1 100`;do curl "http://10.144.31.41:8096/client/api?command=testNicoSSHCommand&hostip=10.140.32.220&sshcommand=pwd"
2>/dev/null|head -1|grep '/root';done|wc -l
    ## **49**
    
    [root@ussarlabcsmgt41 t_vazqnadmin]# for i in `seq 1 100`;do curl "http://10.144.31.41:8096/client/api?command=testNicoSSHCommand&hostip=10.140.32.220&sshcommand=ls%20/proc/sys/net/ipv4/conf"
2>/dev/null|grep eth;done|wc -l
    ## **0**
    
    
    After the fix:
    [root@ussarlabcsmgt41 t_vazqnadmin]# for i in `seq 1 100`;do curl "http://10.144.31.41:8096/client/api?command=testNicoSSHCommand&hostip=10.140.32.220&sshcommand=echo%20success"
2>/dev/null|head -1|grep success;done|wc -l
    ## **100**
     
     
    [levitssadmin@ussclpdadubh001 ~]$ for i in `seq 1 100`;do curl "http://10.144.31.41:8096/client/api?command=testNicoSSHCommand&hostip=10.140.32.220&sshcommand=pwd"
2>/dev/null|head -1|grep '/root';done|wc -l
    ## **100**
     
    [root@ussarlabcsmgt41 t_vazqnadmin]# for i in `seq 1 100`;do curl "http://10.144.31.41:8096/client/api?command=testNicoSSHCommand&hostip=10.140.32.220&sshcommand=ls%20/proc/sys/net/ipv4/conf"
2>/dev/null|grep eth0;done|wc -l
    ## **100**


> [BLOCKER] Fix for test_network_acl, SshHelper
> ---------------------------------------------
>
>                 Key: CLOUDSTACK-9470
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9470
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: VMware
>    Affects Versions: 4.10.0
>            Reporter: Nicolas Vazquez
>            Assignee: Nicolas Vazquez
>             Fix For: 4.10.0
>
>
> h2. Problem
> In a Vmware environment, running {{test_network_acl}} we examined why it was failing,
it was discovered an issue on {{VmwareResource}}:
> {code:title=VmwareResource.java|borderStyle=solid}
> 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");
> {code}
> 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.
> h2. Solution
> Examining {{SshHelper}} we discovered that cases in which second parameter in result
was null, didn't consume stdout properly



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message