When the H302 work was done, it broke two modules used for UT of
Cisco CSR VPNaaS REST client. Since the UT is currently disabled
(because the httmock library was not approved for test-requirements),
the error was not detected.
This fixes the files, so that they can still be used manually (by
locally importing httmock or its source file, and renaming the
module to remove the "_" prefix).
In the long term, the UT needs to be reworked to use httpretty,
which uses a register based mechanism, instead of a context
manager based mechanism, so this will take some effort. In addition.
there is discussion of switching to a new mock-request package,
instead of httpretty.
Change-Id: I8badc249ad021fdbdb2367b5416c72435ed58994
Closes-Bug: 1335977
Closes-Bug: 1326785
delete_port() calls to disassociate_floatingips() while in transaction.
The latter method sends RPC notification which may result in eventlet
yield. If yield switches a thread to another one that tries to access
the same floating IP object in db as disassociate_floatingips() method
does, we're locked and get db timeout.
We should avoid calling to notifier while under transaction.
To achieve this, I introduce a do_notify argument that controls whether
notification is done by disassociate_floatingips() itself or delegated
to caller. Callers that call to disassociate_floatingips() from under
transactions should handle notifications on their own. For this,
disassociate_floatingips() returns a set of routers that require
notification.
Updated drivers to reflect new behaviour. Added unit test.
Change-Id: I2411f2aa778ea088be416d062c4816c16f49d2bf
Closes-Bug: 1330955
CANARY_TABLE is for br-int, not for br-tun. Grouping it with
constants for br-tun tables together is misleading. Move it into
a separate section and comment appropriately. No functional changes.
Change-Id: Ic1aed992776a87ed77665b712de7ec3bd9dab397
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
Previously ovs_lib.OVSBridge.get_port_ofport() was not handling the
case where db_get_val() was returning None when no output was recieved
from ovs-vsctl. This patch ensures that the TypeError that results
from this condition is appropriately handled.
Change-Id: I168eb0f2c6f0cb98a3eb3e118972bbaf0383ff89
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
http_timeout is a constant defined in the code. This
change makes it configurable by providing it as an
option in the config file.
DocImpact
Closes-Bug: #1332290
Change-Id: I429dd9efa43f6a596933359f4627a7761411e621
Adds context tracking decorators that were missing
from router interface methods. Without them, new
sessions were being created instead of using the
existing context which was causing transaction
issues.
Modifies the servermanager to store context references
as weakrefs so if multiple functions are called before
the rest functions are called, the first one doesn't steal
the only context reference with a pop() call.
Removes a DB lock for update in the server manager that occured
during rest calls that was triggering deadlocks due to the
file lock synchronization for the rest calls.
Closes-Bug: #1336251
Change-Id: Iad3d61e2c23832b3ad760a999fbab7feaa13f805
Ensure the floating IP status is put ACTIVE or DOWN when it
is associated or disassociated.
This is done directly on the plugin class as the NSX backend
applies relevant NAT rules synchronously.
Change-Id: Ie747c4eae2ac33016fdabaade2335f7d2d24eec9
Closes-Bug: #1334708
The ':' syntax doesn't seem to work anymore. Additionally fix the "tox" call to
not try to run it from the current working directory. It's usually installed
somewhere in $PATH.
Closes-Bug: #1334134
Change-Id: Ie608cee2ac131941d6642e2560a84db55415654b
When it is not possible to determinate the dnsmasq version
or dnsmasq is not installed, neutron shows only a warning message.
With this commit the dhcp-agent process will be stopped if the
dnsmasq service is not installed.
Modifies the dhcp version unit test with the expected SystemExit exception
Change-Id: Ia26eaae6f432305f412a4b6a4a6b2b7b15d99d45
Closes-Bug: 1212401
oslo.db first stable release has been cut and we can start using it
instead of openstack/common/db/* code which is now marked obsolete.
Change-Id: I1ccf896922a5a762d37a1a3b93c56c8b8ae8c085
tenant_id will now be consistent among all resources created.
This is important when getting or listing resources by tenant_id.
Most resources are created under the 'test-tenant', while
metering and security groups were created under 'test_tenant'.
Closes-Bug: #1335821
Change-Id: Ifde22814ab5c302e751f2102f6fd7ef52c932126
The previous exception handling in daemon_loop reprocessed all existing
devices as if they were new devices. However, it did not ensure that
any removed devices got cleaned up properly. This could result in
leftover security group iptables rules from deleted instances.
This patch refactors daemon_loop and scan_devices so devices that were
flagged for cleaning will get retreated in the next iteration if there
is an exception.
Change-Id: Ieada34ad315c0c29aa8462ebf041a448fde007b8
Closes-Bug: 1145610