← Back to team overview

registry team mailing list archive

[Bug 609203] Re: Error trying to start instance

 

which Authorization header(AWSAccessKeyId) is validity?

--------------------------------------------------------
/nova/endpoint/images.py
def conn(context):
    return boto.s3.connection.S3Connection (
        aws_access_key_id=str('%s:%s' % (context.user.access, context.project.name)),
        aws_secret_access_key=str(context.user.secret),

--------------------------------------------------------
/nova/virt/images.py
def _fetch_s3_image(image, path, user):
    url = _image_url('%s/image' % image)

    # This should probably move somewhere else, like e.g. a download_as
    # method on User objects and at the same time get rewritten to use
    # twisted web client.
    headers = {}
    headers['Date'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime())

    uri = '/' + url.partition('/')[2]
    auth = signer.Signer(user.secret.encode()).s3_authorization(headers, 'GET', uri)
    headers['Authorization'] = 'AWS %s:%s' % (user.access, auth)
--------------------------------------------------------


When I rewrite part of /images.py, I passed euca-run-instance.
It needs project.name
headers['Authorization'] = 'AWS %s:%s' % (user.access, auth)
→headers['Authorization'] = 'AWS %s:%s:%s' % (user.access, project.name, auth)

-- 
Error trying to start instance
https://bugs.launchpad.net/bugs/609203
You received this bug notification because you are a member of Registry
Administrators, which is subscribed to OpenStack.



References