[ 
https://issues.apache.org/jira/browse/JCLOUDS-635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Gaul updated JCLOUDS-635:
--------------------------------
    Description: 
Writing a blob to non existent container in an AWS objectstore fails with a 
"Container not found" error and a status code of 2. However writing  a blob to 
a non existent container in a swift based objectstore (we tried both generic 
swift and rackspace) results in a  "IO error: Server rejected operation" and a 
status code of 5. 

{{noformat}}
user@ubuntu-host:/opt/some/directory$ 
/opt/some/directory/jclouds-cli/bin/jclouds blobstore write 
--provider=swift-keystone --identity=<redacted> --credential=<redacted> 
--endpoint=http://swift-endpoint <non-existent-container> <some-key> 
/tmp/some-file
shell: JAVA_HOME not set; results may vary
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /var/log/jclouds.log (Permission denied)
...
..
IO error: Server rejected operation
user@ubuntu-host:/opt/some/directory$ echo $?
5
user@ubuntu-host:/opt/some/direcoty$ 
/opt/some/directory/jclouds-cli/bin/jclouds blobstore write --provider=aws-s3 
--identity=<redacted> --credential=<redacted> <non-existent-container> 
<somekey> /tmp/somefile
shell: JAVA_HOME not set; results may vary
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /var/log/jclouds.log (Permission denied)
        at java.io.FileOutputStream.open(Native Method)
....
        at org.jclouds.cli.runner.Main.main(Main.java:111)
Container not found: non-existent-container.s3.amazonaws.com not found: The 
specified bucket does not exist
user@ubuntu-host:/opt/some/directory$ echo $?
2
{{noformat}}

This makes it hard to programmatically catch the container not found error and 
create containers only if the container does not exist without hacky 
workarounds.

  was:
Writing a blob to non existent container in an AWS objectstore fails with a 
"Container not found" error and a status code of 2. However writing  a blob to 
a non existent container in a swift based objectstore (we tried both generic 
swift and rackspace) results in a  "IO error: Server rejected operation" and a 
status code of 5. 
<pre>
user@ubuntu-host:/opt/some/directory$ 
/opt/some/directory/jclouds-cli/bin/jclouds blobstore write 
--provider=swift-keystone --identity=<redacted> --credential=<redacted> 
--endpoint=http://swift-endpoint <non-existent-container> <some-key> 
/tmp/some-file
shell: JAVA_HOME not set; results may vary
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /var/log/jclouds.log (Permission denied)
...
..
IO error: Server rejected operation
user@ubuntu-host:/opt/some/directory$ echo $?
5
user@ubuntu-host:/opt/some/direcoty$ 
/opt/some/directory/jclouds-cli/bin/jclouds blobstore write --provider=aws-s3 
--identity=<redacted> --credential=<redacted> <non-existent-container> 
<somekey> /tmp/somefile
shell: JAVA_HOME not set; results may vary
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /var/log/jclouds.log (Permission denied)
        at java.io.FileOutputStream.open(Native Method)
....
        at org.jclouds.cli.runner.Main.main(Main.java:111)
Container not found: non-existent-container.s3.amazonaws.com not found: The 
specified bucket does not exist
user@ubuntu-host:/opt/some/directory$ echo $?
2
</pre>

This makes it hard to programmatically catch the container not found error and 
create containers only if the container does not exist without hacky 
workarounds.


> Incorrect error codes when writing a blob to a non existent container for 
> swift based object stores.
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-635
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-635
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>    Affects Versions: 1.7.2
>         Environment: Ubuntu 12.04
>            Reporter: Deepak Bobbarjung
>            Assignee: Shri Javadekar
>             Fix For: 2.0.0
>
>
> Writing a blob to non existent container in an AWS objectstore fails with a 
> "Container not found" error and a status code of 2. However writing  a blob 
> to a non existent container in a swift based objectstore (we tried both 
> generic swift and rackspace) results in a  "IO error: Server rejected 
> operation" and a status code of 5. 
> {{noformat}}
> user@ubuntu-host:/opt/some/directory$ 
> /opt/some/directory/jclouds-cli/bin/jclouds blobstore write 
> --provider=swift-keystone --identity=<redacted> --credential=<redacted> 
> --endpoint=http://swift-endpoint <non-existent-container> <some-key> 
> /tmp/some-file
> shell: JAVA_HOME not set; results may vary
> log4j:ERROR setFile(null,true) call failed.
> java.io.FileNotFoundException: /var/log/jclouds.log (Permission denied)
> ...
> ..
> IO error: Server rejected operation
> user@ubuntu-host:/opt/some/directory$ echo $?
> 5
> user@ubuntu-host:/opt/some/direcoty$ 
> /opt/some/directory/jclouds-cli/bin/jclouds blobstore write --provider=aws-s3 
> --identity=<redacted> --credential=<redacted> <non-existent-container> 
> <somekey> /tmp/somefile
> shell: JAVA_HOME not set; results may vary
> log4j:ERROR setFile(null,true) call failed.
> java.io.FileNotFoundException: /var/log/jclouds.log (Permission denied)
>         at java.io.FileOutputStream.open(Native Method)
> ....
>         at org.jclouds.cli.runner.Main.main(Main.java:111)
> Container not found: non-existent-container.s3.amazonaws.com not found: The 
> specified bucket does not exist
> user@ubuntu-host:/opt/some/directory$ echo $?
> 2
> {{noformat}}
> This makes it hard to programmatically catch the container not found error 
> and create containers only if the container does not exist without hacky 
> workarounds.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to