Pavel Bondar [Wed, 17 Jun 2015 15:47:11 +0000 (18:47 +0300)]
Remove _check_ip_in_allocation_pool
_check_ip_in_allocation_pool is not used anywhere in neutron.
Cleaning up unused code from db_base_plugin_v2.py.
Caller was removed over a year ago in change
Ib31550fa9000fc75768a327cb6cc1c419e06568f
Doug Hellmann [Tue, 16 Jun 2015 19:49:15 +0000 (19:49 +0000)]
Update version for Liberty
Update the version for Liberty, switching from date-based versioning
to pre-versioning using SemVer. See
http://lists.openstack.org/pipermail/openstack-dev/2015-May/065211.html
and
http://lists.openstack.org/pipermail/openstack-dev/2015-June/067082.html
for details.
Cyril Roelandt [Wed, 17 Jun 2015 14:25:56 +0000 (14:25 +0000)]
Python 3: do not use cmp(), nor sorted(..., cmp=...)
* The "cmp" function has been removed, so we must not use it any more;
* The "cmp" keyword argument of the "sorted" function has been removed, so
replace it with "key=functool.cmp_to_key".
Aaron Rosen [Wed, 17 Jun 2015 00:23:09 +0000 (17:23 -0700)]
ovsdb: session.rpc never initialized
Previously, if idl.Transaction.commit_block() returned a status of
TRY_AGAIN we would check self.api.idl._session.rpc.status which would
result in an attribute error as rpc is None.
This patch fixes this attribute error by removing this unneeded check. In
addtion, the force_reconnect() is also removed as ovs.jsonrpc handles
reconnecting automatically for us.
Rawlin Peters [Mon, 15 Jun 2015 16:57:02 +0000 (10:57 -0600)]
Remove duplicated debug logging around locking
Currently, iptables_manager.py does extra unnecessary logging about lock
acquisition and release. It uses lockutils.lock() which passes
do_log=True by default, which causes lockutils.lock() to do debug
logging about lock acquisition/release. IptablesManager itself also writes
debug log info about lock acquisition and release.
This change will eliminate unnecessary duplicate logging in order to
reduce log noise about locking. This change is also related to
https://github.com/harlowja/fasteners/commit/f88f2fea7fe250b7d26cdcbc84633ccbbc68eeee
which reduces the logging level in the underlying lock implementation
used by oslo.concurrency. That change along with this one will remove
the duplicate debug logging about locking in iptables_manager.py and also in
ipset_manager.py.
Aman Kumar [Tue, 16 Jun 2015 12:32:44 +0000 (05:32 -0700)]
Refactor scan_ports() and update_ancillary_ports() in OVS Neutron Agent
Used a helper method which contains the common code from scan_ports()
and update_ancillary_ports(). And also renamed the name of
update_ancillary_ports() method to scan_ancillary_ports() to have parity
between normal ports and ancillary ports.
Havana was deprecated with the kilo release, and icehouse will be
deprecated with the liberty release, so havana_inital migration should be
removed and replaced with juno_initial.
Ihar Hrachyshka [Tue, 16 Jun 2015 07:21:42 +0000 (09:21 +0200)]
docs: added job to well known tox envlist
This is to make 'tox -l' return the job name in its output (needed to
allow run-docs.sh script in project-config to determine whether the job
is present, to rely on it when generating docs in gate).
Pavel Bondar [Wed, 10 Jun 2015 13:18:40 +0000 (16:18 +0300)]
Refactor update_port in db_base_plugin_v2
This commit is a preparation step for using pluggable IPAM.
- moved validations into _validate_port_for_update;
- updating ip addresses for port is backend specific, so
moved into _update_port_with_ips in ipam_non_pluggable_backend;
- writing port changes to db is common for both backends, so
moved into _update_db_port in ipam_backend_mixin;
- updated to use namedtuple to track add/original/remove ips;
- added _make_fixed_ip_dict to exclude keys other than
ip_address and subnet_id;
Pavel Bondar [Wed, 10 Jun 2015 11:56:58 +0000 (14:56 +0300)]
Refactor _update_ips_for_port
This commit is a preparation step for using pluggable IPAM.
_update_ips_for_port was refactored and split into two methods:
- _get_changed_ips_for_port
This method contains calculations common for pluggable and
non-pluggable IPAM implementation, was moved to ipam_backend_mixin.
- _update_ips_for_port
This method is specific for non-pluggable IPAM implementation, so it
was moved to ipam_non_pluggable_backend_common.
Other changes:
- _update_ips_for_port now returns namedtuple with added, removed, original
ips (previously added and original ips were returned).
List of removed ips is required by pluggable IPAM implementaion
to apply rollback-on-failure logic;
- removed unused port_id argument from _update_ips_for_port argument list;
Cedric Brandily [Tue, 9 Jun 2015 16:00:58 +0000 (16:00 +0000)]
Ensure no "db" related functional/fullstack tests are skipped in the gate
Currently neutron uses MySQLTestCase[1] and
PostgreSQLOpportunisticTestCase[2] for functional and fullstack tests
using a real MySQL/PostgreSQL database. These classes skip tests when
the db is unavailable (db not installed/configured, missing packages,
etc.) which is fine when tests are runned by developers but not when
runned by the gate jobs.
This change updates MySQLTestCase[1] and defines PostgreSQLTestCase[1]
as PostgreSQL oslo.db test class wrapper: when the db is unavailable,
these classes ensure tests will:
* fail in the gate (dsvm-functional, dsvm-fullstack jobs),
* be skipped by default otherwise (functional, fullstack jobs).
Cedric Brandily [Wed, 10 Jun 2015 20:35:11 +0000 (22:35 +0200)]
Use PyMySQL in MySQL related functional/fullstack tests
mysql-python driver has been replaced by PyMySQL driver[1] in neutron
code but MySQL related functional/fullstack tests try to use
mysql-python driver because of MySQLOpportunisticTestCase[2] and tests
are skipped because mysql-python driver is no more available.
This change provides a backend implementation for mysql+pymysql, a base
base testcase MySQLTestCase[2] using mysql+pymysql implementation
(currently oslo.db provides none of them but will in the future) and
replaces MySQLOpportunisticTestCase with MySQLTestCase.
Skip rescheduling networks if no DHCP agents available
This eliminates the problem of unscheduled networks in case
of communication failure between agents and servers which
can occur if messaging queue service fails.
Russell Bryant [Sat, 13 Jun 2015 01:26:37 +0000 (21:26 -0400)]
Reflect project moves from stackforge to openstack.
Several git repos were just moved from stackforge to openstack.
Reflect the move in various places where the URL was in docs and
comments. In passing, also change URLs to git.openstack.org instead
of github, as that is the official home of all of these repos.
Pavel Bondar [Mon, 8 Jun 2015 11:15:30 +0000 (14:15 +0300)]
Decompose db_base_plugin_v2.py with changes
This commit is a preparation step for using pluggable IPAM.
1. Moved get_subnets functionality to db_base_plugin_common to make it
accessible by ipam backends.
2. Reworked update_subnet routine:
- moved db part into update_db_subnet;
rossella [Thu, 11 Jun 2015 08:43:36 +0000 (10:43 +0200)]
OVSNeutronAgent pass the config as parameter
Instead of using the global cfg.CONF, pass the config as parameter.
This is very useful to test the agent without having to override
the global config.
Pavel Bondar [Thu, 11 Jun 2015 14:23:41 +0000 (17:23 +0300)]
Refactor _update_subnet_allocation_pools
Moved _update_subnet_allocation_pools to ipam_backend_mixin.py.
Call _rebuild_availability_ranges with self to make it overridable
on upper level (from non-pluggable backend).
Dane LeBlanc [Tue, 24 Feb 2015 20:47:01 +0000 (15:47 -0500)]
Stop sending gratuitous arp when ip version is 6
This fix prevents calls to the arping utility for IPv6
addresses, thereby eliminating errors reported by arping
for IPv6 addresses.
The assumption is that NDP, DAD, and RAs are sufficient
for address resolution and duplicate address detection
for IPv6, and that unsolicited Neighbor Advertisements (NAs)
are not required for OpenStack services. If this turns out
not to be the case for some service/feature, then a separate
bug should be filed to add support for unsolicited NAs for
that service.
Fix Enum usage in 589f9237ca0e_cisco_n1kv_ml2_driver_tables
PostgreSQL is more sensitive with types than MySQL, it creates a
separate type when a Enum is created. In migration 589f9237ca0e
type profile_type is trying to be created, but the type with such
name was already created in havana_initial migration.
The solution for this is not to create type in 589f9237ca0e
migration when dialect is PostgreSQL and use already created.
Kevin Benton [Thu, 11 Jun 2015 04:45:41 +0000 (21:45 -0700)]
power grab
The current core reviewers hierarchy didn't have a place for the
parts of ML2 that weren't related to agent communication. For now
we can put all of ML2 under the built-in control-plane until we
decide it needs to be put somewhere else.
Cedric Brandily [Mon, 1 Jun 2015 20:29:39 +0000 (22:29 +0200)]
Ensure no "agent" functional tests are skipped in the gate
Some "agent" functional tests[1] can be skipped if some requirements are
not satisfied in order to allow developers to run functional tests on
various environments. These tests should not be skipped in the gate.
This change defines the decorator no_skip_on_missing_deps[2] to ensure
no "agent" functional tests are skipped in the gate. More precisely
no_skip_on_missing_deps transforms a skipTest into an error in:
* dsvm-functional and dsvm-fullstack jobs,
* functional and fullstack jobs when OS_FAIL_ON_MISSING_DEPS is
evaluated as True.
The change enlarges OS_FAIL_ON_MISSING_DEPS environment variable scope
(ie: missing dependencies + system requirements).
[1] in neutron.tests.functional
[2] in neutron.tests.common.base