Thanks guys! Apologies for the slow response - was sidetracked with another
issue.
Chris, apparently for some reason the way we've added the image to that
project does not include the rawDisk field:
{ "kind": "compute#image", "selfLink": "
https://www.googleapis.com/compute/v1/projects/<snipped>/global/images/em2-201407311619",
"id": "5684027672297600099", "creationTimestamp":
"2014-07-31T16:25:31.255-07:00", "name": "em2-201407311619", "description":
"", "sourceType": "RAW", "status": "READY", "archiveSizeBytes":
"2195392264", "diskSizeGb": "10", "sourceDisk": "
https://www.googleapis.com/compute/v1/projects/<snipped>/zones/us-central1-a/disks/em2",
"sourceDiskId": "1777248800849859015" }
When I add it to another project using the gcutil addimage command, it does
specify the rawDisk field:
{ "kind": "compute#image", "selfLink": "
https://www.googleapis.com/compute/v1/projects/<snipped>/global/images/em2
<https://www.googleapis.com/compute/v1/projects/modern-saga-648/global/images/em2>",
"id": "16640109463810346568", "creationTimestamp":
"2014-08-01T14:16:33.255-07:00", "name": "em2", "description": "",
"sourceType": "RAW", "rawDisk": { "source": "", "containerType": "TAR" },
"status": "READY", "archiveSizeBytes": "2105823816", "diskSizeGb": "10" }
We created the original image by following the instructions on Google's own
docs here:
https://developers.google.com/compute/docs/images#creating_an_image_from_a_root_persistent_disk
If we delete the image and recreate it according to these instructions, it,
again, doesn't include the "rawDisk" field and JClouds throws a
NullPointerException.
I've filed a JIRA ticket here
<https://issues.apache.org/jira/browse/JCLOUDS-649>.
Cheers,
Sunil
On Fri, Aug 1, 2014 at 12:40 PM, Chris Custine <[email protected]>
wrote:
> I added your image and tested this with no issues. Can you confirm that
> you are still having this issue? I also checked the data returned by the
> api and it looks just like any other image so I am not sure what could have
> happened.
>
> You can look at the wire dump like this, just to make sure you get the
> same descriptor that I am seeing:
> gcutil --project myproject listimages --dump_request_response
>
> em2 top, compared to debian 7 wheezy below:
>
> {
> "kind": "compute#image",
> "selfLink": "
> https://www.googleapis.com/compute/v1/projects/oemesosphere/global/images/em2
> ",
> "id": "12258396119106299516",
> "creationTimestamp": "2014-08-01T11:47:43.692-07:00",
> "name": "em2",
> "description": "",
> "sourceType": "RAW",
> "rawDisk": {
> "source": "",
> "containerType": "TAR"
> },
> "status": "READY",
> "archiveSizeBytes": "2105823816",
> "diskSizeGb": "10"
> }
>
> {
> "kind": "compute#image",
> "selfLink": "
> https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20140718
> ",
> "id": "11535450626613878896",
> "creationTimestamp": "2014-07-24T09:06:16.694-07:00",
> "name": "debian-7-wheezy-v20140718",
> "description": "Debian GNU/Linux 7.6 (wheezy) amd64 built on 2014-07-18",
> "sourceType": "RAW",
> "rawDisk": {
> "source": "",
> "containerType": "TAR"
> },
> "status": "READY",
> "archiveSizeBytes": "1195066695",
> "diskSizeGb": "10"
> }
>
> -Chris
> --
> Chris Custine
>
>
> On August 1, 2014 at 11:52:54 AM, Sunil Shah ([email protected]) wrote:
> > Hello,
> >
> > We're trying to use Jclouds with a GCE project that has a custom image
> > added and we get a null pointer exception.
> >
> > We added the image to our project with this command:
> > gcutil addimage em2
> >
> http://storage.googleapis.com/mesosphere-public-images/446d06471fa12aa35b1badd567168be134b95cf8.image.tar.gz
> >
> > (This is a public bucket, so you should be able to try this out too.)
> >
> > JClouds throws a NullPointerException when we call:
> > context.getComputeService.listImages()
> >
> > The full stack trace is here:
> > https://gist.github.com/ssk2/5ee56af7f0976b4b1e9d
> >
> > Has anyone run into this problem before or have any suggestions for how
> to
> > fix it?
> >
> > Regards,
> >
> > Sunil
> >
>
>