Devstack is the most commonly used project for OpenStack development. Wouldn’t it be cool to have a supporting software which analyzes the network infrastructure and helps us troubleshoot and monitor the SDN solution that Devstack is deploying?
Skydive is an open source project aimed to help troubleshooting SDN systems by analyzing the data that it collects from the network infrastructure. It is written to be SDN agnostic.
This post explains in detail about how we can plug Skydive into Devstack.
Skydive needs two of its components to be running for it to work.
These services are run by the Skydive’s plugin to Devstack. You should add the following to your local.conf to initialize and configure the Skydive plugin.
enable_plugin skydive https://github.com/skydive-project/skydive.git
1. Skydive agents
These are data collecting agent. Agent will typically run alongside other network agents on a compute node.
To enable Skydive agent in Devstack, the following lines should be added to the local.conf.
2. Skydive analyzers
This is the information submission and retrieval component. It can also leverage information from SDN controllers. This component would be run typically in controller nodes.
To enable skydive analyzer in devstack, following should be added to the local.conf.
Plugin configuration parameters
In addition to the above inclusion, following parameters can be added in your Devstack’s local.conf.
Address on which skydive analyzer process listens for connections. Must be in ip:port format.
Inform the agent about the address on which analyzers are listening. Must be in ip:port format.
ip:port address on which skydive agent listens for connections.
Configure the skydive agent with the etcd server address. Skydive analyzer embeds its own etcd. Hence the IP address in this url should be that of the analyzer.
The path for the generated skydive configuration file.
List of agent probes to be used by the agent.
netlink netns ovsdb neutron
Remote tcp port for ovsdb server.
Set the default log level for Skydive components.
Sample two node deployment
Inside the Devstack folder of the Skydive sources there are two local.conf files.
These files can be used to deploy two Devstacks with Skydive. The first file will install devstack with both Skydive analyzer and agent. The second file will install devstack with only the Skydive agent.
With the above conf files, Skydive will be set with the probes for OpenvSwitch and Neutron. It will be set to use Keystone as authentication mechanism, so the credentials will be the same as that of the admin.
Once you have your Devstacks deployed, the WebUI on the Analyzer should show something similar to the following capture.
Now we have our two nodes up and running we may want to start capturing packets. The following command can be used in order to start a capture on all the br-int bridges.
Before starting to capture, Skydive needs the credentials exported. Since the configuration is such that Skydive uses keystone for authentication, you can export the following.
To start a capture:
$ skydive client -c /tmp/skydive.yaml capture create \
$ skydive client -c /tmp/skydive.yaml capture list
You can verify your capture by querying the elasticsearch after a datapath action.
curl -s http://$SERVICE_HOST:9200/_search | jq .hits.hits
With the kind of data that skydive collects and presents, it can come in handy when debugging SDN problems while developing. Thanks to Devstack’s plugin infrastructure, adding Skydive to devstack is really easy.