Skip to content

Commit

Permalink
ovn: don't explicitly set vlan-limit=0
Browse files Browse the repository at this point in the history
ovn-controller does it automatically since 21.09.0 [1].

This patch also gracefully handles a case where external_ids passed as
variable are empty, if it ever happens.

ovn-org/ovn@7e2c892
  • Loading branch information
booxter committed Oct 27, 2023
1 parent feffa78 commit 3098cfe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions roles/edpm_ovn/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,4 @@ edpm_ovn_ovs_external_ids:
rundir: "/var/run/openvswitch"

# Set openvswitch other_config.
edpm_ovn_ovs_other_config:
vlan-limit: 0
edpm_ovn_ovs_other_config: {}
3 changes: 1 addition & 2 deletions roles/edpm_ovn/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ argument_specs:
description: Sets external_id data from provided variables using Jinja templating
type: dict
edpm_ovn_ovs_other_config:
default:
vlan-limit: 0
default: {}
description: Openvswitch other_config
type: dict
edpm_ovn_protocol:
Expand Down
2 changes: 2 additions & 0 deletions roles/edpm_ovn/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@
register: ovs_external_ids
changed_when: ovs_external_ids.rc == 0
failed_when: ovs_external_ids.rc != 0
when: edpm_ovn_ovs_external_ids | length > 0

- name: Configure OVS other_config
ansible.builtin.shell: >
ovs-vsctl set open . {% for key, value in edpm_ovn_ovs_other_config.items() %} other_config:{{ key }}={{ value }} {% endfor %}
register: ovs_other_config
changed_when: ovs_other_config.rc == 0
failed_when: ovs_other_config.rc != 0
when: edpm_ovn_ovs_other_config | length > 0

- name: Add OVS Manager
block:
Expand Down

0 comments on commit 3098cfe

Please sign in to comment.