Russell Bryant [Mon, 1 Dec 2014 19:15:58 +0000 (19:15 +0000)]
Drop old code from SecurityGroupAgentRpcApiMixin
The SecurityGroupAgentRpcApiMixin class temporarily had support for
both RpcProxy and new oslo.messaging style rpc client interfaces. Now
that all users of this mixin have been converted to direct usage of
oslo.messaging APIs, the old compatibility code can be removed.
Russell Bryant [Mon, 1 Dec 2014 18:42:30 +0000 (18:42 +0000)]
Drop RpcProxy usage from ml2 AgentNotifierApi
Remove usage of the RpcProxy compatibility class from the ml2
AgentNotifierApi. The equivalent oslo.messaging APIs are now used
instead. A couple of other mixin APIs had to be converted at the same
time.
Note that there is one very minor functional change here. The base
rpc version is set to '1.0' now instead of '1.1'. The right pattern
to use is to always set the base to be N.0. Any method that needs a
newer version should specify it.
Angus Lees [Wed, 13 Aug 2014 05:42:10 +0000 (15:42 +1000)]
Enable undefined-loop-variable pylint check
This required a trivial refactor of two existing cases in the codebase.
These two cases were perfectly correct, but the check uncovered a 3rd
case which was a real bug (fixed separately). The new versions also
make it clear that if the loop fails to break early then the 'result' is
None (and thus an error) and not simply the last element. On balance,
it's probably worth enforcing this small inconvenience to coding style.
Angus Lees [Mon, 25 Aug 2014 02:02:16 +0000 (12:02 +1000)]
Fix incorrect exception order in _execute_request
_execute_request has a list of exception handlers to log various types
of errors with more specific error messages. Unfortunately, it catches
requests.exceptions.ConnectionError before requests.exceptions.SSLError,
but ConnectionError is a superclass of SSLError so the latter is never
invoked.
This change corrects the exception handling order, and enables the
bad-except-order pylint check now that the check passes.
Ihar Hrachyshka [Fri, 21 Nov 2014 21:01:08 +0000 (22:01 +0100)]
Migrate to oslo.i18n
Mostly trivial import changes.
- oslo.i18n no longer provide install() method to inject _() into
globals(), so removed all calls to it;
- removed Babel from dependencies (it will now be grabbed by oslo.i18n);
- updated tox.ini to ignore import violations for oslo.i18n.
gordon chung [Wed, 8 Oct 2014 21:51:47 +0000 (17:51 -0400)]
Migrate to oslo.middleware
Synced middleware module from incubator instead of removing it
completely. This is needed for grenade and to keep backwards
compatibility with existing installations with old api-paste.ini.
'log' module is updated as a dependency for middleware module.
'versionutils' are added as a new dependency for middleware module.
Russell Bryant [Sun, 23 Nov 2014 02:37:46 +0000 (02:37 +0000)]
Drop RpcProxy usage from oneconvergence plugin
This patch removes usage of the RpcProxy compatibility class from the
oneconvergence plugin. The equivalent usage of oslo.messaging APIs is
now used intead.
Ihar Hrachyshka [Fri, 21 Nov 2014 21:05:56 +0000 (22:05 +0100)]
Synced processutils and periodic_task modules
This is to avoid using gettextutils module in them to be able to drop
the module once we complete migration to oslo.i18n.
Included changes:
* openstack/common/_i18n.py: 66bad01 Allow tempest to use new log w/o oslo.i18n
* openstack/common/log.py: ac4330d Make use_syslog=True log to syslog via /dev/log df774ff Import PublishErrorsHandler from oslo.messaging a3220c5 add list_opts to all modules with configuration options
* openstack/common/periodic_task.py: a3220c5 add list_opts to all modules with configuration options 5d40e14 Remove code that moved to oslo.i18n
* openstack/common/processutils.py: 5d40e14 Remove code that moved to oslo.i18n 6ff6b4b Switch oslo-incubator to use oslo.utils and remove old modules 6a60f84 Mask passwords in exceptions and error messages 63c99a0 Mask passwords in exceptions and error messages e184dd3 Fix exception message in openstack.common.processutils.execute d6b55fb Remove `processutils` dependency on `log` 33afb20 Fix broken formatting of processutils.execute log statement 85f1784 Move nova.utils.cpu_count() to processutils module cdcc19c Mask passwords that are included in commands 2a4d15d Merge "Allow passing environment variables to execute()" 8a0f567 Remove str() from LOG.* and exceptions 51778f9 Allow passing environment variables to execute() fcf517d Update oslo log messages with translation domains af41592 Catch OSError in processutils f773ea2 Fix i18n problem in processutils module
Sylvain Afchain [Thu, 20 Nov 2014 14:25:58 +0000 (14:25 +0000)]
Fix floating-ips in error state in dvr mode
Before this fix an exception was raised when
creating the veth between the fip namespace and
the qrouter namespace when the veth was already
present.
This fix add a check to only create the veth if
not present.
Hironori Shiina [Wed, 26 Nov 2014 04:41:06 +0000 (13:41 +0900)]
Reject trailing whitespaces in IP address
Trailing whitespaces in IP address or CIDR pass API validation. These
whitespaces sometimes cause serious troubles. For instance, a trailing
CR code in allocation pools cause an ovs-agent to crash when calling
iptables. In this case, a tenant user's operation mistake affects whole
system.
By modifying _validate_no_whitespace() to reject data with whitespaces
in the beginning and the end, the IP address and CIDR validation
detects invalid attributes. The MAC address validation already rejects
these whitespaces.
Ensure that a n1kv tenant who has no access to a network profile
belonging to some other tenant, is not allowed to modify that profile.
Currently, a tenant can create networks on any network profile if he
has the network profile id.
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.
Russell Bryant [Fri, 21 Nov 2014 20:56:04 +0000 (20:56 +0000)]
Drop RpcProxy usage from mlnx plugin
This patch drops usage of the RpcProxy compatibility class from the
mlnx plugin. The equivalent oslo.messaging APIs are now used instead.
Note that one test case was dropped, but only because it did not
provide any actual additional test coverage.
Also note that the base rpc version is set to '1.0' instead of '1.1'
as it was in the original code. Setting the base to X.0 is the right
pattern. Methods that require a newer version should specify it in
their implementation. According to the API history comment here, the
methods in this class were not the ones changed in '1.1', so they
don't specify '1.1' as a requirement.
Russell Bryant [Fri, 21 Nov 2014 18:50:30 +0000 (18:50 +0000)]
Drop RpcProxy usage from cisco.l3
Drop usage of the RpcProxy compatibility class from cisco.l3. This
was the last of RpcProxy usage in the cisco plugin. The equivalent
APIs from oslo.messaging are now used instead.
Russell Bryant [Fri, 21 Nov 2014 14:43:26 +0000 (14:43 +0000)]
Drop RpcProxy usage from brocade plugin
This patch drops the usage of the RpcProxy compatibility class from
the brocade 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.
Boris Pavlovic [Mon, 24 Nov 2014 14:09:58 +0000 (18:09 +0400)]
Update rally-jobs files
*) Rename rally-scenarios that is quite misleading to rally-jobs.
rally-jobs makes much more sense, cause it actually contains files
related to rally job
*) Update rally-jobs/README.rst to add more info
*) Update rally-jobs/plugins/README.rst to expaling plugins
*) Add new directory rally-jobs/extra, this directory is copy pasted
in gates and can be used for files that are required by some of
benchmarks
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.