hashicorp / hashicorp/packer-plugin-openstack

Openstack builder doesn't support Openstack API Microversion

Offen
#8 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug builder/openstack
Vorherrschende Sprache
Go
Sterne
29
Forks
26
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

_This issue was originally opened by @ArKam as hashicorp/packer#10906. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._


#### Overview of the Issue

When trying to launch a new image build using block storage volume feature, the build fail.

It come from the fact that the instance created will be attached on a volume type (the default one) that use multi-attach feature, packer fail to launch the VM as there is no way to specify the nova API microversion (min 2.60).

Even using environment variables such as OS_COMPUTE_API_VERSION=2.79 or a local clouds.yaml file doesn't work.

The targeted Openstack platform DO SUPPORT nova api microversion 2.79.
The targeted Openstack platform DO WORK as intended as we have a bunch of ansible playbooks that use it and that need to get this microversion specified within either an environment variable or within the system-wide or local clouds.yaml file.

#### Reproduction Steps

Create a packer template using Openstack builder and the `use_blockstorage_volume` directive.
Have your default `__DEFAULT__` openstack volume type to use multi-attach feature.
launch the build.
The build fail with the following message:

`==> openstack: Error launching source server: Bad request with: [POST https://sub.domain.tld:8774/v2.1/servers], error message: {"badRequest": {"message": "Multiattach volumes are only supported starting with compute API version 2.60.", "code": 400}}`

### Packer version

Packer v1.5.6

### Simplified Packer Buildfile

https://gist.github.com/ArKam/275ecfb0cfbb43cbdf447bcd9a6696f0

### Operating system and Environment details

OS: CentOS Linux release 7.9.2009 (Core).

### Log Fragments and crash.log files

https://gist.github.com/ArKam/71d075c6faa08415cf39c85970d2e5ad

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Untersuchung des OpenStack-Builder-Pfads, der zusammen mit `use_blockstorage_volume` verwendet wird, und wie sein Nova-Client Einstellungen von `OS_COMPUTE_API_VERSION` oder `clouds.yaml` erhält. Reproduziere den Build mit einem standardmäßigen Multi-Attach-Volume und überprüfe, dass die Server-Anfrage eine unterstützte Compute-API-Microversion verwendet, um den gemeldeten 400-Fehler zu vermeiden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
go
Bereich
api, cloud
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.