Russell Bryant [Tue, 25 Nov 2014 18:06:46 +0000 (18:06 +0000)]
Drop sudo requirement from a unit test
I noticed while working on some other stuff that a unit test was
prompting me for my sudo password. I narrowed it down to the
offending test case and fixed it by mocking out the execute util, as
is done in several other places in these tests.
Bob Melander [Mon, 24 Nov 2014 11:59:20 +0000 (12:59 +0100)]
Update i18n translation for Cisco plugins and cfg agent log msg's
All the existing LOG.info, LOG.warning, LOG.error and LOG.critical
messages should have _LI, _LW, _LE and _LC respectively. Also, debug
level log shouldn't be translated. This patch set will cover the cisco
directory under neutron/plugins.
John Schwarz [Mon, 29 Sep 2014 13:53:00 +0000 (16:53 +0300)]
Test HA router failover
HA failover testing requires the ability for two L3 agents to
co-exist on the same machine. The following changes were made
to support this:
* Add l3 agent ability to simulate nested namespaces by suffixing
each router namespace with '@host'. For example, if a router
with id '1' is created, its namespace will be:
'qrouter-1@host'
* Added test.common submodule which will hold common code which is
shared between the different kind of tests (unit and funtional).
* Added tests.common.agents submodule which holds test-only agents, and
added a test L3NAT agent to be used in the HA functional testings.
Romil Gupta [Sun, 26 Oct 2014 13:18:53 +0000 (06:18 -0700)]
Update i18n translation for ML2 plugin log msg's
All the existing LOG.info, LOG.warning, LOG.error and LOG.critical
messages should have _LI, _LW, _LE and _LC respectively.
Also, debug level log shouldn't be translated.
This patch set will cover the ml2 directory under neutron/plugins.
Xu Han Peng [Fri, 14 Nov 2014 02:53:59 +0000 (10:53 +0800)]
Fix metadata proxy start problem for v6-v4 network
Commit 1b66e11b5d8c0b3de0610ca02c3e10b6f64ae375 introduces
a new problem that metadata proxy will not be started when
an isolated network contains ipv6 subnet with dhcp enabled
and a ipv4 subnet.
This fix separates the checks to enable dhcp and enable metadata
so metadata proxy can be started if there is ipv4 subnet exists
in the network with metadata enabled.
Russell Bryant [Thu, 20 Nov 2014 22:22:41 +0000 (22:22 +0000)]
Drop RpcProxy usage from bigswitch plugin
This patch drops the usage of the RpcProxy compatibility class from
the bigswitch plugin. The equivalent usage of oslo.messaging APIs is
now used instead.
Note that there is one very minor functional change included. The
previous code set the base version to '1.1'. It should be '1.0'. The
proper pattern to use is to set the base version on the client side to
be the initial version of the API (X.0). Then, any methods that
require a newer version need to specify it. In this case, verison
'1.1' was the security group methods, and those specify '1.1' as you
would expect.
Implement migration of legacy routers to distributed
This patch addresses the necessary changes required
for the router migration or conversion from legacy
to distributed.
The _update_router_db() method was modified to add
logic to support the SNAT functionality of DVR by
calling create_snat_intf_ports_if_not_exists(). A
call to _unbind_router() was also called to force
the scheduling of the router with 'distributed'
enabled.
Right now we will be supporting migration from legacy
to distributed only.
Closes-bug: #1348309
Partially-implements: blueprint neutron-ovs-dvr Co-Authored-By: Michael Smith <michael.smith6@hp.com>
Change-Id: I6f252271bb5b52ce57184ad7b0bf1ce280b965fb
Russell Bryant [Thu, 20 Nov 2014 21:01:14 +0000 (21:01 +0000)]
Show progress output while running unit tests
This patch imports some magic to enable showing test output as the
tests run. Seeing output showing tests as they execute is reassuring
that the test run is continuing to make progress. This originated in
tempest and was then brought over to Nova in this commit:
https://review.openstack.org/#/c/121914/
Note the justification in that commit to just copy it instead of move
it to a shared repo.
To get the old behavior where you only get output when something
fails, you can set the TRACE_FAILONLY env var. That originated in
this commit in Nova:
Cedric Brandily [Tue, 11 Nov 2014 16:01:54 +0000 (17:01 +0100)]
Enforce log hints in neutron.services.loadbalancer
This change enforces log hints use and removes debug level log
translation, modifications are validated through a hacking rule and
the change respects loggging guidelines.
Validate that hacking rules apply to directories:
- neutron/services/loadbalancer
abhishek.talwar [Tue, 18 Nov 2014 09:50:51 +0000 (15:20 +0530)]
Check for default sec-group made case insensitive
Currently creating another security group with name
"default" is not allowed, however we can create
another security group with name "DEFAULT"
(or any other CASE pattern).
When trying to boot a VM without specifying
a security group it should always pick the
"default" security group. However, if another
security group of the name DEFAULT is present,
the VM gets associated with the wrong
security group (i.e DEFAULT and not default).
So, updated the code so that a security group
with name DEFAULT (or any other case pattern)
is not allowed.
Closes-Bug: #1384505
Brian Haley [Wed, 19 Nov 2014 17:10:57 +0000 (12:10 -0500)]
Fix a race condition adding a security group rule
setup_port_filters() needs to grab self.devices_to_refilter
before it calls prepare_devices_filter(), else it could skip
processing a device if an RPC arrives while it's processing
new devices. That device will now be handled the next time
it's called.
Russell Bryant [Tue, 18 Nov 2014 14:46:06 +0000 (14:46 +0000)]
Drop RpcProxy usage from FWaaS code
This patch removes the usage of the RpcProxy compatibility class from
the FWaaS code. The equivalent direct usage of oslo.messaging APIs
are now used instead.
Russell Bryant [Fri, 14 Nov 2014 14:21:05 +0000 (14:21 +0000)]
Drop RpcProxy usage from neutron.agent.rpc.PluginApi
This patch removes the usage of the RpcProxy compatibility class from
the neutron.agent.rpc.PluginApi class. The equivalent use of
oslo.messaging APIs have been put in place instead. This simple
conversion had a pretty wide impact on unit tests, as well.
The security groups API was converted in this patch as well. It was
necessary because the security group class is used as a mixin, so it
must be implemented the same way. Unfortunately, the way this is used
as a mix-in is not consistent, so for now it's only conditionally
converted.
Finally, some other miscellaneous plugin specific interfaces were
converted as well. Again, these were methods mixed-in for certain
plugins.
Note that there's one very minor functional difference in this patch.
The previous code set the base version to be '1.1'. The right pattern
is for this to be set to '1.0'. This version is the default version
specified by the client, telling the server that it must implement at
least this version to satisfy the request. The default should be
'1.0' and methods that require higher than that should specify it.
From looking at other parts of the code, '1.0' vs '1.1' is not
actually important, as '1.1' was actually the addition of some
security group methods defined elsewhere. The correction is more
about establishing the right pattern to follow.
Russell Bryant [Mon, 17 Nov 2014 21:33:06 +0000 (21:33 +0000)]
Fix a copy/pasted test mistake
Fix a minor test mistake that was copied around a few times. In mock
setup, the intention was to only return a value of the rpc method used
was a 'call', not 'cast'. Unfortunately, the variable checked was
method instead of rpc_method, so this expected return was always set
to None.
This also points out that what's being tested here isn't what *really*
was intended. It ends up testing that the code returns what we mocked
it to return, which isn't all that useful. However, at least with
this fix it's a bit more clear what it's trying to do.
Russell Bryant [Thu, 13 Nov 2014 21:31:10 +0000 (21:31 +0000)]
Drop several uses of RpcCallback
This patch drops several uses of the RpcCallback compatibility class.
All of these were trivial and straight forward conversions so I
batched them up.
There are still several other uses of RpcCallback, but the conversions
are were not necessarily trivial, and may be broken in one way or
another, so I wanted to address them separately. In particular, the
use of mixin classes means that there could be cases where the version
declaration is being stepped on, so they need to be investigated more
closely.