Specify Octavia amphora image hw_architecture property in Glance

In the case of a multi-architecture cloud, Nova will try to schedule an
Amphora to a non-x86_64 architecture compute node, which will fail the
load balancer creation in Octavia.

This patch explicitly specifies the Amphora image hw_architecture
property when the image is being uploaded to Glance. By doing so, it
hints the Nova scheduler which compute nodes to take into
account when it schedules an Amphora instance.

The default for hw_architecture is x86_64, which resembles the current
behavior since this is the only image type that we ship.

Closes-Bug: #1818563

Change-Id: Ia7be6503a40e08d0d1f7f4d89132c9e9b5bd6704
(cherry picked from commit 2f1c0b89ee)
(cherry picked from commit ef5bf9deb8)
This commit is contained in:
Nir Magnezi 2019-02-28 11:57:00 +02:00
parent abafea837c
commit 17a050f13e
3 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@ amp_image_tag: "amphora-image"
amp_ssh_key_name: "octavia-ssh-key"
amp_ssh_key_path: ""
amp_to_raw: False
amp_hw_arch: "x86_64"
auth_username: "octavia"
auth_project_name: "service"
lb_mgmt_net_name: "lb-mgmt-net"

View File

@ -72,6 +72,7 @@
openstack image create --disk-format {{ raw_format|default('qcow2') }} \
--container-format bare --tag {{ amp_image_tag }} \
--file {{ raw_filename|default(image_filename) }} \
--property hw_architecture={{ amp_hw_arch }} \
{{ amphora_image }}
register: image_result
changed_when: "image_result.stdout != ''"

View File

@ -15,6 +15,7 @@ workflows:
- amp_ssh_key_path
- amp_ssh_key_data
- amp_to_raw
- amp_hw_arch
- auth_username
- auth_password
- auth_project_name
@ -105,6 +106,7 @@ workflows:
amp_ssh_key_path: <% $.amp_ssh_key_path %>
amp_ssh_key_data: <% $.amp_ssh_key_data %>
amp_to_raw: <% $.amp_to_raw %>
amp_hw_arch: <% $.amp_hw_arch %>
auth_username: <% $.auth_username %>
auth_password: <% $.auth_password %>
auth_project_name: <% $.auth_project_name %>