Glance with S3 backend store

Asked by João Pereira on 2012-07-02

Hi,

I've successfully installed Glance. I've already tested it with the filesystem backend and it works fine. Although now I was trying to upload images to S3. For that I've edited the following glance-api.conf attributtes:

===========

default_store = s3
...
s3_store_host = s3.amazonaws.com
s3_store_access_key = XXXXXXX
s3_store_secret_key = XXXXXXX

============

I've saved the file and restarted the glance-api. Then I try:

glance add name="image S3" is_public=true < sample.iso

But I get:

==========================
Uploading image 'image S3'
Failed to add image. Got error:
Data supplied was not valid.
Details: 400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

 Error uploading image: (S3ResponseError): S3ResponseError: 403 Forbidden RequestTimeTooSkewedThe difference between the request time and the current time is too large.900000B941EA68EBC60960qJ9rCPcF+NJQFL9Bni11a4t0WhSSrgZJkOtrY09o1q4MVKNM29c60+ZLJ3JRY18dFri, 22 Jun 2012 05:07:46 GMT2012-07-02T15:25:37Z
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.
====================

I've double checked the user credentials, they are ok. Any guess on what's happening there? I can't also refer to an S3 image with the "copy_from" option.

Another question, is there an option for uploading an image to a different backend than that elected as default on the .conf file? This is, a CLI option.

Question information

Language:
English Edit question
Status:
Solved
For:
Glance Edit question
Assignee:
No assignee Edit question
Solved by:
Jay Pipes
Solved:
2012-07-02
Last query:
2012-07-02
Last reply:
2012-07-02
Best Jay Pipes (jaypipes) said : #1

You are probably getting hit by the leap second issue... try refreshing your NTP date on the host that is running the Glance code.

João Pereira (joaodrp) said : #2

Thanks, the datetime was incorrect, a reboot was enough to synchronize it.

João Pereira (joaodrp) said : #3

Thanks Jay Pipes, that solved my question.