radvd: pass -m syslog to avoid thread lock for radvd 2.0+

Since radvd 2.0, the daemon does not use daemon_fork() function from
libdaemon, but instead calls Linux daemon() function directly. It also
passes (1, 1) arguments when logging method (-m) is either stderr (the
default) or stderr_syslog. The second argument's value = 1 means that
stderr is not closed and left there for (some) log messages.

For neutron, it means that corresponding execute() call that spawns
radvd and expects the invoked process to close stderr does not ever get
completed. The current thread that spawned radvd is locked waiting for
radvd to exit, which does not ever occur unless the process crashes or
receives a signal.

Since L3 agent gives exclusive access to updates queue for each router
to one of processing threads only, it means that the thread that got to
serve a radvd-powered subnet will not proceed and not update any new
ports or other changes to the router anymore.

Passing -m syslog makes radvd 2.0+ close stderr and return to execute()
caller, proceeding with router update processing. The same arguments
should work for old (pre 2.0) versions of radvd too, so passing them
unconditionally.

We could instead use -m logfile and pass appropriate -l <logfile>
argument to radvd to make it log to a log file located in router's
namespace storage path. Though that would be not in line with what
dnsmasq processes currently do for dhcp agent, where we log all messages
to syslog, so sticking to syslog for radvd for consistency.

Change-Id: I131db0639bc46d332ed48faa2bbe68a214264062
Closes-Bug: #1398779
Reduce code duplication in test_linux_dhcp

This patch reduces duplication in test_output_opts_file_*()

Change-Id: Ie68b26a48c1d0ed9cb8e584a7284c06688937cf9
Closes-Bug: #1352870
Fix IPv6 RA security group rule for DVR

Current IPv6 RA security group rule doesn't work for
DVR because the code only allows RA from device_owner
is network:router_interface. When DVR is enabled, the
router interface is network:router_interface_distributed.

This fix fixes the RA rule to allow RA from DVR router
interface, so router advertisement from DVR RADVD can
pass to VM.

Co-Authored-By: Baodong (Robert) Li <baoli@cisco.com>

Change-Id: Idd1324c653dcb15f5dacf2d897a7048bca22fc38
Partial-Bug: 1376325
Refactor process_router method in L3 agent

Refactors the process_router method of the L3NATAgent class to several methods
that coherently group functionallity. The aim is to make the code more readable
and maintainable. There is no functional change in this patch.

Partially-Implements: bp restructure-l3-agent

Change-Id: Id35a5f10cd7d2dda565bffb14fc6a2fbd7eef3ea
Fix race condition in ProcessMonitor

If any new external process was enabled/disabled during
the process monitoring loop time, a RuntimeError: dictionary
changed size during iteration was thrown. This is fixed
by pre-building the service list from the dictionary
for the iteration.

Closes-Bug: #1401042

Change-Id: Id0a3af22fb85992bde35d8c691bee3ddf435639d
Not nova but neutron

The docstring for topic is not correct.

Change-Id: I6174453eb1c41c398ecffbab59c45b0678637672
Catch duplicate errors scheduling SNAT service

Catch DBDuplicateEntry errors when scheduling SNAT to
a service node to prevent harmless tracebacks in the log.
These can occur if scheduling occurs concurrently,
so they are safe to ignore.

Closes-Bug: #1381958
Change-Id: If242b04b372609f640f3ce88f4245c17a45bf69d
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I18f00383ecae68436a9208f094a898849bfed8a2
Separate wait_until to standalone function

It makes wait_until more usable outside of unittest.TestCase classes.
Part of this patch is renaming pinger module to helpers thus we can have
helpers module with useful utilities for testing.

Change-Id: Ie8e4854c23aa3739b0df618db1b3944466d64bd2
Related-Bug: 1243216
Merge "Catch duplicate errors scheduling SNAT service"
Generate testr_results.html for neutron functional job

Tweak job post_test_hook script to generate testr results
the same way other jobs do, with a pretty html view that
is easy to digest and navigate.

Closes-bug: #1401340

Change-Id: Ib355f34917580b88bda3d550e33fc630a8e7120b
Merge "Fix IPv6 RA security group rule for DVR"
Merge "Generate testr_results.html for neutron functional job"
Merge "Refactor process_router method in L3 agent"
Merge "Reduce code duplication in test_linux_dhcp"
Merge "Imported Translations from Transifex"
Merge "Separate wait_until to standalone function"
Merge "Not nova but neutron"
Merge "Fix race condition in ProcessMonitor"
Merge "radvd: pass -m syslog to avoid thread lock for radvd 2.0+"