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.
YAMAMOTO Takashi [Fri, 20 Jun 2014 03:08:18 +0000 (12:08 +0900)]
ofagent: move main module from ryu repository
the recent oslo.messaging transition broke ofagent.
this commit fixes the regression.
historically the main module of ofagent has been maintained
in ryu's repository. this commit moves it into neutron's
repository and add common_config.init() call which is necesary
for the new rpc code.
Ralf Haferkamp [Wed, 18 Jun 2014 15:01:26 +0000 (17:01 +0200)]
Don't convert numeric protocol values to int
They are treated as strings everywhere. Converting them to int causes problems
when using postgresql as the database backend because it doesn't automatically
cast them back to integer.
berlin [Mon, 23 Jun 2014 02:16:34 +0000 (02:16 +0000)]
Revert "Check NVP router's status before deploying a service"
This reverts commit 25103df197c1f366eac8dd3069fabc01d3bd18e9.
Since it always leads to an gate failure filed on https://bugs.launchpad.net/neutron/+bug/1332502 although can't find the reason until now.
Sayaji [Fri, 20 Jun 2014 20:52:30 +0000 (13:52 -0700)]
Changing the poll_duration parameter type to int
The poll_duration parameter is defined as a Str in config.py
but while using in code, it is converted to int. So just changing
the type in the config file, so no conversion is required when used
Ihar Hrachyshka [Mon, 9 Jun 2014 13:14:14 +0000 (15:14 +0200)]
Removed 'rpc' and 'notifier' incubator modules
Port to oslo.messaging is done, so remove now unused pieces from the
tree.
Also removed obsolete bin/quantum-rpc-zmq-receiver. It comes from old
days of oslo-rpc, it was reimplemented later as
openstack/common/rpc/zmq_receiver.py in oslo-incubator, and we've
removed the whole tree for old RPC layer anyway.
Eugene Nikanorov [Wed, 18 Jun 2014 13:02:42 +0000 (17:02 +0400)]
Fix auto_schedule_networks to resist DBDuplicateEntry
This exception may happen if API and RPC workers are in different
processes.
Also make minor refactoring of auto_schedule_networks method
to avoid unnecessary db queries.
Add missing unit tests and adjust unit test naming style
TripleO's multi-node testing shows that this patch caused a failure to receive
tunnel updates, leading to the first node up to have no agent ports, the second
to have one agent port, the third to have 2 agent ports, etc. Needless to say,
this doesn't work all that well :)
Yalei Wang [Tue, 17 Jun 2014 02:56:46 +0000 (10:56 +0800)]
ValueError should use '%' instead of ','
The method _load_service_plugins() in /neutron/neutron/managers.py
throw a ValueError using ',' to connect log and variables.
ValueError do not support using ',' to connect log and variables,
we should use '%' instead of ','
Ihar Hrachyshka [Mon, 9 Jun 2014 12:42:25 +0000 (14:42 +0200)]
Renamed argument for create_consumer[s]
Now that we don't have explicit dispatcher class to pass into RPC layer,
and we pass a list of endpoints instead, fix names for corresponding
arguments of the functions.
Ihar Hrachyshka [Mon, 2 Jun 2014 15:40:38 +0000 (17:40 +0200)]
Port to oslo.messaging
Now that all preparations are done, actually port the code to use
oslo.messaging. This patch does as little as possible. Follow up patches
that refactor and cleanup the code and configuration files, will be
merged later. The reason for this is to make the patch as slim as
possible, to make review process more smooth and concentrated.
Details:
* neutron/common/rpc.py:
- added init() and cleanup() to set global RPC layer state.
- added utility functions: get_server(), get_client(), get_notifier()
that wrap up oslo.messaging API a bit, enforcing eventlet executor
and setting serializer, among other things.
- removed PluginRpcDispatcher, instead introduced PluginRpcSerializer
to use as a default serializer for API callbacks.
* neutron/common/rpc_compat.py:
- emulated incubator RPC layer behaviour thru previously introduced
stub classes (RpcCallback, RpcProxy, ...) using new oslo.messaging
API.
- switched to using new oslo.messaging exception types.
* neutron/service.py:
- expect multiple RPC listeners that are of MessageHandlingServer
type, not GreenThread.
* neutron/common/config.py:
- initialize RPC layer in init()
* setup.cfg:
- added entry points for old notifier drivers to retain backward
compatibility.
* neutron/tests/...:
- introduced fake_notifier to replace impl_fake.
- faked out consume_in_thread() to avoid starting RPC listeners when
running unit tests.
- used 'fake' transport driver.
- made sure neutron.test.* exceptions are caught.
- initialize and clean up RPC layer for each test case.
* Ported all affected code from using neutron.openstack.common.notifier
API to oslo.messaging.Notifier.
* rpc.set_defaults() was renamed to rpc.set_transport_defaults()
Terry Wilson [Wed, 18 Jun 2014 03:32:56 +0000 (22:32 -0500)]
Pass 'top' to remove_rule so that rule matching succeeds
When deleting a vpn-site-connection, deleting the nat rule would
fail because it was created with top=True, but top defaults to
'false' in remove_rule and was not being passed. This caused the
rule matching to fail and the rule to not be deleted.
Elena Ezhova [Wed, 11 Jun 2014 13:25:40 +0000 (17:25 +0400)]
Check port value when creating firewall rule with icmp protocol
If a firewall rule was created with setting protocol as icmp
and using source/destination port no error was thrown, even though
source/destination port parameters are not used by icmp.
This patch adds a validation method that checks passed parameters
and throws an exception if they are incompatible.
Kevin Benton [Wed, 18 Jun 2014 07:17:02 +0000 (00:17 -0700)]
Big Switch ML2: sync detection in port-update
Adds logic to the update_port_postcommit method of the
Big Switch ML2 driver to detect when afailure to update
the port via REST was caused by the backend being out-of-sync
with neutron.
This was accomplished by checking for the NXNETWORK message
which indicates that a port request referenced a network that
does not exist on the backend. This only occurs when they are
out-of-sync so the driver will then trigger a full topology sync.
The same logic exists in the port creation method shared with
the Big Switch plugin. However, the Big Switch ML2 driver does
not send port requests to the controller unless the port binding
host ID is set, which doesn't occur until a port update after
binding in the ML2 scenario. Therefore, the logic has to be repeated
in the ML2 driver port update operation.
Ihar Hrachyshka [Tue, 3 Jun 2014 19:05:20 +0000 (21:05 +0200)]
Make sure we call BaseTestCase.setUp() first
Some test cases instantiate RPC clients in setUp() before calling to
super(). After we port to oslo.messaging, we'll initialize RPC layer in
BaseTestCase, so we should make sure we call there before proceeding
with clients in subclasses.