octavia: Fix hm-interface after bumping openstack collection

New openstack collection modules have changed output
dicts/variable names - adapting to that.

Also changing octavia amphora image to focal, since bionic
hasn't been rebuilt since May 2021.

Closes-Bug: #2012255
Change-Id: Icf38a52472d02ef7d69bcd3716afb16e859d44a2
This commit is contained in:
Michal Nasiadka 2023-03-22 12:25:05 +01:00
parent 94a74f58c7
commit c0d0866785
4 changed files with 7 additions and 7 deletions

View File

@ -71,5 +71,5 @@
- name: Set octavia resources facts
set_fact:
network_info: "{{ network_results.openstack_networks.0 }}"
amphora_flavor_info: "{{ flavor_results.openstack_flavors.0 }}"
network_info: "{{ network_results.networks | first }}"
amphora_flavor_info: "{{ flavor_results.flavors | first }}"

View File

@ -22,7 +22,7 @@
- name: Update Octavia health manager port host_id
become: True
vars:
port_id: "{{ port_info.id }}"
port_id: "{{ port_info.port.id }}"
command: >
{{ kolla_container_engine }} exec kolla_toolbox openstack
--os-interface {{ openstack_interface }}
@ -41,7 +41,7 @@
- name: Add Octavia port to openvswitch br-int
vars:
port_mac: "{{ port_info.port.mac_address }}"
port_id: "{{ port_info.id }}"
port_id: "{{ port_info.port.id }}"
become: True
command: >
{{ kolla_container_engine }} exec openvswitch_vswitchd ovs-vsctl --may-exist \

View File

@ -101,9 +101,9 @@ amp_secgroup_list = {{ octavia_amp_secgroup_list }}
amp_flavor_id = {{ octavia_amp_flavor_id }}
{% endif %}
{% else %}
amp_image_owner_id = {{ project_info.openstack_projects.0.id }}
amp_image_owner_id = {{ project_info.projects.0.id }}
amp_boot_network_list = {{ network_info.id }}
amp_secgroup_list = {{ (sec_grp_info.results | selectattr('item.name', 'equalto', octavia_amp_security_groups['mgmt-sec-grp'].name) | list).0.secgroup.id }}
amp_secgroup_list = {{ (sec_grp_info.results | selectattr('item.name', 'equalto', octavia_amp_security_groups['mgmt-sec-grp'].name) | list).0.security_group.id }}
amp_flavor_id = {{ amphora_flavor_info.id }}
{% endif %}

View File

@ -10,7 +10,7 @@ export PYTHONUNBUFFERED=1
function register_amphora_image {
amphora_url=https://tarballs.opendev.org/openstack/octavia/test-images/test-only-amphora-x64-haproxy-ubuntu-bionic.qcow2
amphora_url=https://tarballs.opendev.org/openstack/octavia/test-images/test-only-amphora-x64-haproxy-ubuntu-focal.qcow2
curl -o amphora.qcow2 $amphora_url
(. /etc/kolla/octavia-openrc.sh && openstack image create amphora-x64-haproxy --file amphora.qcow2 --tag amphora --disk-format qcow2 --property hw_architecture='x86_64' --property hw_rng_model=virtio)
}