NB SB fuck up

This commit is contained in:
Cory Hawkless 2020-11-23 14:46:52 +10:30
parent e87205b01f
commit dede47c8dd
2 changed files with 8 additions and 8 deletions

View File

@ -105,13 +105,13 @@
- "/tmp/ovn_20.09.0-1_amd64.deb"
when: force_new_ovn_download == True
- set_fact: ovn_nb_group_name_rendered="{{hostvars[ansible_hostname].ovn_nb_db_group}}"
tags: service
- name: Generate OVN NB Connection fact
set_fact: OVN_NB_Connection="{% for host in groups[ovn_nb_group_name_rendered] %}tcp:{{ hostvars[host].host_loopback_IP }}:6641{% if not loop.last %},{% endif %}{% endfor %}"
- set_fact: ovn_sb_group_name_rendered="{{hostvars[ansible_hostname].ovn_sb_db_group}}"
tags: service
- name: Generate OVN SB Connection fact
set_fact: OVN_SB_Connection="{% for host in groups[ovn_sb_group_name_rendered] %}tcp:{{ hostvars[host].host_loopback_IP }}:6642{% if not loop.last %},{% endif %}{% endfor %}"
tags: service
#Install the custom service to start OVS and OVN as required
- name: "Copy /usr/sbin/ovsovn-service-manager.sh file"
template:

View File

@ -9,8 +9,8 @@ echo "ZZZ $1"
START(){
hostname=$(hostname)
loopbackIP={{host_loopback_IP}}
echo "Starting OpenVSwitch and OVN on $hostname with $loopbackIP and pointing to OVN controller {{OVN_NB_Connection}}"
echo "Starting OpenVSwitch and OVN on $hostname with $loopbackIP and pointing to OVN controller {{OVN_SB_Connection}}"
DIR="/var/run/openvswitch/db.sock"
if [ -d "$DIR" ]; then
@ -23,7 +23,7 @@ START(){
ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6640
ovs-vsctl set open . external-ids:ovn-bridge=br-int
ovs-vsctl set open . external-ids:ovn-remote={{OVN_NB_Connection}}
ovs-vsctl set open . external-ids:ovn-remote={{OVN_SB_Connection}}
ovs-vsctl set open . external-ids:ovn-encap-type=geneve
ovs-vsctl set open . external-ids:ovn-encap-ip=$loopbackIP
/usr/share/ovn/scripts/ovn-ctl start_controller