jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Turli (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-678) NPE on GCE attachDisk when VM not found (because user-error wrong region specified)
Date Wed, 27 Aug 2014 08:34:57 GMT

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

Andrea Turli commented on JCLOUDS-678:
--------------------------------------

Thanks [~nacx] for the patch. I think fallback is just part of the problem, in fact we should
avoid that a VM in a region (asia-east1-c) then tries to attach a disk in a different region
(europe-west1-a). I guess it is something we already discussed for openstack. What do you
think? 

> NPE on GCE attachDisk when VM not found (because user-error wrong region specified)
> -----------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-678
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-678
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs-google
>    Affects Versions: 1.8.0
>            Reporter: Aled Sage
>            Assignee: Ignasi Barrera
>            Priority: Minor
>
> When attaching a disk to a VM, I got an NPE (because I specified the wrong zone - user
error!)
>     2014-08-19 17:27:39,455 ERROR b.l.b.AbstractVolumeManagerLiveTest [main]: Error creating
and attaching volume
>     java.lang.NullPointerException: operation should not be null
>         at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:229)
~[guava-17.0.jar:na]
>         at brooklyn.location.blockstore.gce.GoogleComputeEngineVolumeManager.waitForOperationToBeDone(GoogleComputeEngineVolumeManager.java:183)
~[classes/:na]
>         at brooklyn.location.blockstore.gce.GoogleComputeEngineVolumeManager.attachBlockDevice(GoogleComputeEngineVolumeManager.java:111)
~[classes/:na]
>         at brooklyn.location.blockstore.AbstractVolumeManager.createAttachAndMountVolume(AbstractVolumeManager.java:38)
~[classes/:na]
>         at brooklyn.location.blockstore.AbstractVolumeManagerLiveTest.testCreateAndAttachVolume(AbstractVolumeManagerLiveTest.java:158)
~[test-classes/:na]
> The sequence of events were:
> 1. create VM without specifying region (it was created in asia-east1-c)
> 2. attach disk to the VM (but specifying europe-west1-a)
> 2.1 jclouds calls POST https://www.googleapis.com/compute/v1/projects/jclouds-gce/zones/europe-west1-a/instances/brooklyn-ryqx-aled-1d9/attachDisk
> 2.2 jclouds gets back a 404, so returns null from InstanceApi.attachDiskInZone
>     2014-08-19 17:27:39,451 DEBUG jclouds.wire [main]: << "  "code": 404,[\n]"
>     2014-08-19 17:27:39,451 DEBUG jclouds.wire [main]: << "  "message": "The resource
'projects/jclouds-gce/zones/europe-west1-a/instances/brooklyn-ryqx-aled-1d9' was not found"[\n]"
> 2.3 tries to look up operation with id null; throws NPE
> I'd have preferred a more graceful error earlier, to say that the VM could not be found.
> Unfortunately the nice message is not available to the caller of instanceApi.attachDiskInZone;
it just returns null.



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

Mime
View raw message