Skip to content

builder/openstack: Rackspace UK failing #827

z0mbix opened this Issue Jan 17, 2014 · 5 comments

4 participants

z0mbix commented Jan 17, 2014

I'm having trouble using packer to build a UK Rackspace cloud server resulting in a 401 instead of a 200:

Build 'openstack' errored: Expected HTTP response code [200]; got 401 instead

I have exported SDK_USERNAME, SDK_PASSWORD with my API credentials and exported SDK_PROVIDER=rackspace-uk

I already use these credentials with other rackspace API tools like pyrax so I know they are correct. I have also set the credentials and provider in the packer json template, but that makes no difference.

Full config details and logs here:

Looking at gophercloud ( I looks like it is using the correct UK API endpoint:

$ packer --version
Packer v0.5.1

I'm running packer on Mountain Lion


I'll try to sign up for an account and give this a go..

z0mbix commented Jan 29, 2014

Somebody else is also seeing this with the rackspace-us provider:!topic/packer-tool/htp1CGLE7YE


This is due to the authentication method being used. OpenStack expects a username and password, while RAX offers an additional API key variation (slightly different format to specify the use of an API key rather than the password) - (examples 4 and 5, respectively).

I have tested and confirmed this by updating a template file and providing the RAX account password (same one used when accessing the control panel) instead of the API key. Given these are creds that access full account information as well, I'd prefer to see an alternative - I fear that may be in a specific RAX builder/auth section or similar.

For the time being, given the presence of role-based access control for most products, I have created an additional RAX username under my account, permitting me to make requests in the expected OpenStack format - having the added benefit of segregating access roles as well.

ypaq commented Feb 19, 2014

+1 for @asmajlovic's proposal

z0mbix commented Feb 22, 2014

Thansk @asmajlovic that solved the problem. I'll close this now. Probably a good idea to make a note on the packer docs about this.

@z0mbix z0mbix closed this Feb 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.