neutron_ovn_availability_zones does not correctly create the OVN zones

Bug #2055447 reported by Martin Ananda Boeker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kayobe
New
Undecided
Unassigned
kolla-ansible
New
Undecided
Unassigned

Bug Description

ENV 2023.1

I have OVN configured, and it works like it should. However, when I set this in kolla/globals

neutron_ovn_availability_zones:
- zone-r1
- zone-r2
- zone-r3

I can see during `kayobe overcloud service deploy -vvv` this block:

ok: [OMC3-RG4-01-CPL-01] => (item={'name': 'ovn-cms-options', 'value': 'enable-chassis-as-gw,availability-zones=zone-r1,zone-r2,zone-r3', 'state': 'present'}) => changed=false
  action: openvswitch_db
  ansible_loop_var: item
  commands: []
  item:
    name: ovn-cms-options
    state: present
    value: enable-chassis-as-gw,availability-zones=zone-r1,zone-r2,zone-r3

However when I then look at `openstack availability zone list --network` it only shows me this:

+-----------+-------------+
| Zone Name | Zone Status |
+-----------+-------------+
| zone-r1 | available |
+-----------+-------------+

If I then manually run the same in the controller's ovn-controller container like this:

ssh OMC3-RG4-01-CPL-01 'docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch . external-ids:ovn-cms-options="enable-chassis-as-gw,availability-zones=zone-r1:zone-r2:zone-r3"'

And then do `openstack availability zone list --network` I get the correct list:

+-----------+-------------+
| Zone Name | Zone Status |
+-----------+-------------+
| zone-r1 | available |
| zone-r2 | available |
| zone-r3 | available |
+-----------+-------------+

Unfortunately, none of these actually make any Zones appear in the "Create Network" dialog in the GUI.

Revision history for this message
Martin Ananda Boeker (mboeker) wrote :

Oh now that I've created the bug report I'm pretty sure it's because in my manual command the separator is ':' but in `service deploy` it's separated by ','

Revision history for this message
Martin Ananda Boeker (mboeker) wrote :

I can probably get around the issue by just setting neutron_ovn_availability_zones: "zone-r1:zone-r2:zone-r3" since it'll just be considered a list of one, I'm testing that right now.

Should be a very simple fix.

As for why the zones don't appear in the list, that is probably a question for a different place..?

Revision history for this message
Martin Ananda Boeker (mboeker) wrote :

Alrighty well putting "zone-r1:zone-r2:zone-r3" totally didn't work, that got converted to this:

availability-zones=z,o,n,e,-,r,1,:,z,o,n,e,-,r,2,:,z,o,n,e,-,r,3

So I think for now I'll stick with running the command manually.

The nicer fix is changing venvs/kolla-ansible/share/kolla-ansible/ansible/roles/ovn-controller/tasks/setup-ovs.yml

Setting "neutron_ovn_availability_zones | join(',')" to "neutron_ovn_availability_zones | join(':')"

But for my setup I absolutely avoid modifying anything in venvs/*

Revision history for this message
Martin Ananda Boeker (mboeker) wrote :

The variable should work with ["zone-r1:zone-r2:zone-r3"] -- in test last night I had just used a string instead of a list of 1.

Revision history for this message
Martin Ananda Boeker (mboeker) wrote (last edit ):

Separately, it would be really nice if "default_availability_zones" could be defined as well. Maybe the variable does work when I use "neutron_default_availability_zones" or something like that, but I've found no reference to it. This parameter goes into neutron.conf, and I suggest by default it matches the neutron_ovn_availability_zones (comma separated instead of colon separated)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.