diff --git a/ansible/roles/openvswitch/tasks/config.yml b/ansible/roles/openvswitch/tasks/config.yml index 56507617fe14f2b4264f5d3ef4f8a8ffbc15da9b..6f622e652cb453e505a0f0001f1508cbd6e65274 100644 --- a/ansible/roles/openvswitch/tasks/config.yml +++ b/ansible/roles/openvswitch/tasks/config.yml @@ -25,34 +25,6 @@ notify: - "Restart {{ item.key }} container" -- name: Copying over start-ovs file for openvswitch-vswitchd - become: true - vars: - service: "{{ openvswitch_services['openvswitch-vswitchd'] }}" - template: - src: "{{ role_path }}/templates/start-ovs.j2" - dest: "{{ node_config_directory }}/openvswitch-vswitchd/start-ovs" - mode: "0770" - when: - - service.host_in_groups | bool - - service.enabled | bool - notify: - - "Restart openvswitch-vswitchd container" - -- name: Copying over start-ovsdb-server files for openvswitch-db-server - become: true - vars: - service: "{{ openvswitch_services['openvswitch-db-server'] }}" - template: - src: "{{ role_path }}/templates/start-ovsdb-server.j2" - dest: "{{ node_config_directory }}/openvswitch-db-server/start-ovsdb-server" - mode: "0770" - when: - - service.host_in_groups | bool - - service.enabled | bool - notify: - - "Restart openvswitch-db-server container" - - name: Copying over ovs-vsctl wrapper vars: service: "{{ openvswitch_services['openvswitch-vswitchd'] }}" diff --git a/ansible/roles/openvswitch/templates/openvswitch-db-server.json.j2 b/ansible/roles/openvswitch/templates/openvswitch-db-server.json.j2 index 7e113fe6b3779893421e27a5a697d361b631db67..a683979a470bc43c854ebc5926b1c15f3910dbfa 100644 --- a/ansible/roles/openvswitch/templates/openvswitch-db-server.json.j2 +++ b/ansible/roles/openvswitch/templates/openvswitch-db-server.json.j2 @@ -1,11 +1,4 @@ { - "command": "start-ovsdb-server 127.0.0.1", - "config_files": [ - { - "source": "{{ container_config_directory }}/start-ovsdb-server", - "dest": "/usr/local/bin/start-ovsdb-server", - "owner": "root", - "perm": "0655" - } - ] + "command": "ovs_wrapper ovsdb-server /var/lib/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --remote=ptcp:{{ ovsdb_port }}:127.0.0.1 --remote=db:Open_vSwitch,Open_vSwitch,manager_options --log-file=/var/log/kolla/openvswitch/ovsdb-server.log --pidfile", + "config_files": [] } diff --git a/ansible/roles/openvswitch/templates/openvswitch-vswitchd.json.j2 b/ansible/roles/openvswitch/templates/openvswitch-vswitchd.json.j2 index 0c75c355f621f143c2442d448bb2d7791f52155a..1d5f221c0df7c693239965f3a23ae8a8cf12b21c 100644 --- a/ansible/roles/openvswitch/templates/openvswitch-vswitchd.json.j2 +++ b/ansible/roles/openvswitch/templates/openvswitch-vswitchd.json.j2 @@ -1,11 +1,4 @@ { - "command": "start-ovs", - "config_files": [ - { - "source": "{{ container_config_directory }}/start-ovs", - "dest": "/usr/local/bin/start-ovs", - "owner": "root", - "perm": "0655" - } - ] + "command": "ovs_wrapper ovs-vswitchd unix:/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file=/var/log/kolla/openvswitch/ovs-vswitchd.log --pidfile", + "config_files": [] } diff --git a/ansible/roles/openvswitch/templates/start-ovs.j2 b/ansible/roles/openvswitch/templates/start-ovs.j2 deleted file mode 100644 index 4064ed4130bbca212b3d92e6adb53ab8d59ba73d..0000000000000000000000000000000000000000 --- a/ansible/roles/openvswitch/templates/start-ovs.j2 +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -/usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file=/var/log/kolla/openvswitch/ovs-vswitchd.log --pidfile diff --git a/ansible/roles/openvswitch/templates/start-ovsdb-server.j2 b/ansible/roles/openvswitch/templates/start-ovsdb-server.j2 deleted file mode 100644 index b76dc40e2b544d56e54c8edef2be50103ef2020b..0000000000000000000000000000000000000000 --- a/ansible/roles/openvswitch/templates/start-ovsdb-server.j2 +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# NOTE(mnasiadka): ensure existing ovsdb doesn't need to be upgraded - -if ([ -f /var/lib/openvswitch/conf.db ] && [ `ovsdb-tool needs-conversion /var/lib/openvswitch/conf.db` == "yes" ]); then - /usr/bin/ovsdb-tool convert /var/lib/openvswitch/conf.db -fi - -ovsdb_ip=$1 - -/usr/sbin/ovsdb-server /var/lib/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --remote=ptcp:{{ ovsdb_port }}:$ovsdb_ip --remote=db:Open_vSwitch,Open_vSwitch,manager_options --log-file=/var/log/kolla/openvswitch/ovsdb-server.log --pidfile