rflib: Remove legacy dp_config code

Signed-off-by: Joe Stringer <joe@wand.net.nz>
build: Create cgroups properly on Debian

Signed-off-by: Joe Stringer <joe@wand.net.nz>
rftest: Consolidate shutdown logic

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Create rfvm1.0 port if it doesn't exist

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Strip trailing whitespace

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Add argument to specify controller

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Configure OF versions based on controller

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Make MongoDB quiet when resetting DB

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Redirect rfclient stderr to logfile

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Start RFVM1 after control plane network

This works around a race condition where RFClient attempts to send a
VS-DP mapping packet before its interface is connected to a local VS
instance.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Don't keep track of configured RFVS instances

We have previously been keeping track of RFVS instances that have been
configured, but this was not used anywhere. Furthermore, when RFVS
instances disconnected from RouteFlow, they would still be considered
"configured" even if they have since lost all of their state.

This patch removes the RFServer.configured_rfvs[] list. This makes
RouteFlow more resilient to temporary RFVS outages, and simplifies the
code.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Change default MongoDB network to 192.168.10.0/24

We have previously been using an IP address that is allocated to RGnet
as the default address for communication between RFClient and MongoDB.
This patch modifies the default to valid RFC1918 addresses,
192.168.10.{1,100}.

To anyone upgrading from a previous version of RouteFlow, you will need
to replace all instances of "169.1" with "168.10" in the network
configuration of your containers. The default location for these is
under /var/lib/lxc/rfvm*/rootfs/etc/network/interfaces .

Signed-off-by: Joe Stringer <joe@wand.net.nz>
rftest2: Consolidate VM creation and setup logic

Signed-off-by: Joe Stringer <joe@wand.net.nz>
rftable: Fix pep8 style issues

Signed-off-by: Joe Stringer <joe@wand.net.nz>
rfserver: Fix pep8 style issues

Signed-off-by: Joe Stringer <joe@wand.net.nz>
rfserver: Add default config paths

Signed-off-by: Joe Stringer <joe@wand.net.nz>
rfserver: Don't catch exceptions in main()

We have previously been catching exceptions in the main() function of
RFServer, and describing all failures as a failure to open the config
file. In the best case, this behaviour simply hides information that may
be useful for debugging. In the worst case, it misleads the user as to
where the problem is. This patch removes the code to catch these
exceptions, allowing the default handler to print the correct message.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
rfclient: Don't keep track of down_ports

The list of 'down_ports' is unused, inefficient, and it's not
thread-safe. Remove it in favour of checking Interface.active.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
rfclient: Remove unused member init_ports

Signed-off-by: Joe Stringer <joe@wand.net.nz>
rfclient: Rework load_interfaces()

load_interfaces() used to do a combination of loading and also changing
the state of RFClient. Now it's just a function that fetches all of the
system interfaces, and returns a vector containing them.

Signed-off-by: Joe Stringer <joe@wand.net.nz>