Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.7.2
-
None
-
Ubuntu 12.04
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.
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
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.