In sync_routers L3-RPC method l3-agent sends router_ids but the
server side expected router_id. This commit fixes the server side
to accept router_ids, and drops "fullsync" arg from the agent side
(fullsync is not used anywhere and it does not affect RPC signature).
This change allows l3-agent to sync only the specified routers
instead of all routers.
As a result of the above change, auto_schedule_routers() and
list_active_sync_routers_on_active_l3_agent() in L3 scheduler
needs to handle a list of router IDs. This commit changes L3 scheduler
to accept a list of router IDs in the above two methods.
Also fixes the argument order of fullsync and router_ids in get_routers
in L3PluginApi. L3-agent main code expects router_ids as the second arg.
This commit adds unit tests for packet-filter in NEC Plugin.
This commit refactors packet-filter in NEC Plugin.
- Put packet-filter classes and methods into nec/packet_filter.py (a) and
nec/db/packetfilter.py (b), NEC Plugin specific codes are in (a)
- Change stateless methods to class methods in extenstions/packetfilter.py
- Add 'convert_to' option to the attribute map of packet-filter to convert
some string parameter to int at the api layer
Also, this commit includes the following changes in packet-filter.
- Fix attribute map of packet-filter; set in_port to allow_put=False
- Add new methods to update attribute map properly
- Make packet-filters ignore status of associated resource (network)
Enable policy control over external_gateway_info sub-attributes
Part 2 of blueprint l3-ext-gw-modes
This patch extends the logic for building policy rule matches in order to
include sub-attributes as well. This logic will be leveraged by the
ext-gw-mode api extension.
This patch add the type_driver GRE to enable the creation of GRE
tunnels with the OVS agent.
No Endpoints ID are managed. Only Endpoint IP are stored in DB,
and this IP is proposed as an endpoint ID for the OVS agent.
It also fixes the bug 1201471.
Introduce a looping call for performing synchronization with
neutron server.
The sync will be performed only if router changes are notified
via rpc. Only affected routers will be synchronized.
Changes will be implemented by the l3 agent spawning a
distinct greenthread for each router - iptables will
be executed only once using iptables_manager.defer_apply_on.
This patch will prevent the occurence of the following issues:
- Out-of-order rpc message processing
- Long processing time for router changes due to serial execution
- Occasional and expected RPC blocks for long periods
- Unnecessary processing of multiple requests
Fix random OverflowError exceptions in gate-neutron-python26 tests
These errors seem to be linked to the NEC plugin and http connections
not being stubbed out correctly. This patch ensures do_request is
stubbed out prior to the tests execution; this should be enough
to prevent timeouts from occurring again. Stubbing out the call has
no effect on the coverage of the agent scheduler tests for the NEC
plugin.
Kevin Benton [Wed, 10 Jul 2013 23:28:12 +0000 (16:28 -0700)]
Prevent possible server list damage in BigSwitch plugin
The old failover logic for the BigSwitch plugin modified a
list of controllers as it tested them. If the code for one
thread unexpectedly raised an exception or died, the global
server list could lose a server permanently.
This patch addresses that by flagging servers as failed instead
so the global server list is never modified.
Kyle Mestery [Fri, 14 Jun 2013 14:25:08 +0000 (14:25 +0000)]
Modify the OVS agent to support multiple tunnel_types concurrently.
This change modifies the "tunnel_type" configuration option to be a ListOpt
instead of a StrOpt. This is intended to allow the agent to work in an ML2
environment where multiple, disparate "tunnel_types" are supported at the
same time. For now, the agent will enforce a single "tunnel_type".
This commit refactors the base class of unit tests for NEC Plugin to
make writing new tests easier.
Add fake OFC Manager and change unit tests which use OFC Manager mock
to using this fake. With this fake, we don't need to set return_value
and side_effect to the mock instance of OFC Manager in each test case.
This fake keeps all resources on OFC, and returns existence of
resources properly. This fake is attached to OFC Manager mock instance
by setting all side_effects. We can also set it to raise an exception.
Make NEC Plugin configurable in each test case. Now we can configure
NEC Plugin by setting string in class value "_nec_ini" which will be
written into a temporal file and loaded by NEC plugin.
Move setup for callbacks into NecPluginV2TestCase() so that other unit
tests can use callbacks.
Kevin Benton [Wed, 10 Jul 2013 23:49:31 +0000 (16:49 -0700)]
Add option to ignore backend HTTP error in BigSwitch plugin
This patch fixes the way the BigSwitch plugin ignores 404
errors from the backend controller by allowing HTTP codes
to be selectively ignored on REST calls. This prevents
unnecessary exception handling and failover logic in calls
where 404 codes are acceptable.
Firstly, we update the oslo.config dep to 1.2.0a3 because of the issue
with namespace packages (bug #1194742).
But the main issue here is that if you currently do:
$> pip install -r quantum/requirements.txt
then you end up with the oslo.config 1.1.1 code installed. This is
because oslo.config>=1.1.0 gets pulled in as a transitive dep and pip
gets confused. You can reproduce with e.g.
This is because of a bug with pip where it sees oslo.config-1.2.0a3 and
oslo.config as two unrelated things. It should strip the version part of
the egg= fragment before using it as a package name, but it doesn't.
However, we can simply use the -f/--find-links pip option in our
requirements.txt to add the tarball URL to the list of URLs considered
and also add the oslo.config>=1.2.0a3 dependency:
This is actually exactly the semantics we want and we go to great
lengths in pbr to get these semantics while using a single tarball URL.
The only downside to this --find-links strategy is that we gain an extra
line in our requirements.txt ... but it does work around the pip bug.
Carl Baldwin [Thu, 11 Jul 2013 18:17:40 +0000 (18:17 +0000)]
Quiet down a large log file heavy hitter.
This line of code serialized the python structure for the device and throws it
at the log file. The string is about 90K characters, isn't very useful and we
found that it takes a very large amount of space in the log file causing them
to grow very quickly and fill our log disk. This change extracts the device
name (e.g. "tapcdc07af9-8a") and uses that in the log message.
Dirk Mueller [Mon, 24 Jun 2013 18:56:32 +0000 (20:56 +0200)]
Be compatible with oslo.config 1.2.0a3+
The private API of oslo.config changed, and the Cisco
options parsing code was using it.
Use an explicit MultiConfigParser instance for parsing
the config files.
Define the Mechanism Driver interface for create/update/delete
operations on networks and ports. For each of these event, the
Mechanism Driver provides one method that is called within the
database transaction of the ml2 plugin method, and one that is called
after the transaction is completed.
Support for mechanism drivers is still a work-in-progress, and the
interface is subject to change in future versions before the release
of Havana. However this initial version should be sufficient to enable
others to start defining their own mechanism drivers.