[jira] [Commented] (JCLOUDS-458) Google Cloud Storage support
[ https://issues.apache.org/jira/browse/JCLOUDS-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13942874#comment-13942874 ] Ignasi Barrera commented on JCLOUDS-458: Roney, make sure to submit your proposal in Google Melange before the deadline! Google Cloud Storage support Key: JCLOUDS-458 URL: https://issues.apache.org/jira/browse/JCLOUDS-458 Project: jclouds Issue Type: New Feature Components: jclouds-blobstore Reporter: Andrew Gaul Labels: gsoc2014 Presently users can access Google Cloud Storage via the S3-compatible API, although native support would give access to durable reduced availability, better region support, and resumable uploads. -- This message was sent by Atlassian JIRA (v6.2#6252)
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
Now there is duplicated code in the factories, but I guess they should be totally independent anyways. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38266301
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds-pull-requests #677](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/677/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38268628
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds-java-7-pull-requests #1147](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1147/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38268926
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds-pull-requests #678](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/678/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38269362
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds-java-7-pull-requests #1148](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1148/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38269657
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds » jclouds #932](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/932/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38270463
Build failed in Jenkins: jclouds » jclouds-labs-google #751
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/751/ -- Started by upstream project jclouds/jclouds build number 932 originally caused by: GitHub pull request #312 to jclouds/jclouds GitHub pull request #312 to jclouds/jclouds Building remotely on s-a39484e9 in workspace https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/ws/ Fetching changes from the remote Git repository Fetching upstream changes from git://github.com/jclouds/jclouds-labs-google.git FATAL: Failed to fetch from git://github.com/jclouds/jclouds-labs-google.git hudson.plugins.git.GitException: Failed to fetch from git://github.com/jclouds/jclouds-labs-google.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:836) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861) at hudson.model.AbstractProject.checkout(AbstractProject.java:1411) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561) at hudson.model.Run.execute(Run.java:1665) at hudson.model.Run.run(Run.java:1612) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:479) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Caused by: hudson.plugins.git.GitException: Command fetch -t git://github.com/jclouds/jclouds-labs-google.git +refs/heads/*:refs/remotes/origin/* returned status code 128: stdout: stderr: fatal: read error: Connection reset by peer at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:928) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:902) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:163) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)
[jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
You can merge this Pull Request by running: git pull https://github.com/andreaturli/jclouds-labs master Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds-labs/pull/57 -- Commit Summary -- * [JCLOUDS-500] Initial commit for docker -- File Changes -- A docker/README.md (51) A docker/pom.xml (134) A docker/src/main/java/org/jclouds/docker/DockerApi.java (38) A docker/src/main/java/org/jclouds/docker/DockerApiMetadata.java (100) A docker/src/main/java/org/jclouds/docker/binders/BindInputStreamToRequest.java (63) A docker/src/main/java/org/jclouds/docker/compute/config/DockerComputeServiceContextModule.java (64) A docker/src/main/java/org/jclouds/docker/compute/extensions/DockerImageExtension.java (117) A docker/src/main/java/org/jclouds/docker/compute/features/RemoteApi.java (245) A docker/src/main/java/org/jclouds/docker/compute/features/internal/Archives.java (97) A docker/src/main/java/org/jclouds/docker/compute/functions/ContainerToNodeMetadata.java (116) A docker/src/main/java/org/jclouds/docker/compute/functions/ImageToImage.java (99) A docker/src/main/java/org/jclouds/docker/compute/strategy/DockerComputeServiceAdapter.java (213) A docker/src/main/java/org/jclouds/docker/config/DockerHttpApiModule.java (42) A docker/src/main/java/org/jclouds/docker/config/DockerParserModule.java (74) A docker/src/main/java/org/jclouds/docker/config/DockerProperties.java (29) A docker/src/main/java/org/jclouds/docker/domain/Config.java (336) A docker/src/main/java/org/jclouds/docker/domain/Container.java (331) A docker/src/main/java/org/jclouds/docker/domain/ExposedPorts.java (82) A docker/src/main/java/org/jclouds/docker/domain/HostConfig.java (152) A docker/src/main/java/org/jclouds/docker/domain/Image.java (161) A docker/src/main/java/org/jclouds/docker/domain/NetworkSettings.java (94) A docker/src/main/java/org/jclouds/docker/domain/Port.java (67) A docker/src/main/java/org/jclouds/docker/domain/PortBindings.java (24) A docker/src/main/java/org/jclouds/docker/domain/PortSpecs.java (23) A docker/src/main/java/org/jclouds/docker/domain/State.java (75) A docker/src/main/java/org/jclouds/docker/domain/Version.java (165) A docker/src/main/java/org/jclouds/docker/domain/Volumes.java (20) A docker/src/main/java/org/jclouds/docker/handlers/DockerErrorHandler.java (108) A docker/src/main/java/org/jclouds/docker/options/PaginationOptions.java (116) A docker/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata (1) A docker/src/main/resources/centos/Dockerfile (29) A docker/src/main/resources/ubuntu/Dockerfile (30) A docker/src/test/java/org/jclouds/docker/DockerApiMetadataTest.java (49) A docker/src/test/java/org/jclouds/docker/compute/BaseDockerApiLiveTest.java (96) A docker/src/test/java/org/jclouds/docker/compute/DockerComputeServiceAdapterLiveTest.java (135) A docker/src/test/java/org/jclouds/docker/compute/DockerExperimentLiveTest.java (135) A docker/src/test/java/org/jclouds/docker/compute/extensions/DockerImageExtensionLiveTest.java (56) A docker/src/test/java/org/jclouds/docker/compute/features/RemoteApiLiveTest.java (133) A docker/src/test/resources/logback.xml (34) M pom.xml (1) -- Patch Links -- https://github.com/jclouds/jclouds-labs/pull/57.patch https://github.com/jclouds/jclouds-labs/pull/57.diff --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57
[jira] [Commented] (JCLOUDS-500) Create a Docker provider
[ https://issues.apache.org/jira/browse/JCLOUDS-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13943009#comment-13943009 ] Andrea commented on JCLOUDS-500: Hi, I've issued a PR for Docker at https://github.com/jclouds/jclouds-labs/pull/57 I'd really appreciate a review and/or comments. Create a Docker provider Key: JCLOUDS-500 URL: https://issues.apache.org/jira/browse/JCLOUDS-500 Project: jclouds Issue Type: New Feature Components: jclouds-compute Reporter: Ignasi Barrera Priority: Minor Labels: gsoc2014 It would be great to be able to provision LXC containers with jclouds. Docker makes that extremely easy, and provides an API that matches pretty well with the jclouds ComputeService abstraction. There have been also several proof of concepts about integrating jclouds with Docker that have had attention from the community: http://markmail.org/message/g4sfgahigav757a6 -- This message was sent by Atlassian JIRA (v6.2#6252)
Jenkins build is still unstable: jclouds » jclouds-labs-openstack #936
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/936/
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
[jclouds-labs-pull-requests #136](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/136/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57#issuecomment-38272933
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds-pull-requests #679](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/679/) UNSTABLE Looks like there's a problem with this pull request --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38273093
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
[jclouds » jclouds-labs #886](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/886/) FAILURE Looks like there's a problem with this pull request [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57#issuecomment-38273289
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds-java-7-pull-requests #1149](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1149/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38273580
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
jclouds-pull-requests #679 UNSTABLE Not sure if these are [real test failures](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/org.apache.jclouds.api$s3/679/testReport/junit/org.jclouds.s3.filters/RequestAuthorizeSignatureTest/testIdempotent/) or not...they're certainly not our usual spurious test failure suspects. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38274316
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+limitations under the License. + +-- +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +modelVersion4.0.0/modelVersion +parent +groupIdorg.apache.jclouds.labs/groupId +artifactIdjclouds-labs/artifactId +version1.8.0-SNAPSHOT/version +/parent + +!-- TODO: when out of labs, switch to org.jclouds.provider -- +groupIdorg.apache.jclouds.labs/groupId +artifactIddocker/artifactId +version1.8.0-SNAPSHOT/version Don't think we need this since we're inheriting from the labs parent POM? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10835165
Build failed in Jenkins: jclouds » jclouds-labs-google #752
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/752/ -- Started by upstream project jclouds/jclouds build number 933 originally caused by: GitHub pull request #312 to jclouds/jclouds Building remotely on s-a39484e9 in workspace https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/ws/ Fetching changes from the remote Git repository Fetching upstream changes from git://github.com/jclouds/jclouds-labs-google.git FATAL: Failed to fetch from git://github.com/jclouds/jclouds-labs-google.git hudson.plugins.git.GitException: Failed to fetch from git://github.com/jclouds/jclouds-labs-google.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:836) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861) at hudson.model.AbstractProject.checkout(AbstractProject.java:1411) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561) at hudson.model.Run.execute(Run.java:1665) at hudson.model.Run.run(Run.java:1612) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:479) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Caused by: hudson.plugins.git.GitException: Command fetch -t git://github.com/jclouds/jclouds-labs-google.git +refs/heads/*:refs/remotes/origin/* returned status code 128: stdout: stderr: fatal: read error: Connection reset by peer at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:928) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:902) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:163) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds » jclouds #933](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/933/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38274622
Build failed in Jenkins: jclouds » jclouds-labs #887
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/887/ -- Started by upstream project jclouds/jclouds build number 933 originally caused by: GitHub pull request #312 to jclouds/jclouds Building remotely on s-299933b5 in workspace https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/ws/ Cloning the remote Git repository Cloning repository git://github.com/jclouds/jclouds-labs.git git --version git version 1.7.11.7 ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not clone git://github.com/jclouds/jclouds-labs.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:286) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:150) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:143) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Command clone --progress -o origin git://github.com/jclouds/jclouds-labs.git https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/ws/; returned status code 128: stdout: Cloning into 'https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/ws/'... stderr: fatal: unable to connect to github.com: github.com[0: 192.30.252.131]: errno=Connection timed out at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:928) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:902) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:47) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:284) ... 10 more ERROR: null
Build failed in Jenkins: jclouds » jclouds-chef #847
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-chef/847/ -- Started by upstream project jclouds/jclouds build number 933 originally caused by: GitHub pull request #312 to jclouds/jclouds Building remotely on s-299933b5 in workspace https://buildhive.cloudbees.com/job/jclouds/job/jclouds-chef/ws/ Cloning the remote Git repository Cloning repository git://github.com/jclouds/jclouds-chef.git git --version git version 1.7.11.7 ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not clone git://github.com/jclouds/jclouds-chef.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:286) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:150) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:143) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Command clone --progress -o origin git://github.com/jclouds/jclouds-chef.git https://buildhive.cloudbees.com/job/jclouds/job/jclouds-chef/ws/; returned status code 128: stdout: Cloning into 'https://buildhive.cloudbees.com/job/jclouds/job/jclouds-chef/ws/'... stderr: fatal: unable to connect to github.com: github.com[0: 192.30.252.129]: errno=Connection timed out at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:928) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:902) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:47) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:284) ... 10 more ERROR: null
Build failed in Jenkins: jclouds » jclouds-labs-openstack #937
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/937/ -- Started by upstream project jclouds/jclouds build number 933 originally caused by: GitHub pull request #312 to jclouds/jclouds Building remotely on s-299933b5 in workspace https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/ws/ Cloning the remote Git repository Cloning repository git://github.com/jclouds/jclouds-labs-openstack.git git --version git version 1.7.11.7 ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not clone git://github.com/jclouds/jclouds-labs-openstack.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:286) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:150) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:143) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Command clone --progress -o origin git://github.com/jclouds/jclouds-labs-openstack.git https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/ws/; returned status code 128: stdout: Cloning into 'https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/ws/'... stderr: fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=Connection timed out at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:928) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:902) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:47) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:284) ... 10 more ERROR: null
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
jclouds » jclouds-labs #886 FAILURE GitHub [timeout](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/886/console) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57#issuecomment-38275658
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
Would be nice to get the jenkins conf you run to get these so I could test these myself. Pure mvn clean install gives me no errors. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38277678
Build failed in Jenkins: jclouds » jclouds #934
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds/934/ -- GitHub pull request #312 to jclouds/jclouds Building remotely on s-299933b5 in workspace https://buildhive.cloudbees.com/job/jclouds/job/jclouds/ws/ Cloning the remote Git repository Cloning repository git://github.com/jclouds/jclouds.git git --version git version 1.7.11.7 ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not clone git://github.com/jclouds/jclouds.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:286) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:150) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:143) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Command clone --progress -o origin git://github.com/jclouds/jclouds.git https://buildhive.cloudbees.com/job/jclouds/job/jclouds/ws/; returned status code 128: stdout: Cloning into 'https://buildhive.cloudbees.com/job/jclouds/job/jclouds/ws/'... stderr: fatal: unable to connect to github.com: github.com[0: 192.30.252.129]: errno=Connection timed out at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:928) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:902) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:47) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:284) ... 10 more ERROR: null
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
jclouds » jclouds #934 FAILURE Another [GitHub timeout](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/934/console) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38278954
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+artifactIdmaven-surefire-plugin/artifactId +executions +execution +idintegration/id +phaseintegration-test/phase +goals +goaltest/goal +/goals +configuration +systemPropertyVariables + test.docker.endpoint${test.docker.endpoint} +/test.docker.endpoint + test.docker.api-version${test.docker.api-version} +/test.docker.api-version + test.docker.credential${test.docker.credential} +/test.docker.credential Close tags in the same line --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838140
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ +import java.io.Closeable; + +/** + * Provides synchronous access to Docker. + * + * @author Andrea Turli + * @see a href=http://docs.docker.io/en/latest/api/docker_remote_api_v1.8/#docker-remote-api-v1-8;/a + */ +public interface DockerApi extends Closeable { + + /** +* Provides synchronous access to Docker Remote API features. +*/ + @Delegate + RemoteApi getRemoteApi(); Is there a plan to add more apis to this class? If not, you could consider moving all methods from the `RemoteApi` to the `DockerApi`. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838196
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ Properties properties = BaseHttpApiMetadata.defaultProperties(); + properties.setProperty(Constants.PROPERTY_MAX_RETRIES, 15); + properties.setProperty(jclouds.ssh.retry-auth, true); + properties.setProperty(Constants.PROPERTY_CONNECTION_TIMEOUT, 120); // 15 minutes + properties.setProperty(TEMPLATE, osFamily=UBUNTU,os64Bit=true,osVersionMatches=1[012].[01][04]); + return properties; + } + + public static class Builder extends BaseHttpApiMetadata.BuilderDockerApi, Builder { + + protected Builder() { + super(DockerApi.class); + id(docker) + .name(Docker API) + .defaultIdentity(root) + .identityName(user) capitalize and change by a text describing what the identity is? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838240
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.docker; + +import org.jclouds.docker.compute.features.RemoteApi; +import org.jclouds.rest.annotations.Delegate; + +import java.io.Closeable; + +/** + * Provides synchronous access to Docker. + * + * @author Andrea Turli + * @see a href=http://docs.docker.io/en/latest/api/docker_remote_api_v1.8/#docker-remote-api-v1-8;/a Add a text to the link? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838426
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+import org.jclouds.compute.ComputeServiceAdapter; +import org.jclouds.compute.config.ComputeServiceAdapterContextModule; +import org.jclouds.compute.domain.Hardware; +import org.jclouds.compute.domain.NodeMetadata; +import org.jclouds.compute.extensions.ImageExtension; +import org.jclouds.docker.compute.extensions.DockerImageExtension; +import org.jclouds.docker.compute.functions.ContainerToNodeMetadata; +import org.jclouds.docker.compute.functions.ImageToImage; +import org.jclouds.docker.compute.strategy.DockerComputeServiceAdapter; +import org.jclouds.docker.domain.Container; +import org.jclouds.docker.domain.Image; +import org.jclouds.domain.Location; +import org.jclouds.functions.IdentityFunction; + +/** + * @author Adrian Cole Change the author here :) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838431
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+import static com.google.common.base.Preconditions.checkNotNull; +import static com.google.common.base.Preconditions.checkState; +import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_IMAGE_AVAILABLE; + +/** + * Docker implementation of {@link org.jclouds.compute.extensions.ImageExtension} + * + * @author Andrea Turli + */ +@Singleton +public class DockerImageExtension implements ImageExtension { + + @Resource + @Named(ComputeServiceConstants.COMPUTE_LOGGER) + private Logger logger = Logger.NULL; + private DockerApi api; Declare this as `final`. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838447
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ this.imageAvailablePredicate = checkNotNull(imageAvailablePredicate, imageAvailablePredicate); + } + + @Override + public ImageTemplate buildImageTemplateFromNode(String name, final String id) { + Container container = api.getRemoteApi().inspectContainer(id); + if (container == null) + throw new NoSuchElementException(Cannot find container with id: + id); + CloneImageTemplate template = new ImageTemplateBuilder.CloneImageTemplateBuilder().nodeId(id).name(name).build(); + return template; + } + + @Override + public ListenableFutureImage createImage(ImageTemplate template) { + checkState(template instanceof CloneImageTemplate, + docker only currently supports creating images through cloning.); Should better use `checkArgument` to propagate an `IllegalargumentException`. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838516
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ return userExecutor.submit(new CallableImage() { + @Override + public Image call() throws Exception { +if (imageAvailablePredicate.apply(image)) + return image.get(); +throw new UncheckedTimeoutException(Image was not created within the time limit: + image.get()); + } + }); + } + + @Override + public boolean deleteImage(String id) { + try { + api.getRemoteApi().deleteImage(id); + } catch (Exception e) { + logger.error(e, Could not delete machine with id %s , id); delete image? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838573
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+/test.docker.endpoint + test.docker.api-version${test.docker.api-version} +/test.docker.api-version + test.docker.credential${test.docker.credential} +/test.docker.credential +/systemPropertyVariables +/configuration +/execution +/executions +/plugin +/plugins +/build +/profile +/profiles + +/project Use a 2 space indent in XML files --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838130
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ @QueryParam(limit) String limit, + @QueryParam(since) String since, + @QueryParam(before) String before); + + /** +* List containers +* +* @return the running containers. +*/ + @Named(containers:list) + @GET + @Path(/containers/json) + @Consumes(MediaType.APPLICATION_JSON) + @Fallback(Fallbacks.EmptySetOnNotFoundOr404.class) + ListContainer listContainers( + @QueryParam(all) boolean all); Following the conventions in other providers, can we have a method `listContainers()` and a `listContainers(ListContainerOptions options)` to avoid forcing users to always provide the query params? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838673
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ @Named(container:inspect) + @GET + @Path(/containers/{id}/json) + @Consumes(MediaType.APPLICATION_JSON) + @Fallback(Fallbacks.NullOnNotFoundOr404.class) + Container inspectContainer(@PathParam(id) String containerId); + + /** +* Delete the container. +* +* @return the container. +*/ + @Named(container:delete) + @DELETE + @Path(/containers/{id}) + void removeContainer(@PathParam(id) String containerId, @QueryParam(v) boolean v); What is this `v` parameter? Can we use a more descriptive name and document it in the javadoc? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838747
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ @Named(image:delete) + @DELETE + @Path(/images/{name}) + @Consumes(MediaType.APPLICATION_JSON) + InputStream deleteImage(@PathParam(name) String name); + + + /** +* Build an image from Dockerfile via stdin +*/ + @Named(image:build) + @POST + @Path(/build) + @Consumes(MediaType.APPLICATION_JSON) + @Headers(keys = Content-Type, values = application/tar) + InputStream build(@QueryParam(t) String tag, Payload inputStream); Should this method also support the `quiet` and `nocache` parameters? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838881
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; + +import static com.google.common.collect.Iterables.getLast; + +/** + * @author Andrea Turli + */ +public class Archives { + + public static File tar(File baseDir, String archivePath) throws IOException { + // Check that the directory is a directory, and get its contents + if (!baseDir.isDirectory()) + throw new IllegalArgumentException(Compress: not a directory: + baseDir); Use `checkArgument` instead. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838908
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+BufferedInputStream in = new BufferedInputStream(fin); +while ((len = in.read(buf)) != -1) { + tos.write(buf, 0, len); +} +in.close(); + } + tos.closeArchiveEntry(); + } + tos.close(); + return tarFile; + } + + public static File tar(File baseDir, File tarFile) throws IOException { + // Check that the directory is a directory, and get its contents + if (!baseDir.isDirectory()) + throw new IllegalArgumentException(Compress: not a directory: + baseDir); Same thing, use `checkArgument`. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838930
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+import static com.google.common.collect.Iterables.getOnlyElement; + +/** + * @author Andrea Turli + */ +public class ContainerToNodeMetadata implements FunctionContainer, NodeMetadata { + + @Resource + @Named(ComputeServiceConstants.COMPUTE_LOGGER) + protected Logger logger = Logger.NULL; + + private final ApiContextDockerApi context; + + @Inject + public ContainerToNodeMetadata(ApiContextDockerApi context) { + this.context = context; Make sure parameter is not null. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838960
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+public class ContainerToNodeMetadata implements FunctionContainer, NodeMetadata { + + @Resource + @Named(ComputeServiceConstants.COMPUTE_LOGGER) + protected Logger logger = Logger.NULL; + + private final ApiContextDockerApi context; + + @Inject + public ContainerToNodeMetadata(ApiContextDockerApi context) { + this.context = context; + } + + @Override + public NodeMetadata apply(Container container) { + // TODO extract group and name from description? You can inject the groupNamingConvention for this purpose. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10838983
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ locationBuilder.description(); + locationBuilder.id(); + locationBuilder.scope(LocationScope.HOST); + nodeMetadataBuilder.location(locationBuilder.build()); + // TODO setup hardware and hostname properly + if (container.getStatus() != null) { + nodeMetadataBuilder.status(container.getStatus().contains(Up) ? NodeMetadata.Status.RUNNING : NodeMetadata.Status.SUSPENDED); + } else { + nodeMetadataBuilder.status(container.getState().isRunning() ? NodeMetadata.Status.RUNNING : NodeMetadata.Status.SUSPENDED); + } + nodeMetadataBuilder.imageId(container.getImage()); + nodeMetadataBuilder.loginPort(getLoginPort(container)); + nodeMetadataBuilder.publicAddresses(getPublicIpAddresses()); + nodeMetadataBuilder.privateAddresses(getPrivateIpAddresses(container)); + nodeMetadataBuilder.operatingSystem(OperatingSystem.builder().description(my description) + .family(OsFamily.UNRECOGNIZED) Isn't there a way this could be detected? Even parsing some field? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839063
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ } + + private int getLoginPort(Container container) { + if (container.getNetworkSettings() != null) { + MapString, ListMapString,String ports = container.getNetworkSettings().getPorts(); + if(ports != null) { +return Integer.parseInt(getOnlyElement(ports.get(22/tcp)).get(HostPort)); + } + } else if (container.getPorts() != null) { + for (Port port : container.getPorts()) { +if (port.getPrivatePort() == 22) { + return port.getPublicPort(); +} + } + } + throw new IllegalStateException(Cannot determine the login port for + container.getId()); Is it ok to fail here? By default, jclouds will assume port 22 as a login port. If we can't detect it, should we fail, or let jclouds try to use port 22 anyway? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839133
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ .ids(from.getId()) + .name(get(Splitter.on(:).split(description), 0)) + .description(description) + .operatingSystem(os) + .status(Image.Status.AVAILABLE) + .build(); + } + + /** +* Parses the item description to determine the OSFamily +* +* @return the @see OsFamily or OsFamily.UNRECOGNIZED +*/ + private FunctionString, OsFamily osFamily() { + return new FunctionString, OsFamily() { + OsFamily osFamily = OsFamily.UNRECOGNIZED; There is no need for this local variable. Just return directly the detected os family. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839200
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ */ +@Singleton +public class DockerComputeServiceAdapter implements +ComputeServiceAdapterContainer, Hardware, Image, Location { + + @Resource + @Named(ComputeServiceConstants.COMPUTE_LOGGER) + protected Logger logger = Logger.NULL; + + private final DockerApi api; + private final ApiContextDockerApi context; + + @Inject + public DockerComputeServiceAdapter(DockerApi api, ApiContextDockerApi context) { + this.api = checkNotNull(api, api); + this.context = context; Also check not null here. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839229
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ */ +@Singleton +public class DockerComputeServiceAdapter implements +ComputeServiceAdapterContainer, Hardware, Image, Location { + + @Resource + @Named(ComputeServiceConstants.COMPUTE_LOGGER) + protected Logger logger = Logger.NULL; + + private final DockerApi api; + private final ApiContextDockerApi context; + + @Inject + public DockerComputeServiceAdapter(DockerApi api, ApiContextDockerApi context) { + this.api = checkNotNull(api, api); + this.context = context; Do you really need the context? You could better inject directly the Identity and the Credential supplier. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839266
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds-pull-requests #680](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/680/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38285366
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ + @Inject + public DockerComputeServiceAdapter(DockerApi api, ApiContextDockerApi context) { + this.api = checkNotNull(api, api); + this.context = context; + } + + @Override + public NodeAndInitialCredentialsContainer createNodeWithGroupEncodedIntoName(String group, String name, + Template template) { + checkNotNull(template, template was null); + checkNotNull(template.getOptions(), template options was null); + + String imageId = checkNotNull(template.getImage().getId(), template image id must not be null); + String defaultIdentity = context.getProviderMetadata().getApiMetadata().getDefaultIdentity().get(); + String defaultCredential = context.getProviderMetadata().getApiMetadata().getDefaultCredential().get(); This default identity and credentials defined in the metadata are supposed to be the api credentials, not the ones to connect to the containers. Default credentials for deploiyed nodes can be set with the [IMAGE_LOGIN_USER](https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/config/ComputeServiceProperties.java#L87) property, in the metadata detault properties. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839513
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ @Consumes(MediaType.APPLICATION_JSON) + @Headers(keys = Content-Type, values = application/tar) + InputStream build(@QueryParam(t) String tag, Payload inputStream); + + /** +* Build an image from Dockerfile via stdin +*/ + @Named(image:build) + @POST + @Path(/build) + @Consumes(MediaType.APPLICATION_JSON) + @Headers(keys = Content-Type, values = application/tar) + InputStream build(@QueryParam(t) String tag, @QueryParam(q) boolean quiet, @QueryParam(nocache) boolean nocache, + @BinderParam(BindInputStreamToRequest.class) File dockerFile); + +} Some general considerations on the api class: * Add the javadoc for all method parameters. * For those parameters that are optional, better have two method: one that doesn't have them, and another one that encapsulates all them in an Options object, so users don't have to call a method with lots of `null` parameters. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839625
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
[jclouds-java-7-pull-requests #1150](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1150/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38285959
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ .privileged(true); + + // TODO improve volumes management + if (volumeBindings) { + for (Volume v : template.getHardware().getVolumes()) { +hostConfigBuilder.binds(ImmutableList.of(v.getDevice() + :/root)); + } + } else { + hostConfigBuilder.binds(ImmutableList.of(/var/lib/docker:/root)); + } + HostConfig hostConfig = hostConfigBuilder.build(); + + api.getRemoteApi().startContainer(container.getId(), hostConfig); + container = api.getRemoteApi().inspectContainer(container.getId()); + if (!container.getState().isRunning()) { + throw new IllegalStateException(String.format(Container %s has not started correctly, container.getId())); Rollback the container before throwing the exception? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839692
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ @SerializedName(StdinOnce) + private boolean stdinOnce; + @SerializedName(Env) + private ListString env; + @SerializedName(Cmd) + private ListString cmd; + @SerializedName(Dns) + private ListString dns; + @SerializedName(Image) + private String image; + @SerializedName(Volumes) + private MapString, ? volumes; + @SerializedName(VolumesFrom) + private String volumesFrom; + @SerializedName(WorkingDir) + private String workingDir; Declare all fields final --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839772
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
jclouds-pull-requests #680 SUCCESS jclouds-java-7-pull-requests #1150 SUCCESS Bingo ;-) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38286311
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ this.memory = memory; + this.memorySwap = memorySwap; + this.attachStdin = attachStdin; + this.attachStdout = attachStdout; + this.attachStderr = attachStderr; + this.exposedPorts = exposedPorts; + this.tty = tty; + this.openStdin = openStdin; + this.stdinOnce = stdinOnce; + this.env = env; + this.cmd = cmd == null ? Lists.StringnewArrayList() : cmd; + this.dns = dns; + this.image = image; + this.volumes = volumes; + this.volumesFrom = volumesFrom; + this.workingDir = workingDir; Add null checks for all non-nullable properties. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839799
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ this.attachStdin = attachStdin; + return this; + } + + public Builder attachStdout(boolean attachStdout) { + this.attachStdout = attachStdout; + return this; + } + + public Builder attachStderr(boolean attachStderr) { + this.attachStderr = attachStderr; + return this; + } + + public Builder exposedPorts(MapString, ? exposedPorts) { + this.exposedPorts = exposedPorts; Better create a copy with `ImmutableMap.copyOf` --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839891
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ @SerializedName(ResolvConfPath) + private String resolvConfPath; + @SerializedName(Volumes) + private Volumes volumes; + @SerializedName(SizeRw) + private long sizeRw; + @SerializedName(SizeRootFs) + private long sizeRootFs; + @SerializedName(Command) + private String command; + @SerializedName(Status) + private String status; + @SerializedName(HostConfig) + private HostConfig hostConfig; + @SerializedName(Ports) + private ListPort ports; Same, make all fields final --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839967
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ this.created = created; + this.path = path; + this.args = args; + this.config = config; + this.state = state; + this.image = image; + this.networkSettings = networkSettings; + this.sysInitPath = sysInitPath; + this.resolvConfPath = resolvConfPath; + this.volumes = volumes; + this.sizeRw = sizeRw; + this.sizeRootFs = sizeRootFs; + this.command = command; + this.status = status; + this.hostConfig = hostConfig; + this.ports = ports; Same, null checks... --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10839975
Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)
-} + } + } + } + + @Test + public void testCreateInWrongAvailabilityZone() { + String serverId = null; + for (String zoneId : zones) { + ServerApi serverApi = api.getServerApiForZone(zoneId); + try { +serverId = createServer(zoneId, err, Server.Status.ERROR).getId(); +Server server = serverApi.get(serverId); +assertEquals(server.getStatus(), Server.Status.ERROR); + } finally { +serverApi.delete(serverId); I actually don't know about this... this is mostly reformatting old code for style. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/313/files#r10840288
Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)
-} + } + } + } + + @Test + public void testCreateInWrongAvailabilityZone() { + String serverId = null; + for (String zoneId : zones) { + ServerApi serverApi = api.getServerApiForZone(zoneId); + try { +serverId = createServer(zoneId, err, Server.Status.ERROR).getId(); +Server server = serverApi.get(serverId); +assertEquals(server.getStatus(), Server.Status.ERROR); + } finally { +serverApi.delete(serverId); this is mostly reformatting old code for style Perhaps we can improve it (or at least iron out a possible bug) at the same time? ;-) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/313/files#r10840353
Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)
- } - } -} - -@Test -public void testCreateInAvailabilityZone() { -String serverId = null; -for (String zoneId : zones) { -ServerApi serverApi = api.getServerApiForZone(zoneId); -try { -serverId = createServer(zoneId, nova, Server.Status.ACTIVE).getId(); -Server server = serverApi.get(serverId); -assertEquals(server.getStatus(), Server.Status.ACTIVE); -} finally { -serverApi.delete(serverId); + @Test(description = GET /v${apiVersion}/{tenantId}/servers) I think this is also just identation fixes. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/313/files#r10840424
Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)
+ * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.openstack.nova.v2_0.domain; + +import java.beans.ConstructorProperties; + +import com.google.common.base.Objects; +import com.google.common.base.Objects.ToStringHelper; + +import static com.google.common.base.Preconditions.checkArgument; + +/** + * Nova (or Neutron) network definition + * Used to provide support for network, port, and fixed_ip when booting Nova servers. + * OpenStack will support either a Nova Network or Neutron, but not both at the same time. OpenStack documentation has is capitalized: http://docs.openstack.org/trunk/openstack-ops/content/nova-network-deprecation.html --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/313/files#r10840577
Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)
-} + } + } + } + + @Test + public void testCreateInWrongAvailabilityZone() { + String serverId = null; + for (String zoneId : zones) { + ServerApi serverApi = api.getServerApiForZone(zoneId); + try { +serverId = createServer(zoneId, err, Server.Status.ERROR).getId(); +Server server = serverApi.get(serverId); +assertEquals(server.getStatus(), Server.Status.ERROR); + } finally { +serverApi.delete(serverId); I think all of this code will benefit from a separate cleanup PR. Also: the live tests have been very fragile for me, so they should be ... refactored. I don't want to modify this because it already got merged, and will probably have to be fixed in master first and then backported (which is why separate PR). --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/313/files#r10840920
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
Sounds great :) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38292692
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ @QueryParam(limit) String limit, + @QueryParam(since) String since, + @QueryParam(before) String before); + + /** +* List containers +* +* @return the running containers. +*/ + @Named(containers:list) + @GET + @Path(/containers/json) + @Consumes(MediaType.APPLICATION_JSON) + @Fallback(Fallbacks.EmptySetOnNotFoundOr404.class) + ListContainer listContainers( + @QueryParam(all) boolean all); do you mean something like https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageAsyncApi.java#L68-L89 --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10844014
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ locationBuilder.description(); + locationBuilder.id(); + locationBuilder.scope(LocationScope.HOST); + nodeMetadataBuilder.location(locationBuilder.build()); + // TODO setup hardware and hostname properly + if (container.getStatus() != null) { + nodeMetadataBuilder.status(container.getStatus().contains(Up) ? NodeMetadata.Status.RUNNING : NodeMetadata.Status.SUSPENDED); + } else { + nodeMetadataBuilder.status(container.getState().isRunning() ? NodeMetadata.Status.RUNNING : NodeMetadata.Status.SUSPENDED); + } + nodeMetadataBuilder.imageId(container.getImage()); + nodeMetadataBuilder.loginPort(getLoginPort(container)); + nodeMetadataBuilder.publicAddresses(getPublicIpAddresses()); + nodeMetadataBuilder.privateAddresses(getPrivateIpAddresses(container)); + nodeMetadataBuilder.operatingSystem(OperatingSystem.builder().description(my description) + .family(OsFamily.UNRECOGNIZED) Unfortunately images don't have much metadata about the OS :( --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10844965
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ } + + private int getLoginPort(Container container) { + if (container.getNetworkSettings() != null) { + MapString, ListMapString,String ports = container.getNetworkSettings().getPorts(); + if(ports != null) { +return Integer.parseInt(getOnlyElement(ports.get(22/tcp)).get(HostPort)); + } + } else if (container.getPorts() != null) { + for (Port port : container.getPorts()) { +if (port.getPrivatePort() == 22) { + return port.getPublicPort(); +} + } + } + throw new IllegalStateException(Cannot determine the login port for + container.getId()); I think so as all the container will have a mapper port also for 22. In fact it is very much unlikely that a container can get port 22 on the host. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10845029
Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)
+ */ +@Singleton +public class DockerComputeServiceAdapter implements +ComputeServiceAdapterContainer, Hardware, Image, Location { + + @Resource + @Named(ComputeServiceConstants.COMPUTE_LOGGER) + protected Logger logger = Logger.NULL; + + private final DockerApi api; + private final ApiContextDockerApi context; + + @Inject + public DockerComputeServiceAdapter(DockerApi api, ApiContextDockerApi context) { + this.api = checkNotNull(api, api); + this.context = context; Do you have an example for that? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r10845146
[jclouds] Fixes potentially deleting a null server id. (#323)
You can merge this Pull Request by running: git pull https://github.com/rackspace/jclouds delete-null-server-fix Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds/pull/323 -- Commit Summary -- * Fixes potentially deleting a null server id. -- File Changes -- M apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/ServerApiLiveTest.java (12) -- Patch Links -- https://github.com/jclouds/jclouds/pull/323.patch https://github.com/jclouds/jclouds/pull/323.diff --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323
Re: [jclouds] Fixes potentially deleting a null server id. (#323)
@@ -88,7 +88,9 @@ public void testCreateInAvailabilityZone() { Server server = serverApi.get(serverId); assertEquals(server.getStatus(), Server.Status.ACTIVE); } finally { -serverApi.delete(serverId); +if (serverId!=null) { [minor] Add spaces, i.e. `(serverId != null)`? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323/files#r10850674
Re: [jclouds] Fixes potentially deleting a null server id. (#323)
[jclouds » jclouds #935](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/935/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323#issuecomment-38315244
Build failed in Jenkins: jclouds » jclouds-labs-google #753
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/753/ -- Started by upstream project jclouds/jclouds build number 935 originally caused by: GitHub pull request #323 to jclouds/jclouds Building remotely on s-0a46b808 in workspace https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/ws/ Cloning the remote Git repository Cloning repository git://github.com/jclouds/jclouds-labs-google.git git --version git version 1.7.11.7 ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not clone git://github.com/jclouds/jclouds-labs-google.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:286) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:150) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:143) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Command clone --progress -o origin git://github.com/jclouds/jclouds-labs-google.git https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/ws/; returned status code 128: stdout: Cloning into 'https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/ws/'... stderr: fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=Connection timed out at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:928) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:902) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:47) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:284) ... 10 more ERROR: null
Re: [jclouds] Fixes potentially deleting a null server id. (#323)
+1 - good to go for me! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323#issuecomment-38316357
Re: [jclouds] Fixes potentially deleting a null server id. (#323)
[jclouds-pull-requests #681](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/681/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323#issuecomment-38316298
Jenkins build is back to normal : jclouds » jclouds-labs #888
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/888/
Build failed in Jenkins: jclouds » jclouds-karaf #821
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-karaf/821/ -- Started by upstream project jclouds/jclouds-labs build number 888 originally caused by: Started by upstream project jclouds/jclouds build number 935 originally caused by: GitHub pull request #323 to jclouds/jclouds Building remotely on s-0a46b808 in workspace https://buildhive.cloudbees.com/job/jclouds/job/jclouds-karaf/ws/ Cloning the remote Git repository Cloning repository git://github.com/jclouds/jclouds-karaf.git git --version git version 1.7.11.7 ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not clone git://github.com/jclouds/jclouds-karaf.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:286) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:150) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:143) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Command clone --progress -o origin git://github.com/jclouds/jclouds-karaf.git https://buildhive.cloudbees.com/job/jclouds/job/jclouds-karaf/ws/; returned status code 128: stdout: Cloning into 'https://buildhive.cloudbees.com/job/jclouds/job/jclouds-karaf/ws/'... stderr: fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=Connection timed out at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:928) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:902) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:47) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:284) ... 10 more ERROR: null
Re: [jclouds] Fixes potentially deleting a null server id. (#323)
[jclouds-java-7-pull-requests #1151](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1151/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323#issuecomment-38316949
Re: [jclouds] Fixes potentially deleting a null server id. (#323)
About to merge then --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323#issuecomment-38318532
Re: [jclouds] Delete objects in a container efficiently. (#214)
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.inject.Inject; /** * Deletes all keys in the container - * + * * @author Adrian Cole Add your name to since this is a large body of new code? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/214/files#r10853480
Re: [jclouds] Delete objects in a container efficiently. (#214)
Can you open a JIRA issue and reference it in the commit message? This will allow us to communicate this improvement in the release notes. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/214#issuecomment-38321551
Re: [jclouds] Delete objects in a container efficiently. (#214)
+ * acquired in 'maxTime', a TimeoutException is thrown. Any outstanding + * futures at that time are cancelled. + */ + final Semaphore semaphore = new Semaphore(numOutStandingRequests); + /* + * When a future is created, a reference for that is added to the + * outstandingFutures list. This reference is removed from the list in the + * FutureCallback since it no longer needs to be cancelled in the event of + * a timeout. Also, when the reference is removed from this list and when + * the executorService removes the reference that it has maintained, the + * future will be marked for GC since there should be no other references + * to it. This is important because this code can generate an unbounded + * number of futures. + */ + final ListAtomicReferenceListenableFutureVoid outstandingFutures = Collections +.synchronizedList(new ArrayListAtomicReferenceListenableFutureVoid()); Does the AtomicReference provide value that the synchronized wrapper does not? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/214/files#r10853586
Re: [jclouds] Delete objects in a container efficiently. (#214)
+ * a timeout. Also, when the reference is removed from this list and when + * the executorService removes the reference that it has maintained, the + * future will be marked for GC since there should be no other references + * to it. This is important because this code can generate an unbounded + * number of futures. + */ + final ListAtomicReferenceListenableFutureVoid outstandingFutures = Collections +.synchronizedList(new ArrayListAtomicReferenceListenableFutureVoid()); + while (retries 0) { + deleteFailure.set(false); + executeOneIteration(containerName, listOptions.clone(), semaphore, + outstandingFutures, deleteFailure); + // Wait for all futures to complete by waiting to acquire all + // semaphores. + try { +if (!semaphore.tryAcquire(numOutStandingRequests, maxTime, These timeouts provide little value over the per-operation timouts and we may want to remove them in a subsequent commit. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/214/files#r10853876
Re: [jclouds] Delete objects in a container efficiently. (#214)
@shrinandj This commit represents a big improvement and I apologize for my delayed comments. Can you address some of these and add TODOs for the rest so we can commit this as soon as possible? Specifically we must address the O(n) behavior and I do not understand some of the synchronization. Further I have some doubts about how the size of the ```ExecutorService``` interacts with the ```Semaphore```; should the sizes of the two be the same? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/214#issuecomment-38323072
Re: [jclouds] Add BlobStoreBench to jclouds. (#239)
I will investigate creating a jclouds-tools repository to host this commit and future tools. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/239#issuecomment-38323342
Re: [jclouds] Delete objects in a container efficiently. (#214)
+ listing = blobStore.list(containerName, options); + } catch (ContainerNotFoundException ce) { + return listing; + } + + // recurse on subdirectories + if (options.isRecursive()) { + for (StorageMetadata md : listing) { +String fullPath = parentIsFolder(options, md) ? options.getDir() + + / + md.getName() : md.getName(); +switch (md.getType()) { +case BLOB: + break; +case FOLDER: +case RELATIVE_PATH: + if (options.isRecursive() Repeated test of isRecusive from above. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/214/files#r10856243
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
@@ -31,7 +31,7 @@ interface Factory { SshClient create(HostAndPort socket, LoginCredentials credentials); - + boolean existsSshAgent(); `hasSshAgent`? Or is the SSH agent not really something the client _has_, rather something it _talks to_? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856250
[jira] [Resolved] (JCLOUDS-506) Retry on S3 HTTP 504 Gateway Timeout status codes
[ https://issues.apache.org/jira/browse/JCLOUDS-506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Gaul resolved JCLOUDS-506. - Resolution: Fixed Fixed in a7fa3b9c620fe80eae1741078905a1d5416b88ad. Retry on S3 HTTP 504 Gateway Timeout status codes - Key: JCLOUDS-506 URL: https://issues.apache.org/jira/browse/JCLOUDS-506 Project: jclouds Issue Type: Improvement Components: jclouds-blobstore Affects Versions: 1.7.1 Reporter: Andrew Gaul Assignee: Andrew Gaul Priority: Minor Fix For: 1.8.0, 1.7.2 RiakCS using the S3 interface occasionally surfaces these status codes. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (JCLOUDS-506) Retry on S3 HTTP 504 Gateway Timeout status codes
Andrew Gaul created JCLOUDS-506: --- Summary: Retry on S3 HTTP 504 Gateway Timeout status codes Key: JCLOUDS-506 URL: https://issues.apache.org/jira/browse/JCLOUDS-506 Project: jclouds Issue Type: Improvement Components: jclouds-blobstore Affects Versions: 1.7.1 Reporter: Andrew Gaul Assignee: Andrew Gaul Priority: Minor Fix For: 1.8.0, 1.7.2 RiakCS using the S3 interface occasionally surfaces these status codes. -- This message was sent by Atlassian JIRA (v6.2#6252)
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
} sessionConnection = SessionConnection.builder().hostAndPort(HostAndPort.fromParts(host, socket.getPort())).loginCredentials( loginCredentials).proxy(checkNotNull(proxyConfig, proxyConfig)).connectTimeout(timeout).sessionTimeout(timeout).build(); } + static boolean hasValidPrivateKey(LoginCredentials loginCredentials) { + return loginCredentials.getPrivateKey() != null + !loginCredentials.getPrivateKey().isEmpty() Why the empty check? This is new, I guess? Previously, an empty (but non-null) private key would have been accepted by the code? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856393
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
} sessionConnection = SessionConnection.builder().hostAndPort(HostAndPort.fromParts(host, socket.getPort())).loginCredentials( loginCredentials).proxy(checkNotNull(proxyConfig, proxyConfig)).connectTimeout(timeout).sessionTimeout(timeout).build(); } + static boolean hasValidPrivateKey(LoginCredentials loginCredentials) { + return loginCredentials.getPrivateKey() != null + !loginCredentials.getPrivateKey().isEmpty() + !loginCredentials.getPrivateKey().contains(Proc-Type: 4,ENCRYPTED); Make `Proc-Type: 4,ENCRYPTED` a constant with a descriptive name? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856402
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
@@ -128,23 +132,44 @@ public JschSshClient(ProxyConfig proxyConfig, BackoffLimitedRetryHandler backoff this.user = checkNotNull(loginCredentials, loginCredentials).getUser(); this.host = checkNotNull(socket, socket).getHostText(); checkArgument(socket.getPort() 0, ssh port must be greater then zero + socket.getPort()); - checkArgument(loginCredentials.getPassword() != null || loginCredentials.getPrivateKey() != null, - you must specify a password or a key); + checkArgument(loginCredentials.getPassword() != null || hasValidPrivateKey(loginCredentials) || getSSHAgentConnector() != null, Is there a cheaper way to check for the SSH agent than actually making a connector? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856436
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
} sessionConnection = SessionConnection.builder().hostAndPort(HostAndPort.fromParts(host, socket.getPort())).loginCredentials( loginCredentials).proxy(checkNotNull(proxyConfig, proxyConfig)).connectTimeout(timeout).sessionTimeout(timeout).build(); } + static boolean hasValidPrivateKey(LoginCredentials loginCredentials) { + return loginCredentials.getPrivateKey() != null + !loginCredentials.getPrivateKey().isEmpty() + !loginCredentials.getPrivateKey().contains(Proc-Type: 4,ENCRYPTED); + } + + static Connector getSSHAgentConnector() { + JSch.setConfig(PreferredAuthentications, publickey); Hm...should we be doing this here, or earlier (and then once, hopefully), or when we try to connect? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856466
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
} sessionConnection = SessionConnection.builder().hostAndPort(HostAndPort.fromParts(host, socket.getPort())).loginCredentials( loginCredentials).proxy(checkNotNull(proxyConfig, proxyConfig)).connectTimeout(timeout).sessionTimeout(timeout).build(); } + static boolean hasValidPrivateKey(LoginCredentials loginCredentials) { + return loginCredentials.getPrivateKey() != null + !loginCredentials.getPrivateKey().isEmpty() + !loginCredentials.getPrivateKey().contains(Proc-Type: 4,ENCRYPTED); + } + + static Connector getSSHAgentConnector() { + JSch.setConfig(PreferredAuthentications, publickey); + ConnectorFactory cf = ConnectorFactory.getDefault(); + try { + Connector con = cf.createConnector(); + if (con != null con.isAvailable()) { +return con; + } + } catch (AgentProxyException e) { Do we want to swallow this, or at least warn somewhere? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856480
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
+ !loginCredentials.getPrivateKey().isEmpty() + !loginCredentials.getPrivateKey().contains(Proc-Type: 4,ENCRYPTED); + } + + static Connector getSSHAgentConnector() { + JSch.setConfig(PreferredAuthentications, publickey); + ConnectorFactory cf = ConnectorFactory.getDefault(); + try { + Connector con = cf.createConnector(); + if (con != null con.isAvailable()) { +return con; + } + } catch (AgentProxyException e) { + } + return null; + } This method will be really nasty to mock due to the statics. Should we make this an injectable factory instead? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856513
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
byte[] privateKey = loginCredentials.getPrivateKey().getBytes(); jsch.addIdentity(loginCredentials.getUser(), privateKey, null, emptyPassPhrase); + } else { + Connector con = JschSshClient.getSSHAgentConnector(); If we go for an injectable factory/supplier above, inject it here, too? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856567
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
byte[] privateKey = loginCredentials.getPrivateKey().getBytes(); jsch.addIdentity(loginCredentials.getUser(), privateKey, null, emptyPassPhrase); + } else { + Connector con = JschSshClient.getSSHAgentConnector(); + if(con != null ){ [minor] Formatting `if (con != null) {` And what if con _is_ null? Shouldn't we be going bang here? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856603
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
byte[] privateKey = loginCredentials.getPrivateKey().getBytes(); jsch.addIdentity(loginCredentials.getUser(), privateKey, null, emptyPassPhrase); + } else { + Connector con = JschSshClient.getSSHAgentConnector(); + if(con != null ){ +IdentityRepository irepo = new RemoteIdentityRepository(con); +jsch.setIdentityRepository(irepo); Inline `irepo`? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856612
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
@@ -67,5 +70,19 @@ public SshClient create(HostAndPort socket, LoginCredentials credentials) { injector.injectMembers(client);// add logger return client; } + + @Override + public boolean existsSshAgent() { + try { +ConnectorFactory cf = ConnectorFactory.getDefault(); +if (cf != null) { + Connector con = cf.createConnector(); + if (con != null) { + return con.isAvailable(); + } +} + } catch (AgentProxyException e) {} + return false; Put this in the catch block, to make it clear this is only the result if something goes wrong? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856630
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
@@ -67,5 +70,19 @@ public SshClient create(HostAndPort socket, LoginCredentials credentials) { injector.injectMembers(client);// add logger return client; } + + @Override + public boolean existsSshAgent() { + try { Reuse `JschSshClient.getSSHAgentConnector()` here, or the injectable factory/supplier? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856673
Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)
@@ -206,4 +217,13 @@ public String toString() { sessionTimeout, sessionTimeout).toString(); } + private static ListAuthMethod getAuthMethods(AgentProxy agent) throws Exception { Narrow the list of exception types thrown here? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312/files#r10856725