New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packer 0.6.0 is broken when Rackspace (OpenStack) images are created #1142
Comments
Apparently it's actually a gophercloud issue. I reverted back to Packer 0.5.2 and it works great. See this link #1134 |
Thanks for the info. I see #1134 closed since this is a bug on gophercloud but is not clear to me how to workaround this besides reverting back to 0.5.2. Is there any ETA for a fix? |
@darron By process of elimination, it can't be a Gophercloud issue if it works great with Packer 0.5.2 and not with 0.6.0. I didn't change Gophercloud between these releases. @mitchellh, if you can point me to the relevant code in Packer that is causing this problem, I'd like to see if there's something I can do to help alleviate the problem cited in this bug, or maybe offer an alternative approach that fixes the issue. I have one other bug reported against Gophercloud which references this bug, but I'm simply not able to reproduce the issue. Thanks for any help you can give towards resolving this issue. |
Can anyone please confirm that the URL Gophercloud is being passed is or is not a CDN resource URL? It sure looks like it is by its structure. |
I can confirm this bug. I tried to build on a private OpenStack. Here is my config. And this is the crash.log: (maybe it helps) 2014/06/06 14:59:18 Packer Version: 0.6.0 12e28f2 |
This still isn't a bug with Gophercloud though. Witness the following from the logs: Provider:https://openstack.efa-dev.com RawRegion:DFW The DFW region is a Rackspace region, and unless efa-dev.com licenses through Rackspace, it's not likely to have the same region names as Rackspace. |
Oh, I think I didn't understand region. What do I need to put there for a custom open stack setup? |
That will depend on how your installation of Nova is configured. The region is intended to identify a geographic region or specific data center. You may also use an empty string if region is not set, as Gophercloud will ignore the region if "", selecting the first matching entry based on other fields. |
I've seen the same issue in 0.6.0. Using the provider config from http://www.packer.io/docs/builders/openstack.html, modifying for the UK and passing in my own creds: { Returns: Debug mode enabled. Builds will not be parallelized. ==> openstack: Creating temporary keypair for this instance... ==> openstack: Error launching source server: Expected HTTP response code [202] when accessing URL(https://lon.bigdata.api.rackspacecloud.com/v1.0/10014073/servers); got 404 instead with the following body: Just starting with Packer, so might be on the wrong track, but https://lon.bigdata.api.rackspacecloud.com/v1.0 doesn't look right. Reverting to 0.5.2 for now. |
Upon web searching ,
It would appear then that Packer is requesting for a service endpoint using gophercloud's service catalog api. However, without specifying more information packer seems to be picking the CDN url (mentioned above) simply because it is the first that appears in the list (this is a guess). My suggestion is to find in source where packer is requesting a service endpoint to create an image and find out how it is specifying the the service endpoint type to gophercloud. Linking related gophercloud github issue: rackspace/gophercloud#162 |
Upon taking queue's from @sam-falvo comment (rackspace/gophercloud#162 (comment)), I decided to look more into packer's source and found the following changeset: ee95fbb
This is a sample of my packer.json file I used to make packer send the correct API criteria to gophercloud:
Note: Tested against packer So, whats the resolution here? Well, both services work as expected when inputed with the correct configuration settings. However, Packer's documentation can probably use and update or two to better describe this specific requirement. |
As per hashicorp#1142, it's critical to add openstack_provider: rackspace in order to get anything to work reliably with Rackspace and Packer in 6.0. Question: should the openstack_provider field now be marked as required?
Fixing in response to #1347 |
As per hashicorp#1142, it's critical to add openstack_provider: rackspace in order to get anything to work reliably with Rackspace and Packer in 6.0. Question: should the openstack_provider field now be marked as required?
Hi folks,
I was trying packer since I needed to create a custom image with Rackspace but I found out 0.6.0 is broken for me although 0.5.2 works OK.
This is the command I was using with 0.6.0:
This fails with these error messages:
But it works OK and creates a working image with 0.5.2.
This is the template file that I'm using:
The text was updated successfully, but these errors were encountered: