[ 
https://issues.apache.org/jira/browse/JCLOUDS-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989965#comment-13989965
 ] 

Andrew Ruef commented on JCLOUDS-558:
-------------------------------------

Sure, here it is:

{noformat}
-  Sending request 2011553126: GET 
http://<hostandport>/v2/aa8b003283e24ad7afc42975eb4deeb1/images/detail HTTP/1.1
-  >> GET 
http://<hostandport>/v2/aa8b003283e24ad7afc42975eb4deeb1/images/detail HTTP/1.1
-  >> Accept: application/json
-  >> X-Auth-Token: <redacted>
-  Receiving response 2011553126: HTTP/1.1 200 OK
-  << HTTP/1.1 200 OK
-  << Date: Mon, 05 May 2014 20:54:42 GMT
-  << Connection: keep-alive
-  << X-Compute-Request-Id: req-9fae29df-52f7-4818-9e58-050266eaea3f
-  << Content-Type: application/json
-  << Content-Length: 2921
-  << "{"images": [{"status": "ACTIVE", "updated": "2014-05-01T15:03:15Z", 
"links": [{"href": 
"http://<hostandport>/v2/aa8b003283e24ad7afc42975eb4deeb1/images/8b7817e3-3ca4-4fff-b35b-918955927112",
 "rel": "self"}, {"href": 
"http://<hostandport>/aa8b003283e24ad7afc42975eb4deeb1/images/8b7817e3-3ca4-4fff-b35b-918955927112",
 "rel": "bookmark"}, {"href": 
"http://<hostandport>/aa8b003283e24ad7afc42975eb4deeb1/images/8b7817e3-3ca4-4fff-b35b-918955927112",
 "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": 
"8b7817e3-3ca4-4fff-b35b-918955927112", "OS-EXT-IMG-SIZE:size": 344457216, 
"name": "CentOS 6.5 x86_64", "created": "2014-05-01T14:58:24Z", "minDisk": 2, 
"progress": 100, "minRam": 1000, "metadata": {}}, {"status": "ACTIVE", 
"updated": "2014-05-01T14:57:03Z", "links": [{"href": 
"http://<hostandport>/v2/aa8b003283e24ad7afc42975eb4deeb1/images/f1885998-9da6-4777-bacd-937e42096282",
 "rel": "self"}, {"href": 
"http://<hostandport>/aa8b003283e24ad7afc42975eb4deeb1/images/f1885998-9da6-4777-bacd-937e42096282",
 "rel": "bookmark"}, {"href": 
"http://<hostandport>/aa8b003283e24ad7afc42975eb4deeb1/images/f1885998-9da6-4777-bacd-937e42096282",
 "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": 
"f1885998-9da6-4777-bacd-937e42096282", "OS-EXT-IMG-SIZE:size": 2147483648, 
"name": "Fedora 20 x86_64", "created": "2014-05-01T14:56:45Z", "minDisk": 2, 
"progress": 100, "minRam": 2000, "metadata": {}}, {"status": "ACTIVE", 
"updated": "2014-05-01T15:01:08Z", "links": [{"href": 
"http://<hostandport>/v2/aa8b003283e24ad7afc42975eb4deeb1/images/78cc4b66-bec3-4dca-ab06-ce01be832042",
 "rel": "self"}, {"href": 
"http://<hostdandport>/aa8b003283e24ad7afc42975eb4deeb1/images/78cc4b66-bec3-4dca-ab06-ce01be832042",
 "rel": "bookmark"}, {"href": 
"http://<hostandport>/aa8b003283e24ad7afc42975eb4deeb1/images/78cc4b66-bec3-4dca-ab06-ce01be832042",
 "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": 
"78cc4b66-bec3-4dca-ab06-ce01be832042", "OS-EXT-IMG-SIZE:size": 252903936, 
"name": "Ubuntu 14.04 LTS (Trusty Tahr) x86_64", "created": 
"2014-04-30T02:12:54Z", "minDisk": 2, "progress": 100, "minRam": 0, "metadata": 
{}}, {"status": "ACTIVE", "updated": "2014-05-01T15:00:54Z", "links": [{"href": 
"http://<hostandport>/v2/aa8b003283e24ad7afc42975eb4deeb1/images/306b4413-ce6e-44d0-8126-c7e2864cb2b5",
 "rel": "self"}, {"href": 
"http://<hostandport>/aa8b003283e24ad7afc42975eb4deeb1/images/306b4413-ce6e-44d0-8126-c7e2864cb2b5",
 "rel": "bookmark"}, {"href": 
"http://<hostandport>/aa8b003283e24ad7afc42975eb4deeb1/images/306b4413-ce6e-44d0-8126-c7e2864cb2b5",
 "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": 
"306b4413-ce6e-44d0-8126-c7e2864cb2b5", "OS-EXT-IMG-SIZE:size": 237371392, 
"name": "Fedora 19 x86_64", "created": "2013-12-31T00:50:57Z", "minDisk": 0, 
"progress": 100, "minRam": 0, "metadata": {}}]}"
-  no jclouds.zones configured for provider openstack-nova 
-  no jclouds.zones configured for provider openstack-nova 
>> No of images 4
{noformat}

There is one running image when I run the "add" command, it is an Ubuntu image 
with its own disk. 

> JSON parse error on createNodesInGroup
> --------------------------------------
>
>                 Key: JCLOUDS-558
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-558
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-compute
>    Affects Versions: 1.7.2
>         Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>            Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
>     java \
>          -Dopenstack-nova.image-id=RegionOne/<image ID> \
>          -Dopenstack-nova.login-user=ubuntu \
>          -Djclouds.trust-all-certs=true \
>          -Djclouds.keystone.credential-type=passwordCredentials \
>          -Dopenstack-nova.endpoint=https://<openstack endpoint host>/v2.0 \
>          -jar target/compute-basics-jar-with-dependencies.jar \
>          openstack-nova <tenant>:<username> <password> mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http://<host>/v2/<stuff>/servers/detail 
> HTTP/1.1
> -  >> GET http://<host>/v2/<stuff>/servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: <redacted>
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"<tenantid>": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "<ipaddr>", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http://<hostandport>/v2/<stuff>/servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http://<hostandport>/<Stuff>/servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.000000", "flavor": {"id": "3", 
> "links": [{"href": "http://<hostandport>/<stuff>/flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "<username>", "name": 
> "<hostname>", "created": "2014-05-03T00:44:12Z", "tenant_id": "<stuff>", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": "<stuff>"}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>       at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>       at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>       at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:129)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:124)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:92)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:84)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:63)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>       at com.google.gson.Gson.fromJson(Gson.java:768) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>       at com.google.gson.Gson.fromJson(Gson.java:717) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>       at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:45) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>       at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:84) 
> [compute-basics-jar-with-dependencies.jar:na]
>       at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:78) 
> [compute-basics-jar-with-dependencies.jar:na]
>       at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:64) 
> [compute-basics-jar-with-dependencies.jar:na]
>       at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:44) 
> [compute-basics-jar-with-dependencies.jar:na]
>       at 
> com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.invoke(InvokeSyncToAsyncHttpMethod.java:129)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:95)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:56)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at com.sun.proxy.$Proxy80.listInDetail(Unknown Source) [na:na]
>       at 
> org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceAdapter.listNodes(NovaComputeServiceAdapter.java:205)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listDetailsOnNodesMatching(AdaptingComputeServiceStrategies.java:123)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listNodes(AdaptingComputeServiceStrategies.java:113)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:194)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:123)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.openstack.nova.v2_0.compute.strategy.ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.java:148)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:215)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> ~[na:1.7.0_55]
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
> ~[na:1.7.0_55]
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[na:1.7.0_55]
>       at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_55]
>       at 
> com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
>  [compute-basics-jar-with-dependencies.jar:na]
>       at com.sun.proxy.$Proxy59.createNodesInGroup(Unknown Source) [na:na]
>       at org.jclouds.examples.compute.basics.MainApp.main(MainApp.java:169) 
> [compute-basics-jar-with-dependencies.jar:na]
> Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was 
> STRING
>       at 
> com.google.gson.internal.bind.JsonTreeReader.expect(JsonTreeReader.java:139) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> com.google.gson.internal.bind.JsonTreeReader.beginObject(JsonTreeReader.java:70)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:167)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>       ... 42 common frames omitted
> {noformat}
> It looks like the JSON schema is not appropriate? This version of OpenStack 
> seems pretty old.. am I doing something wrong? 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to