jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <n...@apache.org>
Subject Re: NullPointerException in GCE attach local-ssd disk
Date Tue, 16 Oct 2018 10:14:09 GMT
Looks like a reasonable patch. Wanna open a pull request?
On Tue, 16 Oct 2018 at 12:10, Mahmoud Ismail
<mahmoudahmedismail@gmail.com> wrote:
>
> Hello,
>
> I was trying to create a local ssd disk (NVMe) to my vm instance on GCE and i got this
null pointer exception
>
> ! java.lang.NullPointerException: Null sourceImage ! at org.jclouds.googlecomputeengine.domain.AutoValue_AttachDisk_InitializeParams.<init>(AutoValue_AttachDisk_InitializeParams.java:24)
~[google-compute-engine-2.1.1.jar:2.1.1]
> ! at org.jclouds.googlecomputeengine.domain.AttachDisk$InitializeParams.create(AttachDisk.java:52)
~[google-compute-engine-2.1.1.jar:2.1.1]
>
> AttachDisk nvme = AttachDisk.create(AttachDisk.Type.SCRATCH,
>     AttachDisk.Mode.READ_WRITE, null, null, false,
>     AttachDisk.InitializeParams.create(null,null,
>         null, diskType), true, null,
>     AttachDisk.DiskInterface.NVME);
>
>
> Jclouds complains that the sourceImage is null, however, the source image is not needed
for the local-ssd diskType.
>
> Is there is another way to create local ssd disks in GCE using jclouds?
>
> As a workaround, i marked the sourceImage in AttachDisk.InitializeParams as Nullable,
and recompiled the jclouds code. That seems to fix my issue.
>
> Regards,
> Mahmoud
>

Mime
View raw message