Probably more a jclouds-dev question.
Is the command only for servers? Do you have a doc link?
If only for servers, update classes: ServerApi ServerAsyncApi ServerApiExpectTest ServerApiLiveTest
Cheers,
-A
Hello all,I'm currently using version 1.5.2 and was wondering how I could expose (or extend in case it does not exist) the diagnostics command in the OpenStack driver:[API_ENDPOINT]/v2/[TENANT]/servers/[SERVER_ID]/diagnostics?What would be the best place to implement this, in case the command implemented?Regards,--
Leander
You received this message because you are subscribed to the Google Groups "jclouds" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jclouds/-/V9C3Pshi1eMJ.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.
Cool. While you are on it, you mind pasting what the debug output is? I'm curious.
-A
Sorry about that, shall direct it to the appropriate list next time. Thanks for the suggestions, I shall look into to those. There is no doc link, as far as I know of, I've retrieved the link by using the python command line tool with the --debug option for the command diagnostics. This command should work with OpenStack Folsom using the Xen API and libvirt ( more hypervisors might support this, although I'm not sure).
--
You received this message because you are subscribed to the Google Groups "jclouds-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jclouds-dev/-/ICLsBF5WmnoJ.
To post to this group, send email to jclou...@googlegroups.com.
To unsubscribe from this group, send email to jclouds-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds-dev?hl=en.
I've found the ServerAPI file under ./jclouds/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ServerApi.java. Any pointers on how to compile changes using the eclipse setup and using JClouds REST API?
@Path("/servers/{id}/diagnostics")
@Consumes(MediaType.APPLICATION_JSON)
@ExceptionParser(MapHttp4xxCodesToExceptions.class)
ListenableFuture<String> getDiagnostics(@PathParam("id") String id);
[i/o thread 0] ERROR org.jclouds.http.handlers.BackoffLimitedRetryHandler - Cannot retry after server error, command has exceeded retry limit 5: [method=ServerAsyncApi.getDiagnostics, request=GET http://10.0.107.2:8774/v2/4ebf76425efa4d01bc54a182185444a6/servers/52513b64-42a3-4a68-99b7-eb6d3bc82085/diagnostics HTTP/1.1]
org.jclouds.http.HttpResponseException: command: GET http://10.0.107.2:8774/v2/4ebf76425efa4d01bc54a182185444a6/servers/52513b64-42a3-4a68-99b7-eb6d3bc82085/diagnostics HTTP/1.1 failed with response: HTTP/1.1 500 Internal Server Error; content: [{"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}]
at org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:48)
at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:71)
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.shouldContinue(BaseHttpCommandExecutorService.java:197)
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:167)
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:135)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
at org.jclouds.concurrent.config.DescribingExecutorService.submit(DescribingExecutorService.java:89)
at org.jclouds.http.internal.BaseHttpCommandExecutorService.submit(BaseHttpCommandExecutorService.java:132)
at org.jclouds.http.TransformingHttpCommandExecutorServiceImpl.submit(TransformingHttpCommandExecutorServiceImpl.java:54)
at org.jclouds.http.TransformingHttpCommandImpl.execute(TransformingHttpCommandImpl.java:73)
at org.jclouds.rest.internal.AsyncRestClientProxy.createListenableFutureForHttpRequestMappedToMethodAndArgs(AsyncRestClientProxy.java:255)
at org.jclouds.rest.internal.AsyncRestClientProxy.invoke(AsyncRestClientProxy.java:149)
at $Proxy81.getDiagnostics(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jclouds.concurrent.internal.SyncProxy.invoke(SyncProxy.java:170)
at $Proxy82.getDiagnostics(Unknown Source)
at gsd.JCloudsOpenStack.listImages(JCloudsOpenStack.java:72)
at gsd.JCloudsOpenStack.main(JCloudsOpenStack.java:34)
at org.jclouds.concurrent.config.DescribingExecutorService.submit(DescribingExecutorService.java:89)
at org.jclouds.http.internal.BaseHttpCommandExecutorService.submit(BaseHttpCommandExecutorService.java:132)
at org.jclouds.http.TransformingHttpCommandExecutorServiceImpl.submit(TransformingHttpCommandExecutorServiceImpl.java:54)
at org.jclouds.http.TransformingHttpCommandImpl.execute(TransformingHttpCommandImpl.java:73)
at org.jclouds.rest.internal.AsyncRestClientProxy.createListenableFutureForHttpRequestMappedToMethodAndArgs(AsyncRestClientProxy.java:255)
at org.jclouds.rest.internal.AsyncRestClientProxy.invoke(AsyncRestClientProxy.java:149)
at $Proxy81.getDiagnostics(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jclouds.concurrent.internal.SyncProxy.invoke(SyncProxy.java:170)
at $Proxy82.getDiagnostics(Unknown Source)
at gsd.JCloudsOpenStack.listImages(JCloudsOpenStack.java:72)
at gsd.JCloudsOpenStack.main(JCloudsOpenStack.java:34)
--
You received this message because you are subscribed to the Google Groups "jclouds-dev" group.
To unsubscribe from this group, send email to jclouds-dev+unsubscribe@googlegroups.com.
Hi, Leander.
Can you report back mvn -version?
Hi, there.
Can you send us the output of 'jclouds.headers' and 'jclouds.wire' log categories set to debug?
This will help us understand why you always get null.
-A
To view this discussion on the web visit https://groups.google.com/d/msg/jclouds-dev/-/acBEtN8Rah8J.
To post to this group, send email to jclou...@googlegroups.com.
To unsubscribe from this group, send email to jclouds-dev...@googlegroups.com.
Hi, Leander.
Switch your java home to 1.6 and see if you still get build fail.
When you run live test, you should see the following log:
target/test-data/jclouds-wire.log
You only need to send the relevant section with diagnostics in it.
Cheers,
-A
p.s. I'm not on freenode #jclouds now, but others might be
P.s. I verified same failure as you had on my mac using jdk 7. Skip tests for now, and will fix in the next day or two.
If you run the live test for the method you just created in your ide (eclipse or whatever) then it will create the jclouds-wire.log which will show details that will help isolate the problem.
-A
Hi, Leander.
I was under the assumption you have access to a service that implements this. If you do, then run the code you wrote in a test class (even a temporary one). If the class that you wrote the test in is inside openstack-nova src tree, then logging will be setup via src/test/resources/logback.xml. in this case target/test-data/jclouds-wire.log should be around and you can send the trace to us.
If you only have access to a server that doesn't support the feature, then we should be able to test the parser that makes a 500 error coerce to null.
-A
P.S. did you open a nova bug to make this return a sane error code in 400 range instead of 500?
Definitely open a bug as a user shouldnt be able to make a crash :)
Do you know anyone who has access to this feature that can send you the corresponding http request response, even if in curl? ( don't recall if I asked this before.. sorry if repeat ).
For project setup with logging, you can mine jclouds-examples repo for compute-basics
Hi, Leander.
Take a look at ServerApiExpectTest. You should be able to make a test with this output similar to the others.
Once that works, you can add to ServerApiLive test.
Make sense?
-A
Did you add new SLF4JLoggingModule() to contextBuilder.modules()?
Looks like you are missing logback as a dependency. Can you look at compute-basics pom? It should be in there.
Awesome.
Can you look at ServerApiExpectTest, add a test for this with the data below and push your work in progress to a branch on your fork?
We can help easier this way.
-A
...
...
[Message clipped]
For those of us walking around with android and no git client... Can you send the github commit http url for what you did?
-A
P.S.
When you are unsure about a particular solution and want review, the easiest way (for me) is to use pull requests. Pull your change onto a branch, push it, then go to github and click pull request. In there, you can describe the situation and your proposed solution safely. You can rework the commit based on the feedback.
example commands..
git checkout -b fix-logging
git add (files you changed)
git commit -m "log missing in nova create server"
git push origin fix-logging
git checkout master (or whatever you were on)
// then go to github and click pull request, add description and cc people with @userid
if you have to change something or update it, you can rework the pull request like so
git checkout fix-logging
git rebase master (or whatever it was based on)
git reset HEAD~1 // unstages the files so you can redo the commit
git commit -a -m "logging missing on create server and delete server"
git push -f origin fix-logging
git checkout master (or whatever you were on)
Using a pattern like this is pretty normal, and keeps the history clean. Also, it allows you to get feedback and review on the change with very little overhead.
...
...
[Message clipped]