Repository navigation
Configure the Octavia amphora provider driver and related networking in ci-multinode on OVS #2685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stackhpc/2026.1
Are you sure you want to change the base?
Changes from all commits
c2ac4cd
79a3864
9b7ac5c
c013411
d5a9ca7
cbd13fd
b1d7a26
aa4cb3b
ce9441e
7b02b50
87f21ec
103f498
3490b03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| tempest-ci-multinode-octavia.overrides.conf |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Copy of tempest-ci-multinode.overrides.conf with the [load_balancer] and | ||
| # [network-feature-enabled] sections appended; keep the shared parts in sync. | ||
| # The filename is dictated by config.sh and cannot be made more descriptive. | ||
|
|
||
| [DEFAULT] | ||
| openstack_client_http_timeout = 300 | ||
|
|
||
| [auth] | ||
| compute_quotas = cores:-1,ram:-1 | ||
|
|
||
| [identity] | ||
| v3_endpoint_type = publicURL | ||
|
|
||
| [compute] | ||
| min_compute_nodes = 2 | ||
| min_microversion = 2.1 | ||
| max_microversion = 2.96 | ||
|
|
||
| [service-clients] | ||
| http_timeout = 600 | ||
|
|
||
| [compute-feature-enabled] | ||
| resize = true | ||
| live_migration = true | ||
| block_migration_for_live_migration = false | ||
| volume_backed_live_migration = true | ||
| console_output = true | ||
|
|
||
| [volume] | ||
| storage_protocol = ceph | ||
| build_timeout = 600 | ||
| min_microversion = 3.0 | ||
| max_microversion = 3.71 | ||
|
|
||
| [image] | ||
| build_timeout = 600 | ||
|
|
||
| [dashboard] | ||
| dashboard_url = https://192.168.39.2 | ||
|
|
||
| [load_balancer] | ||
| # The legacy 'octavia' alias is absent from octavia_provider_drivers. | ||
| provider = amphora | ||
| # This environment has no shared IPv6 subnet pool. | ||
| test_with_ipv6 = False | ||
| # Must outlast Octavia's own amp_active_retries * amp_active_wait_sec of 900s. | ||
| lb_build_timeout = 1200 | ||
| # Listener and pool waits. | ||
| build_timeout = 900 | ||
| # Member add waits. | ||
| check_timeout = 600 | ||
| # With port_security below, makes the plugin attach a security group to backends. | ||
| enable_security_groups = True | ||
|
|
||
| [network-feature-enabled] | ||
| port_security = True |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,5 +9,25 @@ | |
| ansible_python_interpreter: /usr/bin/python3 | ||
| # Work around no known_hosts entry on first boot. | ||
| ansible_ssh_common_args: -o StrictHostKeyChecking=no | ||
| pre_tasks: | ||
| # stackhpc.vxlan connects VXLAN to a master when an interface | ||
| # is of the 'bridge' type, but Network Manager cannot attach the device | ||
| # before the bridge exists. Kayobe creates the bridge later, so we will create it here | ||
| # and have Kayobe overwrite it later as needed | ||
| - name: Get existing NetworkManager connections | ||
| ansible.builtin.command: nmcli -g NAME connection show | ||
| become: true | ||
| changed_when: false | ||
| register: vxlan_nm_connections | ||
|
|
||
| - name: Ensure a bridge exists for each VXLAN interface that needs one | ||
| ansible.builtin.command: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be done with a real role like https://github.com/michaelrigart/ansible-role-interfaces? or even in the vxlan role itself maybe?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initially it was being done with https://github.com/michaelrigart/ansible-role-interfaces but it was causing an issue with reboot where it would run after the vxlan role and mark the device as an ethernet one instead of vxlan so it won't work with this But I agree, the creation could be moved inside the VXLAN role itself instead of a pre task. Would need another PR for ansible galaxy edits or something Im assuming. Could this be another PR after this one or is pre task definitely something we shouldn't be doing? |
||
| cmd: >- | ||
| nmcli connection add type bridge | ||
| con-name {{ item.bridge }} ifname {{ item.bridge }} | ||
| stp no ipv4.method disabled ipv6.method disabled | ||
| become: true | ||
| loop: "{{ vxlan_interfaces | selectattr('bridge', 'defined') | list }}" | ||
| when: item.bridge not in vxlan_nm_connections.stdout_lines | ||
| roles: | ||
| - role: stackhpc.vxlan | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| --- | ||
|
|
||
| - hosts: compute | ||
| gather_facts: true | ||
| tasks: | ||
| - name: Assert that the host architecture supports the amphora driver | ||
| assert: | ||
| that: ansible_facts.architecture == 'x86_64' | ||
| fail_msg: >- | ||
| The Octavia amphora driver is only supported on x86_64 hosts, because | ||
| the amphora image is built for x86_64. This host is | ||
| {{ ansible_facts.architecture }}. Set octavia_amphora_driver_enabled | ||
| to false to deploy with the OVN provider driver instead. | ||
| when: octavia_amphora_driver_enabled | bool | ||
|
|
||
| - name: Check whether /dev/kvm exists | ||
| stat: | ||
| path: /dev/kvm | ||
| register: kvm_device | ||
| when: octavia_amphora_driver_enabled | bool | ||
|
|
||
| - name: Assert that KVM is available | ||
| assert: | ||
| that: kvm_device.stat.exists | ||
| fail_msg: >- | ||
| /dev/kvm is not present. The ci-multinode environment uses KVM when | ||
| the Octavia amphora driver is in use, because amphorae are unusable | ||
| under emulation. Enable nested virtualisation on this host, or set | ||
| octavia_amphora_driver_enabled to false to deploy with the OVN | ||
| provider driver. | ||
| when: octavia_amphora_driver_enabled | bool |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Amphorae boot from Ceph-backed Cinder volumes here, which can be slow. | ||
| # Increase timeout from 5 minutes to 15 minutes for Nova to report them active. | ||
| [controller_worker] | ||
| amp_active_retries = 90 | ||
| amp_active_wait_sec = 10 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,9 +17,11 @@ rabbitmq_enable_tls: "yes" | |
|
|
||
| ############################################################################ | ||
| # Most development environments will use nested virtualisation, and we can't | ||
| # guarantee that nested KVM support is available. Use QEMU as a lowest common | ||
| # denominator. | ||
| nova_compute_virt_type: qemu | ||
| # guarantee that nested KVM support is available, so QEMU is the lowest common | ||
| # denominator. However, amphorae are unusable under emulation in terms of time | ||
| # during tempest testing and Octavia times out waiting for them to spin up | ||
| # we require KVM when the amphora driver is in use | ||
| nova_compute_virt_type: "{{ 'kvm' if octavia_amphora_driver_enabled | bool else 'qemu' }}" | ||
|
|
||
| # Reduce the control plane's memory footprint by limiting the number of worker | ||
| # processes to two per-service when running in a VM. | ||
|
|
@@ -35,22 +37,36 @@ cinder_backend_ceph: "yes" | |
| # Nova Ceph configuration | ||
| nova_backend_ceph: "yes" | ||
|
|
||
| # Because this is a vxlan interface, Kayobe can't generate the config for it. | ||
| # Therefore we can't use this interface as the external network | ||
| # (external_net_names). Instead, make external_net_names an empty | ||
| # list, and add the config that would be generated from it here. | ||
| neutron_bridge_name: "{{ vxlan_interfaces[0].device }}-ovs" | ||
| neutron_external_interface: "{{ vxlan_interfaces[0].device }}" | ||
|
|
||
| neutron_dns_domain: "{{ root_domain }}." | ||
|
|
||
| # OpenSearch memory tuning | ||
| opensearch_heap_size: 1g | ||
|
|
||
| # Octavia load balancer configuration | ||
| octavia_auto_configure: "no" | ||
| octavia_provider_drivers: "ovn:OVN provider" | ||
| octavia_provider_agents: "ovn" | ||
| # Octavia load balancer configuration. | ||
|
|
||
| octavia_provider_drivers: "{{ 'amphora:Amphora provider' if octavia_amphora_driver_enabled | bool else 'ovn:OVN provider' }}" | ||
| octavia_provider_agents: "{{ 'amphora_agent' if octavia_amphora_driver_enabled | bool else 'ovn' }}" | ||
|
Comment on lines
+47
to
+48
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can I ask why we don't enable both?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with this, should be both but only for OVN deployments. This is to be done in the other ticket where amphora driver will be run on SMS where it can run properly. If I do it now OVN deployments will use Amphora as the default and the only one out of all options (OVN deployment with OVN driver) will stop working on LeafCloud too. This just preserves the state as is for now because we can't really do anything until the follow up ticket is done But agreed, once the fix for amphora is there (having a nested virt environment), ideally OVS deployments should only have amphora whereas OVN will have both drivers present. that's the intended approach. |
||
|
|
||
| # Host interface the health manager binds to. octavia.conf references this | ||
| # unconditionally, so fall back to the internal network on OVN, which is what | ||
| # kolla's api_interface default resolves to. | ||
| octavia_network_interface: "{{ (octavia_net_name if octavia_amphora_driver_enabled | bool else internal_net_name) | net_interface(groups['controllers'][0]) }}" | ||
|
|
||
| # Management network registered by octavia_auto_configure, so only with amphora. | ||
| octavia_amp_network: | ||
| name: lb-mgmt-net | ||
| provider_network_type: vlan | ||
| provider_segmentation_id: "{{ lb_mgmt_vlan }}" | ||
| provider_physical_network: physnet1 | ||
| external: false | ||
| shared: false | ||
| subnet: | ||
| name: lb-mgmt-subnet | ||
| cidr: "{{ lb_mgmt_cidr }}" | ||
| allocation_pool_start: "{{ lb_mgmt_neutron_allocation_pool_start }}" | ||
| allocation_pool_end: "{{ lb_mgmt_neutron_allocation_pool_end }}" | ||
| no_gateway_ip: true | ||
| enable_dhcp: true | ||
|
|
||
| # Manila CephFS configuration | ||
| manila_cephfs_filesystem_name: manila-cephfs | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just include these changes in the existing ci-multinode overrides file?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason a separate one was created was because I did not want "[network-feature-enabled] port_security = True" to be applied to all other tests as well. It would also enable more tests when running tempest-full due to a condition I believe.
Just had a bigger potential radius of unrelated effects, although I did see why a new file with duplications would be bad for extensibility as well. Current one just seemed liked the less bad option.
Could potentially spend some time running the full suite with the other option and maybe look for obvious side effects? what do you think @Alex-Welsh ?