Skip to content

CLOUDSTACK-8611. CS waits indefinitely for CheckS2SVpnConnectionsComm… - #561

Closed
likitha wants to merge 1 commit into
apache:masterfrom
likitha:CLOUDSTACK-8611
Closed

CLOUDSTACK-8611. CS waits indefinitely for CheckS2SVpnConnectionsComm…#561
likitha wants to merge 1 commit into
apache:masterfrom
likitha:CLOUDSTACK-8611

Conversation

@likitha

Copy link
Copy Markdown

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

…and to return.
While remote executing commands through ssh, handle channel condition of EOF because we wait for the the condition.
@asfbot

Copy link
Copy Markdown

cloudstack-pull-requests #689 SUCCESS
This pull request looks good

@remibergsma

Copy link
Copy Markdown
Contributor

Who wants to step in and finish this work? It seems the original author is not able to finish it. If no one steps in, we'll have to close the PR without merging it so please help :-).

remibergsma added a commit to remibergsma/cloudstack that referenced this pull request Aug 17, 2015
This closesapache#577
This closesapache#566
This closesapache#562
This closesapache#561
This closesapache#556
This closesapache#555
This closesapache#554
This closesapache#548
This closesapache#544
This closesapache#540
This closesapache#508
This closesapache#384
This closesapache#372
remibergsma added a commit to remibergsma/cloudstack that referenced this pull request Aug 17, 2015
This closesapache#577
This closesapache#566
This closesapache#562
This closesapache#561
This closesapache#556
This closesapache#555
This closesapache#554
This closesapache#548
This closesapache#544
This closesapache#540
This closesapache#384
This closesapache#372
remibergsma added a commit to remibergsma/cloudstack that referenced this pull request Aug 17, 2015
This closesapache#577
This closesapache#566
This closesapache#562
This closesapache#561
This closesapache#556
This closesapache#555
This closesapache#554
This closesapache#548
This closesapache#544
This closesapache#540
This closesapache#384
This closesapache#372
@GabrielBrascher

Copy link
Copy Markdown
Member

Shouldn't the class throw a less generic Exception? A good choice might be the com.cloud.utils.ssh.SshException.SshException(String).
Although this change is out of this PR scope, this got my attention.

@DaanHoogland

Copy link
Copy Markdown
Contributor

@GabrielBrascher If you want to work on this I suggest you pull in the pr branch and push it to your own clone to make a new PR. @likitha has left the community

@GabrielBrascher

Copy link
Copy Markdown
Member

That's fair enough @DaanHoogland, I will see what I can do for this PR.

GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 1, 2016
Continuing the work started by https://github.com/likitha cherry-pigking
commit (b9181c6) from PR
apache#561.
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.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 1, 2016
Cherry-picked the work started by https://github.com/likitha
commit (b9181c6) from PR
apache#561.
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.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 4, 2016
Cherry-picked the work started by https://github.com/likitha
commit (b9181c6) from PR
apache#561.
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.
The SshHelper of the cherry picked commit is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, this commit brings that file changes, which at most were not made
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 4, 2016
Cherry-picked the work started by https://github.com/likitha
commit (b9181c6) from PR
apache#561.
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.
The SshHelper of the cherry picked commit is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, this commit brings that file changes, which at most were not made
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 5, 2016
Continued the work started by https://github.com/likitha
commit (b9181c6) from PR apache#561.
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.
The SshHelper of the PR apache#561 is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, although this commit brings changes from PR apache#561, I did not
cherry-picked to keep the master file, otherwise it would look that I
had changed all the file.
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 7, 2016
Continued the work started by https://github.com/likitha
commit (b9181c6) from PR apache#561.
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.
The SshHelper of the PR apache#561 is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, although this commit brings changes from PR apache#561, I did not
cherry-picked to keep the master file, otherwise it would look that I
had changed all the file.
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 7, 2016
Continued the work started by https://github.com/likitha
commit (b9181c6) from PR apache#561.
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.
The SshHelper of the PR apache#561 is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, although this commit brings changes from PR apache#561, I did not
cherry-picked to keep the master file, otherwise it would look that I
had changed all the file.
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 7, 2016
Continued the work started by https://github.com/likitha
commit (b9181c6) from PR apache#561.
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.
The SshHelper of the PR apache#561 is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, although this commit brings changes from PR apache#561, I did not
cherry-picked to keep the master file, otherwise it would look that I
had changed all the file.
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 7, 2016
Continued the work started by https://github.com/likitha
commit (b9181c6) from PR apache#561.
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.
The SshHelper of the PR apache#561 is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, although this commit brings changes from PR apache#561, I did not
cherry-picked to keep the master file, otherwise it would look that I
had changed all the file.
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 8, 2016
Continued the work started by https://github.com/likitha
commit (b9181c6) from PR apache#561.
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.
The SshHelper of the PR apache#561 is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, although this commit brings changes from PR apache#561, I did not
cherry-picked to keep the master file, otherwise it would look that I
had changed all the file.
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 8, 2016
Continued the work started by https://github.com/likitha
commit (b9181c6) from PR apache#561.
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.
The SshHelper of the PR apache#561 is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, although this commit brings changes from PR apache#561, I did not
cherry-picked to keep the master file, otherwise it would look that I
had changed all the file.
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 9, 2016
Continued the work started by https://github.com/likitha
commit (b9181c6) from PR apache#561.
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.
The SshHelper of the PR apache#561 is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, although this commit brings changes from PR apache#561, I did not
cherry-picked to keep the master file, otherwise it would look that I
had changed all the file.
by me.
GabrielBrascher pushed a commit to GabrielBrascher/cloudstack that referenced this pull request Apr 20, 2016
Continued the work started by https://github.com/likitha
commit (b9181c6) from PR apache#561.
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.
The SshHelper of the PR apache#561 is of another path from the
current master, its path was
https://github.com/likitha/cloudstack/commits/CLOUDSTACK-8611/utils/src/com/cloud/utils/ssh/SshHelper.java;
thus, although this commit brings changes from PR apache#561, I did not
cherry-picked to keep the master file, otherwise it would look that I
had changed all the file.
by me.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@likitha@asfbot@remibergsma@GabrielBrascher@DaanHoogland@wilderrodrigues