From bba8c8af43e4cb18e2095e176f5f7d92adefada6 Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Thu, 17 Aug 2017 12:42:53 +0200 Subject: [PATCH] Add ovs flows to skydive Skydive does not receive information about ovs flows Fixed some other issue: - Add logic to use skydive with odl - Useless config folder. - Missing auth parm in analyzer conf. - Set internal endpoint for connection to keystone. - Remove stderr which consumes a lot of disk space in the host. Change-Id: I4f7287f7453a6c5b6b8d77d746281b175d421bed Closes-Bug: #1711336 --- ansible/roles/skydive/tasks/config.yml | 2 +- .../roles/skydive/templates/skydive-agent.conf.j2 | 13 ++++++++++--- .../skydive/templates/skydive-analyzer.conf.j2 | 4 +++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ansible/roles/skydive/tasks/config.yml b/ansible/roles/skydive/tasks/config.yml index e22ad196ee..9a992f71b6 100644 --- a/ansible/roles/skydive/tasks/config.yml +++ b/ansible/roles/skydive/tasks/config.yml @@ -1,7 +1,7 @@ --- - name: Ensuring config directories exist file: - path: "{{ node_config_directory }}/{{ item.key }}/config" + path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" recurse: yes when: diff --git a/ansible/roles/skydive/templates/skydive-agent.conf.j2 b/ansible/roles/skydive/templates/skydive-agent.conf.j2 index 309323fefd..81430bd749 100644 --- a/ansible/roles/skydive/templates/skydive-agent.conf.j2 +++ b/ansible/roles/skydive/templates/skydive-agent.conf.j2 @@ -8,7 +8,6 @@ auth: logging: level: INFO backends: - - stderr - file file: path: /var/log/kolla/skydive/skydive-agent.log @@ -20,6 +19,7 @@ openstack: tenant_name: {{ openstack_auth['project_name'] }} region_name: {{ openstack_region_name }} domain_name: Default + endpoint_type: internal etcd: servers: @@ -43,7 +43,7 @@ agent: flow: probes: - gopacket -{% if neutron_plugin_agent == "openvswitch" %} +{% if neutron_plugin_agent in ['openvswitch', 'opendaylight'] %} - ovssflow {% endif %} topology: @@ -51,7 +51,7 @@ agent: - netlink - netns - neutron -{% if neutron_plugin_agent == "openvswitch" %} +{% if neutron_plugin_agent in ['openvswitch', 'opendaylight'] %} - ovsdb {% endif %} @@ -61,3 +61,10 @@ netns: flow: expire: 600 update: 60 + +{% if neutron_plugin_agent in ['openvswitch', 'opendaylight'] %} +ovs: + ovsdb: tcp://{{ api_interface_address }}:{{ ovsdb_port }} + oflow: + enable: true +{% endif %} diff --git a/ansible/roles/skydive/templates/skydive-analyzer.conf.j2 b/ansible/roles/skydive/templates/skydive-analyzer.conf.j2 index 61830d9ed9..c6b0f91860 100644 --- a/ansible/roles/skydive/templates/skydive-analyzer.conf.j2 +++ b/ansible/roles/skydive/templates/skydive-analyzer.conf.j2 @@ -2,11 +2,12 @@ auth: type: keystone + analyzer_username: {{ openstack_auth['username'] }} + analyzer_password: {{ openstack_auth['password'] }} logging: level: INFO backends: - - stderr - file file: path: /var/log/kolla/skydive/skydive-analyzer.log @@ -16,6 +17,7 @@ openstack: tenant_name: {{ openstack_auth['project_name'] }} region_name: {{ openstack_region_name }} domain_name: Default + endpoint_type: internal etcd: client_timeout: 100