I was able to resolve my issues by the following steps: 1) I used a HTTP proxy (Fiddler on Windows) to determine exactly what errors were being returned by the Rackspace API, this lead me to believe that the password value for the Rackspace user was being requested and not the API key (as Nova uses)
query: ``` POST https://identity.api.rackspacecloud.com/v2.0/tokens HTTP/1.1 Host: identity.api.rackspacecloud.com User-Agent: gophercloud/2.0.0 Connection: close Content-Length: 122 Accept: application/json Content-Type: application/json Accept-Encoding: gzip Connection: close {"auth":{"passwordCredentials":{"password":"#######################","username":"#######"},"tenantId":"######"}} ``` response: ``` HTTP/1.1 401 Unauthorized Server: nginx Date: Mon, 15 Jan 2018 16:08:24 GMT Content-Type: application/json Content-Length: 106 Connection: close Content-Encoding: gzip Vary: Accept, Accept-Encoding, X-Auth-Token X-NewRelic-App-Data: ############################################################################### X-Trans-Id: ########################### Strict-Transport-Security: max-age=15552000; includeSubDomains X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Frame-Options: DENY Content-Security-Policy: default-src 'self' unauthorized code=401 message=Unable to authenticate user with credentials provided. ``` 2) I changed the "password" field to use the actual password and not the API key (as Nova uses) 3) I added the line: "communicator": "ssh", 4) I removed the lines: "ssh_password": null, "ssh_private_key_file": "./ssh/automation.private", The result was a saved image! ``` ==> openstack: Loading flavor: general1-1 2018/01/15 13:32:37 packer: 2018/01/15 13:32:37 [INFO] Loading flavor by ID: general1-1 2018/01/15 13:32:37 ui: openstack: Verified flavor. ID: general1-1 openstack: Verified flavor. ID: general1-1 2018/01/15 13:32:37 ui: ==> openstack: Creating temporary keypair: packer_5a5cf3c4-db97-bbdc-26ae-06bc7f9b0715 ... ==> openstack: Creating temporary keypair: packer_5a5cf3c4-db97-bbdc-26ae-06bc7f9b0715 ... 2018/01/15 13:32:40 ui: ==> openstack: Created temporary keypair: packer_5a5cf3c4-db97-bbdc-26ae-06bc7f9b0715 ==> openstack: Created temporary keypair: packer_5a5cf3c4-db97-bbdc-26ae-06bc7f9b0715 2018/01/15 13:32:40 packer: 2018/01/15 13:32:40 Couldn't parse SSH key, trying work around for [GH-2526]. 2018/01/15 13:32:40 packer: 2018/01/15 13:32:40 Executing: /usr/bin/openssl [rsa -in /tmp/packer-ber-privatekey-301075774 -out /tmp/packer-der-privatekey-792589701] ==> openstack: Successfully converted BER encoded SSH key to DER encoding. 2018/01/15 13:32:40 ui: ==> openstack: Successfully converted BER encoded SSH key to DER encoding. 2018/01/15 13:32:40 ui: ==> openstack: Launching server... ==> openstack: Launching server... 2018/01/15 13:32:41 ui: openstack: Server ID: cbcfc850-6cb7-4c61-a31e-e7eb5bab1765 2018/01/15 13:32:41 packer: 2018/01/15 13:32:41 server id: cbcfc850-6cb7-4c61-a31e-e7eb5bab1765 2018/01/15 13:32:41 ui: ==> openstack: Waiting for server to become ready... openstack: Server ID: cbcfc850-6cb7-4c61-a31e-e7eb5bab1765 ==> openstack: Waiting for server to become ready... 2018/01/15 13:32:41 packer: 2018/01/15 13:32:41 Waiting for state to become: [ACTIVE] 2018/01/15 13:32:41 packer: 2018/01/15 13:32:41 Waiting for state to become: [ACTIVE] currently BUILD (0%) 2018/01/15 13:32:43 packer: 2018/01/15 13:32:43 Waiting for state to become: [ACTIVE] currently BUILD (10%) <snip> 2018/01/15 13:33:15 packer: 2018/01/15 13:33:15 Waiting for state to become: [ACTIVE] currently BUILD (90%) 2018/01/15 13:33:17 packer: 2018/01/15 13:33:17 Waiting for state to become: [ACTIVE] currently BUILD (90%) 2018/01/15 13:33:20 packer: 2018/01/15 13:33:20 [INFO] Not using winrm communicator, skipping get password... ==> openstack: Waiting for server (cbcfc850-6cb7-4c61-a31e-e7eb5bab1765) to become RackConnect ready... 2018/01/15 13:33:20 ui: ==> openstack: Waiting for server (cbcfc850-6cb7-4c61-a31e-e7eb5bab1765) to become RackConnect ready... 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 [INFO] Waiting for SSH, up to timeout: 5m0s 2018/01/15 13:34:16 ui: ==> openstack: Waiting for SSH to become available... 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 [DEBUG] Detected address: 10.210.98.5 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 [DEBUG] Using IP address 10.210.98.5 from specified interface private to connect ==> openstack: Waiting for SSH to become available... 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 [INFO] Attempting SSH connection... 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 reconnecting to TCP connection for SSH 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 handshaking with SSH 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 handshake complete! 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 opening new ssh session ==> openstack: Connected to SSH! 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 [INFO] agent forwarding enabled 2018/01/15 13:34:16 ui: ==> openstack: Connected to SSH! 2018/01/15 13:34:16 packer: 2018/01/15 13:34:16 Running the provision hook ==> openstack: Stopping server: cbcfc850-6cb7-4c61-a31e-e7eb5bab1765 ... 2018/01/15 13:34:16 ui: ==> openstack: Stopping server: cbcfc850-6cb7-4c61-a31e-e7eb5bab1765 ... openstack: Waiting for server to stop: cbcfc850-6cb7-4c61-a31e-e7eb5bab1765 ... 2018/01/15 13:34:17 ui: openstack: Waiting for server to stop: cbcfc850-6cb7-4c61-a31e-e7eb5bab1765 ... 2018/01/15 13:34:17 packer: 2018/01/15 13:34:17 Waiting for state to become: [SHUTOFF STOPPED] 2018/01/15 13:34:17 packer: 2018/01/15 13:34:17 Waiting for state to become: [SHUTOFF STOPPED] currently ACTIVE (0%) 2018/01/15 13:34:21 packer: 2018/01/15 13:34:21 Waiting for state to become: [SHUTOFF STOPPED] currently ACTIVE (0%) ==> openstack: Creating the image: centos74-base 2018/01/15 13:34:24 ui: ==> openstack: Creating the image: centos74-base openstack: Image: e94db836-ef32-4480-a5ac-53cee130c001 2018/01/15 13:34:24 ui: openstack: Image: e94db836-ef32-4480-a5ac-53cee130c001 ==> openstack: Waiting for image centos74-base (image id: e94db836-ef32-4480-a5ac-53cee130c001) to become ready... 2018/01/15 13:34:24 ui: ==> openstack: Waiting for image centos74-base (image id: e94db836-ef32-4480-a5ac-53cee130c001) to become ready... 2018/01/15 13:34:25 packer: 2018/01/15 13:34:25 Waiting for image creation status: SAVING (25%) <snip> 2018/01/15 13:36:08 packer: 2018/01/15 13:36:08 Waiting for image creation status: SAVING (50%) 2018/01/15 13:36:11 ui: ==> openstack: Terminating the source server: cbcfc850-6cb7-4c61-a31e-e7eb5bab1765 ... ==> openstack: Terminating the source server: cbcfc850-6cb7-4c61-a31e-e7eb5bab1765 ... 2018/01/15 13:36:12 packer: 2018/01/15 13:36:12 Waiting for state to become: [DELETED] 2018/01/15 13:36:12 packer: 2018/01/15 13:36:12 Waiting for state to become: [DELETED] currently SHUTOFF (0%) 2018/01/15 13:36:14 packer: 2018/01/15 13:36:14 Waiting for state to become: [DELETED] currently SHUTOFF (0%) ==> openstack: Deleting temporary keypair: packer_5a5cf3c4-db97-bbdc-26ae-06bc7f9b0715 ... 2018/01/15 13:36:16 ui: ==> openstack: Deleting temporary keypair: packer_5a5cf3c4-db97-bbdc-26ae-06bc7f9b0715 ... 2018/01/15 13:36:16 packer: 2018/01/15 13:36:16 [INFO] 404 on ServerStateRefresh, returning DELETED 2018/01/15 13:36:16 [INFO] (telemetry) ending openstack 2018/01/15 13:36:16 ui: Build 'openstack' finished. 2018/01/15 13:36:16 Builds completed. Waiting on interrupt barrier... 2018/01/15 13:36:16 ui: ==> Builds finished. The artifacts of successful builds are: 2018/01/15 13:36:16 machine readable: openstack,artifact-count []string{"1"} Build 'openstack' finished. ==> Builds finished. The artifacts of successful builds are: 2018/01/15 13:36:16 machine readable: openstack,artifact []string{"0", "builder-id", "mitchellh.openstack"} 2018/01/15 13:36:16 machine readable: openstack,artifact []string{"0", "id", "e94db836-ef32-4480-a5ac-53cee130c001"} 2018/01/15 13:36:16 machine readable: openstack,artifact []string{"0", "string", "An image was created: e94db836-ef32-4480-a5ac-53cee130c001"} 2018/01/15 13:36:16 machine readable: openstack,artifact []string{"0", "files-count", "0"} 2018/01/15 13:36:16 machine readable: openstack,artifact []string{"0", "end"} 2018/01/15 13:36:16 ui: --> openstack: An image was created: e94db836-ef32-4480-a5ac-53cee130c001 2018/01/15 13:36:16 [INFO] (telemetry) Finalizing. --> openstack: An image was created: e94db836-ef32-4480-a5ac-53cee130c001 2018/01/15 13:36:17 waiting for all plugin processes to complete... 2018/01/15 13:36:17 /usr/local/bin/packer: plugin process exited ``` Hopefully this helps someone :-) -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/51d10f7a-1a1b-4987-9cc7-e2a8ac96a2e6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
