GitHub user likitha opened a pull request:

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

    CLOUDSTACK-8611. CS waits indefinitely for CheckS2SVpnConnectionsComm…

    …and to return.
    
    While remote executing commands through ssh, handle channel condition of 
EOF because we wait for the the condition.
    
    CheckS2SVpnConnectionsCommand execution involves executing a script 
(checkbatchs2svpn.sh) in the virtual router. Once CS has opened a session to a 
virtual router and executed a script in the router, it waits indefinitely till 
the session either times-out or the exit status of the remote process is 
available. But it is possible that an EOF is reached by the process in the 
router and the router never set the exit status.
    
    References -
    1. Some servers never send the exist status, or occasionally "forget" to do 
so 
(http://grepcode.com/file/repo1.maven.org/maven2/org.jvnet.hudson/trilead-ssh2/build212-hudson-1/com/trilead/ssh2/ChannelCondition.java).
    2. Get the exit code/status from the remote command - if available. Be 
careful - not all server implementations return this value - 
(http://grepcode.com/file/repo1.maven.org/maven2/org.jvnet.hudson/trilead-ssh2/build212-hudson-1/com/trilead/ssh2/Session.java#Session.waitForCondition%28int%2Clong%29).
    
    Hence if exit status is not set then the command will never return.

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

    $ git pull https://github.com/likitha/cloudstack CLOUDSTACK-8611

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

    https://github.com/apache/cloudstack/pull/561.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 #561
    
----
commit b9181c689e0e7b5f1e28c81d73710196dfabd0ba
Author: Likitha Shetty <likitha.she...@citrix.com>
Date:   2015-05-01T11:14:51Z

    CLOUDSTACK-8611. CS waits indefinitely for CheckS2SVpnConnectionsCommand to 
return.
    While remote executing commands through ssh, handle channel condition of 
EOF because we wait for the the condition.

----


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