Add support of OVN for CentOS-8-Stream

This patch will adjust some variable for C8-Stream job to fix
OVN deployment for CentOS-8-Stream. Renamed ovn-central with
ovn-northd for more generic name.

Change-Id: Ifdb773f9f539469e21d37075f6b88259eb1ffa3e
This commit is contained in:
Satish Patel 2021-08-09 20:09:26 +00:00 committed by Dmitriy Rabotyagov
parent 0400310c68
commit 97d409a911
5 changed files with 22 additions and 17 deletions

View File

@ -129,13 +129,13 @@
- "Restart neutron services" - "Restart neutron services"
- "venv changed" - "venv changed"
- name: start ovn-central service - name: start ovn service
service: service:
name: ovn-central name: "{{ neutron_ovn_northd_service_name }}"
state: started state: started
# (NOTE) Restarting twice to cleanup some pid. # (NOTE) Restarting twice to cleanup some pid.
- name: restart ovn-central service - name: restart ovn service
service: service:
name: ovn-central name: "{{ neutron_ovn_northd_service_name }}"
state: restarted state: restarted

View File

@ -31,11 +31,8 @@
block: block:
- name: Stop ovn services - name: Stop ovn services
service: service:
name: "{{ item }}" name: "{{ neutron_ovn_northd_service_name }}"
state: stopped state: stopped
with_items:
- ovn-northd
- ovn-central
- name: Clean up ovn db directory - name: Clean up ovn db directory
file: file:
@ -64,23 +61,23 @@
# This play only run first time to build cluster using primary node. # This play only run first time to build cluster using primary node.
- name: Setup ovn cluster using primary node. - name: Setup ovn cluster using primary node.
template: template:
src: ovn-central.j2 src: ovn-northd-opts.j2
dest: "/etc/default/ovn-central" dest: "{{ neutron_ovn_northd_opts_file }}"
when: when:
- "inventory_hostname == neutron_ovn_primary_cluster_node" - "inventory_hostname == neutron_ovn_primary_cluster_node"
- _check_cluster_db.rc != 0 - _check_cluster_db.rc != 0
- not leader_node - not leader_node
notify: notify:
- start ovn-central service - start ovn service
- restart ovn-central service - restart ovn service
# This play will add nodes in existing cluster using leader_node var. # This play will add nodes in existing cluster using leader_node var.
- name: Join new nodes to ovn cluster using leader node - name: Join new nodes to ovn cluster using leader node
template: template:
src: ovn-central.j2 src: ovn-northd-opts.j2
dest: "/etc/default/ovn-central" dest: "{{ neutron_ovn_northd_opts_file }}"
when: when:
- _check_cluster_db.rc != 0 - _check_cluster_db.rc != 0
notify: notify:
- start ovn-central service - start ovn service
- restart ovn-central service - restart ovn service

View File

@ -1,7 +1,7 @@
# {{ ansible_managed }} # {{ ansible_managed }}
# OVN cluster parameters # OVN cluster parameters
OVN_CTL_OPTS=" \ {{ neutron_ovn_northd_opts }}=" \
--db-nb-create-insecure-remote=yes \ --db-nb-create-insecure-remote=yes \
--db-sb-create-insecure-remote=yes \ --db-sb-create-insecure-remote=yes \
--db-nb-addr={{ ansible_host }} \ --db-nb-addr={{ ansible_host }} \

View File

@ -25,6 +25,10 @@ neutron_ovn_controller_service_name: ovn-host
neutron_ovs_socket_path: "/var/run/openvswitch" neutron_ovs_socket_path: "/var/run/openvswitch"
neutron_ovn_northd_opts: "OVN_CTL_OPTS"
neutron_ovn_northd_opts_file: "/etc/default/ovn-central"
neutron_ovs_dpdk_required_packages: neutron_ovs_dpdk_required_packages:
- openvswitch-common - openvswitch-common
- openvswitch-switch-dpdk - openvswitch-switch-dpdk

View File

@ -32,6 +32,10 @@ neutron_ovn_controller_service_name: ovn-controller
neutron_ovs_socket_path: "/var/run/openvswitch" neutron_ovs_socket_path: "/var/run/openvswitch"
neutron_ovn_northd_opts: "OVN_NORTHD_OPTS"
neutron_ovn_northd_opts_file: "/etc/sysconfig/ovn-northd"
neutron_distro_packages: neutron_distro_packages:
- conntrack-tools - conntrack-tools
- dnsmasq - dnsmasq