Previously, sudo-requiring functional tests hardcoded the use of
'sudo' as the root helper. Devstack gate jobs do not allow
password-less invocation of 'sudo', though, so such tests were unable
to run in the gate. This patch adds the ability to configure the
rootwrap command installed by devstack by setting the OS_ROOTWRAP_CMD
environment variable in the test execution environment, allowing
sudo-requiring tests to run.
Change-Id: I3b8f6b4f14ac1743e08b9401f73951885165350a
Partial-bug: #1336172
The ovsdb tests check the output of "ovsdb-client monitor" before and after
some operations. The first line of output is a header row with spaces for
column separation. The column widths can vary depending on the data in the
columns, so compress multiple spaces to one for testing.
Change-Id: I6b4690ea9ef1c1b215411ca2c39b1e65fec2c6c7
Partial-bug: #1336172
DEVICE_NAME_MAX_LEN constant in neutron.common.constants replaces
and correct multiple constants defining linux interface maximum
length.
Closes-Bug: #1332571
Change-Id: I63f760a21e17dcd57b3685b1e71c913d2722e097
The current method of checking openvswitch and kernel versions for
specific feature support is brittle, distro-specific and unsupportable.
This patch removes the runtime version checks and implements a test
script which allows testing specific neutron features or can test
that all features required by a specific configuration are available.
For example, to test VXLAN support in openvswitch, either:
neutron-sanity-check --ovs_vxlan
or pass in the deployed configuration files with AGENT/tunnel_types
containing 'vxlan', like:
neutron-sanity-check --config-file /etc/neutron/plugins/ml2.conf.ini
Deployment tools can then test that the required features exist without
relying on version numbers and without incurring a penalty every time
the agent is started.
Implements: blueprint remove-openvswitch-version-check
DocImpact
Change-Id: I5e822d97b9bece9242ba5ac8901aa0ca4f090cfe
H302 violation is reported by flake8 when importing separated objects from
modules instead of importing the whole module.
e.g. from package.module import function
function()
is changed to
from package import module
module.function()
Change-Id: Ic6975f39c755ded54149a9c01fcdcfaf78c596fc
Partial-Bug: #1291032
This commit adds a functional test to verify host VXLAN support. It compares
the results of this functional test with the logic in ovs_lib to ensure both
report the same values.
Closes-Bug: #1301101
Change-Id: Id91c755d762bea134cc451952d0f13d64576663a
Refactor the functional tests a bit to add a common base class for agent
tests. This is needed an upcoming commit which adds a functional test
for VXLAN version checking.
Closes-Bug: #1301363
Change-Id: I438e401cbfb40e5557e5125f2a409bac5c1fd1c2
in python3.x, there is no method named xrange(),
it has replaced by range(),which is equal to xrange() in python2.x.
so we must fix this issue.we use six module to fix this issue.
Change-Id: I9cee3f0df2d8abbf6f66d7c5a3a0fed98df622e8
Closes-Bug: #1268439
If minimize_polling=True and the ovsdb-client process died, the
default respawn interval of 0 would mean that we'd start polling
again. This patch adds the option ovsdb_monitor_respawn_interval and
defaults it to 30 seconds.
Change-Id: I12c1e05ec4d6d2bd4d84024a91116e2ac3974868
Close-Bug: 1243867
To ensure that correct process is killed when using a rootwrap
script, we must recursively list the children of our top-level
process and kill the last one. This patch uses the psutil python
module which is already used in the heat-cfntools project.
Change-Id: I702bb9dd794c08fcaab637284ee303de1778cbb9
This change adds the ability to monitor the local ovsdb for
interface changes so that the l2 agent can avoid unnecessary
polling. Minimal changes are made to the agent so the risk
of breakage should be low. Future efforts to make the agent
entirely event-based may be able to use OvsdbMonitor as a
starting point.
By default polling minimization is not done, and can only be
enabled by setting 'minimize_polling = True' in the ovs
section of the l2 agent's config file.
Closes-Bug: #1177973
Change-Id: I26c035b48a74df2148696869c5a9affae5ab3d27
Interacting with a long-running asynchronous process requires the
use of non-blocking io. This change adds a helper class that can
launch a long-running process and read stdout and stderr in a
non-blocking fashion via eventlet.
This functionality is intended to support monitoring ovsdb via
a long-running and root-privileged invocation of ovsdb-client.
The complexity of the system interaction in this patch suggested
the addition of a functional test that validated actual behaviour.
The test was added under the neutron/tests/functional path which
is now included in the testr search path.
Partial-Bug: #1177973
Change-Id: I9969e556acecf7a9e77d873371cc2ec2647be011