Re: [jclouds/jclouds] Do not try to connect to ssh if already connected (#995)

2016-08-12 Thread Zack Shoylev
This might fix some issues I have seen as well. Thanks @nacx 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/995#issuecomment-239557731

Re: [jclouds/jclouds] Do not try to connect to ssh if already connected (#995)

2016-08-12 Thread Ignasi Barrera
```bash
Starting test 
testWeCanCancelTasks(org.jclouds.profitbricks.compute.ProfitBricksComputeServiceLiveTest)
[TestNG] Test 
testWeCanCancelTasks(org.jclouds.profitbricks.compute.ProfitBricksComputeServiceLiveTest)
 succeeded: 238582ms
```

Yay! :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/995#issuecomment-239447360

Re: [jclouds/jclouds] Do not try to connect to ssh if already connected (#995)

2016-08-12 Thread Reijhanniel Jearl Campos
Oh, this workaround might do the trick.

P.S.: My trial account in PB got expired though. I'll see what I could do.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/995#issuecomment-239414735

[jclouds/jclouds] Do not try to connect to ssh if already connected (#995)

2016-08-11 Thread Ignasi Barrera
The `refreshAndRunAction` is called by the `future.cancel()` method when 
cancelling the future associated to a running script (typically obtained by 
calling the `compute.submitScriptOnNode` method.

I've observed that when the ssh connection is already established, this method 
fails to connect again and throws an exception. This was also causing random 
failures in the `BaseComputeServiceLiveTest.testWeCanCancelTasks`.

@devcsrj This will potentially fix 
[JCLOUDS-1058](https://issues.apache.org/jira/browse/JCLOUDS-1058). Could you 
build this branch and try running the tests?
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/995

-- Commit Summary --

  * Do not try to connect to ssh if already connected

-- File Changes --

M 
compute/src/main/java/org/jclouds/compute/callables/SudoAwareInitManager.java 
(4)
M compute/src/main/java/org/jclouds/ssh/SshClient.java (2)
M drivers/jsch/src/main/java/org/jclouds/ssh/jsch/JschSshClient.java (6)
M 
drivers/jsch/src/test/java/org/jclouds/ssh/jsch/JschSshClientLiveTest.java (4)
M drivers/sshj/src/main/java/org/jclouds/sshj/SshjSshClient.java (9)
M drivers/sshj/src/test/java/org/jclouds/sshj/SshjSshClientLiveTest.java (4)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/995.patch
https://github.com/jclouds/jclouds/pull/995.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/995