[jira] [Created] (JCLOUDS-1249) IllegalArgumentException when rolling back servers in openstack-nova

2017-02-28 Thread Ignasi Barrera (JIRA)
Ignasi Barrera created JCLOUDS-1249:
---

 Summary: IllegalArgumentException when rolling back servers in 
openstack-nova
 Key: JCLOUDS-1249
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1249
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-compute
Affects Versions: 2.0.1
Reporter: Ignasi Barrera


When trying to rollback a server in OpenStack Nova, we are passing the ID in an 
invalid format to the cleanup strategy, leading to an IllegalArgumentException:

{code}
Caused by: java.lang.IllegalArgumentException: id must be in format regionId/id
at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:125)
at 
org.jclouds.openstack.nova.v2_0.domain.regionscoped.RegionAndId.fromSlashEncoded(RegionAndId.java:31)
at 
org.jclouds.openstack.nova.v2_0.compute.functions.CleanupServer.apply(CleanupServer.java:67)
at 
org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceAdapter.destroyNode(NovaComputeServiceAdapter.java:269)
at 
org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceAdapter.createNodeWithGroupEncodedIntoName(NovaComputeServiceAdapter.java:152)
at 
org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.createNodeWithGroupEncodedIntoName(AdaptingComputeServiceStrategies.java:196)
at 
org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet$AddNode.call(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:81)
at 
org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet$AddNode.call(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at java.lang.Thread.getStackTrace(Thread.java:1552)
at 
org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.createNodeInGroupWithNameAndTemplate(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:169)
at 
org.jclouds.openstack.nova.v2_0.compute.strategy.ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.createNodeInGroupWithNameAndTemplate(ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.java:161)
at 
org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:124)
at 
org.jclouds.openstack.nova.v2_0.compute.strategy.ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.java:154)
at 
org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:217)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jclouds/jclouds] JCLOUDS-1249: Fix OpenStack server rollback (#1065)

2017-02-28 Thread Ignasi Barrera
https://issues.apache.org/jira/browse/JCLOUDS-1249
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1065

-- Commit Summary --

  * JCLOUDS-1249: Fix OpenStack server rollback

-- File Changes --

M 
apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceAdapter.java
 (2)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1065.patch
https://github.com/jclouds/jclouds/pull/1065.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1065


Re: [jclouds/jclouds-labs] Improve image lookup when getting node info (#359)

2017-02-28 Thread Ignasi Barrera
Thanks @neykov! I've applied the change. The ImageCache already provides [a 
method](https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/suppliers/ImageCacheSupplier.java#L152-L165)
 to do that, so it's been easy. That method directly uses the underlying cache, 
without initializing the memoized supplier that fetches all images. Calling 
there should do what we need here.
Feedback welcome!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/359#issuecomment-283055682

Re: [jclouds/jclouds-labs] Improve image lookup when getting node info (#359)

2017-02-28 Thread Andrea Turli
+1 looks like a desired improvement.
not yet tested though

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/359#issuecomment-283057345

[jclouds/jclouds] Handle IOException for XATTRS when reading blob on Docker (#1066)

2017-02-28 Thread Geert Vanheusden
PR for https://issues.apache.org/jira/browse/JCLOUDS-1218
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1066

-- Commit Summary --

  * Hanlde IOException when reading Blob without XATTRS support
  * Reset imports

-- File Changes --

M 
apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
 (58)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1066.patch
https://github.com/jclouds/jclouds/pull/1066.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1066


Re: [jclouds/jclouds] Handle IOException for XATTRS when reading blob on Docker (#1066)

2017-02-28 Thread Geert Vanheusden
Not sure if 
https://github.com/geertvanheusden/jclouds/blob/master/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java#L689
 should be handled as well? 
Is it necessary to have an XATTR_CONTENT_MD5 attribute if you want to check if 
the BLOB exists?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1066#issuecomment-283126175

Re: [jclouds/jclouds] Handle IOException for XATTRS when reading blob on Docker (#1066)

2017-02-28 Thread Geert Vanheusden
@geertvanheusden pushed 1 commit.

34e435e  Indentation


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1066/files/01ccb743827e8c7ba89f71213e5cd794d839898e..34e435ed95fa5a8db1ff148e37cf735c2aaa1bf2


[jira] [Commented] (JCLOUDS-1218) jclouds throws an exception while reading file from FS that doesn't support XATTR

2017-02-28 Thread Geert Vanheusden (JIRA)

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

Geert Vanheusden commented on JCLOUDS-1218:
---

Created a PR to fix this: https://github.com/jclouds/jclouds/pull/1066

> jclouds throws an exception while reading file from FS that doesn't support 
> XATTR
> -
>
> Key: JCLOUDS-1218
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1218
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.0.0
> Environment: docker-for-mac or docker-for-win with mounted volumes
>Reporter: Geert Vanheusden
>  Labels: docker
>
> When using a docker mounted volume on docker-for-win or docker-for-mac, 
> XATTRs are not supported. This should be handled correctly by jclouds.
> XATTR exceptions while putting a blob are already handled in this PR:
> https://github.com/jclouds/jclouds/pull/642
> Reproducible example & stacktrace:
> https://github.com/geertvanheusden/jcloud-xattr-bug



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Re: [jclouds/jclouds] Handle IOException for XATTRS when reading blob on Docker (#1066)

2017-02-28 Thread Zack Shoylev
It seems XATTR_CONTENT_MD5 should be handled as well, but I am not very sure 
what's going on with how it's used.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1066#issuecomment-283147308

[jira] [Created] (JCLOUDS-1250) Swift getBlob fails

2017-02-28 Thread Archana Chinnaiah (JIRA)
Archana Chinnaiah created JCLOUDS-1250:
--

 Summary: Swift getBlob fails
 Key: JCLOUDS-1250
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1250
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-blobstore
Affects Versions: 2.0.0
 Environment: RHEl 7
Java 1.7

Reporter: Archana Chinnaiah
Priority: Blocker


Checking container exist before container creation for the very first time  
followed by getBlob fails saying

Exception in thread "main" java.lang.IllegalStateException: Optional.get() 
cannot be called on an absent value
at com.google.common.base.Absent.get(Absent.java:47)
at 
org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.toBlobMetadata(RegionScopedSwiftBlobStore.java:603)

Getblob fails
at 
org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:381)
at 
org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:371)
at main.java.s3_19.App.main(App.java:98)

Code Snippet Used:

BlobStoreContext context = ContextBuilder.newBuilder("openstack-swift")
  .endpoint("http://x.xx.xx.x:5000/v2.0";)
  .credentials("xx:xxx", "xxx")
  .buildView(BlobStoreContext.class);
PutOptions opt = new PutOptions();
opt.multipart();
 BlobStore blobStore = context.getBlobStore();
boolean val = blobStore.containerExists(CONTAINER_NAME);
 blobStore.createContainerInLocation(null, CONTAINER_NAME);
 Blob blob = blobStore.blobBuilder(OBJECT_NAME)
.payload(payload)
.build();
  blobStore.putBlob(CONTAINER_NAME, blob, opt);
   Blob b1 = blobStore.getBlob(CONTAINER_NAME, OBJECT_NAME);

For the second time, since the container is already there its successful.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (JCLOUDS-1251) Swift removeBlob

2017-02-28 Thread Archana Chinnaiah (JIRA)
Archana Chinnaiah created JCLOUDS-1251:
--

 Summary: Swift removeBlob
 Key: JCLOUDS-1251
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1251
 Project: jclouds
  Issue Type: Bug
Affects Versions: 2.0.0
 Environment: RHEl 7
Java 1.7
Reporter: Archana Chinnaiah
Priority: Blocker


RemoveBlob for swift is unsuccessful, and fails with the following error

Mar 01, 2017 12:08:50 PM org.jclouds.logging.jdk.JDKLogger logError
SEVERE: Error parsing input: null
java.lang.NullPointerException
at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:60)
at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:41)
at 
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
at 
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at 
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy73.delete(Unknown Source)
at 
org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.removeBlob(RegionScopedSwiftBlobStore.java:393)
at main.java.s3_19.App.main(App.java:106)

Exception in thread "main" org.jclouds.http.HttpResponseException: Error 
parsing input: null
{statusCode=204, message=No Content, headers={Date=[Wed, 01 Mar 2017 06:46:49 
GMT], X-Trans-Id=[txa66b195a2b4b4723931ca-0058b66e59], Connection=[keep-alive]}}
at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:67)
at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:41)
at 
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
at 
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at 
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy73.delete(Unknown Source)
at 
org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.removeBlob(RegionScopedSwiftBlobStore.java:393)
at main.java.s3_19.App.main(App.java:106)
Caused by: java.lang.NullPointerException
at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:60)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (JCLOUDS-1132) Amazon AWS - Create Volume - query params reported as unrecognized

2017-02-28 Thread Felix Otto (JIRA)

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

Felix Otto commented on JCLOUDS-1132:
-

I updated my environment to jCloud 2.0.0 and solve with that the problem.

> Amazon AWS - Create Volume - query params reported as unrecognized
> --
>
> Key: JCLOUDS-1132
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1132
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.9.0, 1.9.2
> Environment: Amazon AWS EC2 management console
>Reporter: Tusa Mihail Cristian
>
> Let say that I want to create a Volume that is encrypted. So, I set the 
> encrypted on "true"... in request query params apear "&Encrypted=true". In 
> this case the error that I got is: 
> UnknownParameterThe parameter 
> Encrypted is not 
> recognizedc874434a-b00e-425d-baf4-18087441603a
>  
> instead it should be: "&Encrypted=1" as it is shown in Amazon docs: 
> http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html 
> in Example/Sample request. The problems are also related with Volume Type. If 
> not specified than creates a standard volume but if anything specified (any 
> of valid Values: standard | io1 | gp2 | sc1 | st1 ) the same error with 
> unrecognized param is received.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (JCLOUDS-1132) Amazon AWS - Create Volume - query params reported as unrecognized

2017-02-28 Thread Felix Otto (JIRA)

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

Felix Otto edited comment on JCLOUDS-1132 at 3/1/17 7:57 AM:
-

I updated my environment to jCloud 2.0.0 and solved with that the problem.


was (Author: felix.otto):
I updated my environment to jCloud 2.0.0 and solve with that the problem.

> Amazon AWS - Create Volume - query params reported as unrecognized
> --
>
> Key: JCLOUDS-1132
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1132
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.9.0, 1.9.2
> Environment: Amazon AWS EC2 management console
>Reporter: Tusa Mihail Cristian
>
> Let say that I want to create a Volume that is encrypted. So, I set the 
> encrypted on "true"... in request query params apear "&Encrypted=true". In 
> this case the error that I got is: 
> UnknownParameterThe parameter 
> Encrypted is not 
> recognizedc874434a-b00e-425d-baf4-18087441603a
>  
> instead it should be: "&Encrypted=1" as it is shown in Amazon docs: 
> http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html 
> in Example/Sample request. The problems are also related with Volume Type. If 
> not specified than creates a standard volume but if anything specified (any 
> of valid Values: standard | io1 | gp2 | sc1 | st1 ) the same error with 
> unrecognized param is received.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)