From 10258f138b283a3c3dc3c873a3aa8149308f1ee7 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Fri, 1 Jul 2016 12:09:11 +0800 Subject: [PATCH] Fix the native ovsdb_interace failed Closes-Bug: #1598977 Change-Id: I8be53531c2ba000c3b73d0f957dcc50fe947c925 --- ansible/roles/neutron/templates/ml2_conf.ini.j2 | 1 + ansible/roles/neutron/templates/neutron-dhcp-agent.json.j2 | 2 +- ansible/roles/neutron/templates/openvswitch-db-server.json.j2 | 2 +- docker/neutron/neutron-base/Dockerfile.j2 | 4 ++++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ansible/roles/neutron/templates/ml2_conf.ini.j2 b/ansible/roles/neutron/templates/ml2_conf.ini.j2 index 3cb4f157fd..49bd4cbab7 100644 --- a/ansible/roles/neutron/templates/ml2_conf.ini.j2 +++ b/ansible/roles/neutron/templates/ml2_conf.ini.j2 @@ -52,6 +52,7 @@ arp_responder = true [ovs] bridge_mappings = physnet1:{{ neutron_bridge_name }} +ovsdb_connection = tcp:{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:6640 {% if enable_nova_fake | bool %} integration_bridge = br-int-{{ item }} {% endif %} diff --git a/ansible/roles/neutron/templates/neutron-dhcp-agent.json.j2 b/ansible/roles/neutron/templates/neutron-dhcp-agent.json.j2 index bd98c532dc..bdd30c42e0 100644 --- a/ansible/roles/neutron/templates/neutron-dhcp-agent.json.j2 +++ b/ansible/roles/neutron/templates/neutron-dhcp-agent.json.j2 @@ -1,5 +1,5 @@ { - "command": "neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini", + "command": "neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/dhcp_agent.ini", "config_files": [ { "source": "{{ container_config_directory }}/neutron.conf", diff --git a/ansible/roles/neutron/templates/openvswitch-db-server.json.j2 b/ansible/roles/neutron/templates/openvswitch-db-server.json.j2 index 937d056da4..2f925990c1 100644 --- a/ansible/roles/neutron/templates/openvswitch-db-server.json.j2 +++ b/ansible/roles/neutron/templates/openvswitch-db-server.json.j2 @@ -1,4 +1,4 @@ { - "command": "/usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --log-file=/var/log/kolla/openvswitch/ovsdb-server.log", + "command": "/usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --remote=ptcp:6640:{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} --log-file=/var/log/kolla/openvswitch/ovsdb-server.log", "config_files": [] } diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 index 6718a39eda..6aa895bf77 100644 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ b/docker/neutron/neutron-base/Dockerfile.j2 @@ -9,6 +9,7 @@ RUN yum -y install \ openstack-neutron-ml2 \ openvswitch \ openstack-neutron-lbaas \ + python-openvswitch \ && yum clean all {% elif base_distro in ['ubuntu'] %} @@ -17,6 +18,7 @@ RUN apt-get -y install --no-install-recommends \ neutron-plugin-ml2 \ neutron-server \ openvswitch-switch \ + python-openvswitch \ neutron-lbaas-agent \ && apt-get clean \ && mkdir -p /usr/share/neutron \ @@ -32,6 +34,7 @@ RUN yum -y install \ dnsmasq-utils \ ipset \ openvswitch \ + python-openvswitch \ uuid \ && yum clean all @@ -45,6 +48,7 @@ RUN apt-get -y install --no-install-recommends \ ipset \ iptables \ openvswitch-switch \ + python-openvswitch \ uuid-runtime \ && apt-get clean