This issue was originally opened by @v0lumehi as hashicorp/packer#8630. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Hello guys,
I think I discovered a bug in the openstack builder.
I have following packer version:
$ packer build build.json
openstack output will be in this color.
==> openstack: Loading flavor: m.large
openstack: Verified flavor. ID: 92506745-0305-4997-a58a-0f1a6be40a08
==> openstack: Creating temporary keypair: packer_5e26cac3-61bd-d7be-f4b1-463cc436cbc4 ...
==> openstack: Created temporary keypair: packer_5e26cac3-61bd-d7be-f4b1-463cc436cbc4
==> openstack: Launching server...
==> openstack: Launching server...
==> openstack: Error launching source server: Bad request with: [POST https://my.great.cloud:8774/v2.1/2b1777b0d2ec4263a6f0a63a0f313670/servers], error message: {"badRequest": {"message": "Invalid input for field/attribute imageRef. Value: ubuntu-18.04-x86_64-latest. u'ubuntu-18.04-x86_64-latest' is not valid under any of the given schemas", "code": 400}}
==> openstack: Terminating the source server: ...
==> openstack: Error terminating server, may still be around: Resource not found
==> openstack: Deleting temporary keypair: packer_5e26cac3-61bd-d7be-f4b1-463cc436cbc4 ...
Build 'openstack' errored: Error launching source server: Bad request with: [POST https://my.great.cloud:8774/v2.1/2b1777b0d2ec4263a6f0a63a0f313670/servers], error message: {"badRequest": {"message": "Invalid input for field/attribute imageRef. Value: ubuntu-18.04-x86_64-latest. u'ubuntu-18.04-x86_64-latest' is not valid under any of the given schemas", "code": 400}}
==> Some builds didn't complete successfully and had errors:
--> openstack: Error launching source server: Bad request with: [POST https://my.great.cloud:8774/v2.1/2b1777b0d2ec4263a6f0a63a0f313670/servers], error message: {"badRequest": {"message": "Invalid input for field/attribute imageRef. Value: ubuntu-18.04-x86_64-latest. u'ubuntu-18.04-x86_64-latest' is not valid under any of the given schemas", "code": 400}}
==> Builds finished but no artifacts were created.
If I replace the source_image name with its ID, it's working properly:
$ packer build build.json
openstack output will be in this color.
==> openstack: Loading flavor: m.large
openstack: Verified flavor. ID: 92506745-0305-4997-a58a-0f1a6be40a08
==> openstack: Creating temporary keypair: packer_5e26cb83-cafb-8502-3cd6-727f291199f5 ...
==> openstack: Created temporary keypair: packer_5e26cb83-cafb-8502-3cd6-727f291199f5
==> openstack: Launching server...
==> openstack: Launching server...
openstack: Server ID: 0c516d5d-d23e-4ee4-8355-b78d28bdc6b3
==> openstack: Waiting for server to become ready...
==> openstack: Creating floating IP using network 6541b7d0-db72-4a17-9d7e-de5d5b894ead ...
openstack: Created floating IP: 'f58318df-3644-420a-af6b-fdfa3c803549' (10.0.30.38)
==> openstack: Associating floating IP 'f58318df-3644-420a-af6b-fdfa3c803549' (10.0.30.38) with instance port...
openstack: Added floating IP 'f58318df-3644-420a-af6b-fdfa3c803549' (10.0.30.38) to instance!
==> openstack: Using ssh communicator to connect: 10.0.30.38
==> openstack: Waiting for SSH to become available...
==> openstack: Connected to SSH!
==> openstack: Provisioning with shell script: ./common/scripts/ubuntu/base.sh
...
==> openstack: Deleting temporary keypair: packer_5e26cb83-cafb-8502-3cd6-727f291199f5 ...
Build 'openstack' finished.
==> Builds finished. The artifacts of successful builds are:
--> openstack: An image was created: 0983f994-6de4-4894-8fd1-4f700c2dc644
Do you got any idea what causes this? Am I overseeing something?
Best Regards
This issue was originally opened by @v0lumehi as hashicorp/packer#8630. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Hello guys,
I think I discovered a bug in the openstack builder. I have following packer version:
This is my packer config and it is working fine:
Now if I remove this block:
and run packer, packer throws this error:
If I replace the source_image name with its ID, it's working properly:
Do you got any idea what causes this? Am I overseeing something? Best Regards