You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Daniel Broudy (JIRA)" <ji...@apache.org> on 2014/10/15 22:55:34 UTC
[jira] [Commented] (JCLOUDS-649) Creating an image from a root
persistent disk causes NullPointerException on GCE
[ https://issues.apache.org/jira/browse/JCLOUDS-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14172924#comment-14172924 ]
Daniel Broudy commented on JCLOUDS-649:
---------------------------------------
After talking to Chris I made the following PR to address this issue.
https://github.com/jclouds/jclouds-labs-google/pull/59
> Creating an image from a root persistent disk causes NullPointerException on GCE
> --------------------------------------------------------------------------------
>
> Key: JCLOUDS-649
> URL: https://issues.apache.org/jira/browse/JCLOUDS-649
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-labs-google
> Affects Versions: 1.7.3
> Environment: Debian Wheezy
> Reporter: Sunil Shah
> Assignee: Chris Custine
>
> When we create an image using the instructions at https://developers.google.com/compute/docs/images#creating_an_image_from_a_root_persistent_disk and add it to our project, using JClouds to list images fails with a NullPointerException:
> context.getComputeService.listImages()
> Full stack trace is here: https://gist.github.com/ssk2/5ee56af7f0976b4b1e9d
> This appears to be because adding an image this way (using gcutil addimage but with source_disk specified) doesn't set the "rawDisk" attribute for the image, whereas other images have this set (whether official or added by using gcutil addimage without source_disk specified).
> A working image added using gcutil addimage without source_disk specified:
> {code:javascript}
> {
> "kind": "compute#image",
> "selfLink": "https://www.googleapis.com/compute/v1/projects/<snipped>/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"
> }
> {code}
> A non-working image added using gcutil addimage with source_disk specified:
> {code:javascript}
> {
> "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"
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)