Akihiro Motoki [Tue, 24 Nov 2015 03:15:05 +0000 (12:15 +0900)]
Update toctree of neutron document
* Display more contents in the top page.
It is useful to access various things from the top page.
The contents after this change looks reasonable.
* Remove "Indices and tables" section in policies and stadium index.
They are unnecessary.
Ihar Hrachyshka [Tue, 24 Nov 2015 14:13:00 +0000 (15:13 +0100)]
tox: pass TEMPEST_CONFIG_DIR envvar into api target environment
Currently, API job skips all tests because TEMPEST_CONFIG_DIR is not set
properly. The environment variable was hardcoded to
/opt/stack/tempest/etc before, and since that's the location for tempest
configuration files that was used in gate, it worked fine there.
But after we were forced to remove the hardcoded value from the file due
to regression in tox 2.2.0+ (If3742b6eabe295a5aaeb4901c55909a70c451698),
it was neither hardcoded, nor passed from the external gate environment.
Note that since tox 2.0.0, the tool does not pass all envvars into tox
targets, but require explicit specification of the list of variables
that should be allowed into the target environment, using passenv
directive.
So that's what the patch does: it allows TEMPEST_CONFIG_DIR to get into
api tox target, which should be enough to make the API job avoid
skipping all tests.
Users are still required to set TEMPEST_CONFIG_DIR variable locally if
they want to execute the suite locally.
Cedric Brandily [Sun, 22 Nov 2015 22:22:58 +0000 (23:22 +0100)]
Deprecate l3-agent router_id option
L3-agent router_id option has been defined in order to associate a
l3-agent to a specific router when use_namespaces=False. The option
use_namespaces has been removed in Mitaka, so router_id option is no
longer needed and can be deprecated in order to prepare its removal in N
cycle.
Kevin Benton [Wed, 2 Sep 2015 23:37:17 +0000 (16:37 -0700)]
Make Neutron resources reference standard attr table
This adds a new 'standardattributes' table and adds a foreign-key
references from ports, subnets, networks, subnetpools, routers,
securitygroups, and floatingips to this table.
This will make it easy to add new things to the schema like
timestamp fields or anything else that applies to multiple types
of Neutron resources. The new fields would just be added to the
'neutronresources' table instead of being duplicated across each
resource's table. Or, if the the relationship is 1-to-many (e.g. tags),
the new association table would be related to the 'standardattribute'
table.
Ihar Hrachyshka [Wed, 4 Nov 2015 16:53:16 +0000 (17:53 +0100)]
devref: add upgrade strategy page
The page is intended to describe current upgrade features Neutron
supports, lay out potential improvements, describe testing strategy for
existing and planned upgrade features, and provide guidelines to
reviewers on where to look for potential upgrade breakages in proposed
patches.
Ihar Hrachyshka [Fri, 20 Nov 2015 16:20:09 +0000 (17:20 +0100)]
neutron-db-manage: mark several options as deprecated
I believe we don't rely on --core_plugin or --quota_driver for the tool
because database contents are independent of chosen plugins and drivers
since ~Juno.
Also marked --service with deprecated_for_removal=True.
shihanzhang [Sat, 31 Oct 2015 09:01:48 +0000 (17:01 +0800)]
Check gateway ip when update subnet
If a IP address is None, the method netaddr.IPAddress will raise a
error as 'failed to detect a valid IP address from None'.
When it updates subnet, if gateway_ip is None, it should not call the
method validate_gw_out_of_pools.
Kanzhe Jiang [Thu, 22 Oct 2015 05:09:36 +0000 (22:09 -0700)]
Remove BigSwitch plugin and driver
The BigSwitch Vendor plugin and driver are in
openstack/networking-bigswitch repo and will be moved to
Openstack bigtent. This patch removes the duplicated code and
corresponding entry points. It also moves the bigswitch specific
db tables to openstack/networking-bigswitch.
Closes-Bug: #1508781
Stephen Eilert [Wed, 18 Nov 2015 00:49:19 +0000 (16:49 -0800)]
Fix get_subnet_ids_on_router in dvr scheduler
Added a check to verify if we do have any elements in the list of
fixed_ips, before trying to retrieve the first element of the list, to
get the subnet id. There were no checks in the original code, so it
would crash.
the module neutron.api.extension has a copyright attribute to a user
who never contributed a line to this module. It was probably copied
over in the initial commit for the module.
This commit is probably quite pointless; however it removes a little
oddity and does no harm to anyone.
Ihar Hrachyshka [Fri, 20 Nov 2015 16:35:10 +0000 (17:35 +0100)]
neutron-db-manage: expose alembic 'heads' command
This command shows current heads in all alembic branches. Even without
the command, we *can* get the heads values by looking into *_HEAD files
in tree. Still, those files may be missing; and the command is a tiny
bit more easy to use. Also, it gives access to more details on head
revisions if used with --verbose.
Ihar Hrachyshka [Wed, 11 Nov 2015 12:59:22 +0000 (13:59 +0100)]
Make sure we return unicode strings for process output
Process output is supposed to be represented with lines, so we should
put Python strings in the queue (not bytes). Just in case, we do it only
for Python 3 environment.
To fix that, we reuse code from utils.execute() linux/windows
implementations.
This fixes the TestAsyncProcess.test_async_process_respawns functional
test for Python 3 environment.
Pavel Bondar [Tue, 20 Oct 2015 16:11:30 +0000 (19:11 +0300)]
Use compare-and-swap for IpamAvailabilityRange
Existing locking mechanism 'select for update' causes
deadlocks with galera multi-writers.
Replaced locking rows with compare-and-swap approach.
Compare-and-swap verifies that row is not changed by
another thread before updating/deleting it.
Filter-and-update and filter-and-delete are used.
They return count of affected rows.
If count of affected row is less than expected,
then another thread already changed our row
and RetryRequest is raised.
Kevin Benton [Fri, 20 Nov 2015 04:37:05 +0000 (20:37 -0800)]
Fix use of fields argument in get_rbac_policies
The 'fields' argument wasn't being passed into the _get_collection
call so the results were always coming back with all of the fields.
This adds an API test to prevent a regression.
Ryan Moats [Thu, 19 Nov 2015 21:23:43 +0000 (15:23 -0600)]
Fix dashboard graphite URLs
The update to openstack graphite data is now storing nulls instead
of high frequency zero values. Therefore, make the following changes:
1. use stats_counts instead of stats data, as this accesses the raw
counters
2. apply transformNull to all data series so that null -> 0 is handled
correctly
3. add a global drawNullAsZero=true to handle discontinuities
Thanks to jeblair and sdague for tracking this down
Change-Id: Idebc046d7d867d80e2afe1c4b86c526f9205d3d5 Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
John Schwarz [Wed, 14 Oct 2015 12:39:33 +0000 (15:39 +0300)]
Keep reading stdout/stderr until after kill
Currently, when calling AsyncProcess.stop(), the code stops the stdout
and stderr readers and kills the process. There exists an end case (as
described in the bug report) in which after the readers have been
stopped the sub-process will generate a substantial amount of outputs to
either fd. Since the 'subprocess' module is launched with
subprocess.PIPE as stdout/stderr, and since Linux's pipes can be filled
to the point where writing new data to them will block, this may cause a
deadlock if the sub-process has a signal handler for the signal (for
example, the process is handling SIGTERM to produce a graceful exit of
the program).
Therefore, this patch proposes to only kill the readers until AFTER
wait() returned and the process truly died. Also, relying on _kill_event
had to cease since invoking its send() method caused a logical loop back
to _kill, causing eventlet errors.
A different possible solution is closing the stdout/stderr pipes. Alas,
this may raise an exception in the sub-process ("what? No stdout?!
Crash!") and defeats the 'graceful' part of the process.
Gary Kotton [Wed, 18 Nov 2015 16:26:18 +0000 (08:26 -0800)]
IPAM: fix 'enable-dhcp' with internal driver
Commit 0c1f96ad5a6606c1205bd50ea944c3a383892cde broke the ipam
internal driver. The base plugin should only call the ipam interface
and not invoke the IPallocation data model.
The code that validated that the subnet had one free IP address was
removed. This would not guarantee that a port would indeed be free,
that is, a parallel operation could have created a port on the subnet
during this check.
John Schwarz [Thu, 12 Nov 2015 14:05:19 +0000 (16:05 +0200)]
Send 50% less debug information when executing cmd
The current code prints out the command it runs twice: once in
'create_process' or 'execute_rootwrap_daemon', and once after the
command has finished executing and a return code is returned. Since this
is synchronous, there is no need to print the command twice in a row, so
this patch deletes the latter one, leaving only the exit code to be
printed.
This patch also refactors the surrounding code to make it more readable.
Availability zone aware dhcp scheduler uses hosted agents list
to schedule dhcp agent to proper availability zone.
The scheduler can avoid scheduling the same availalibity zone as
agents host a network which should be distributed for HA.
Terry Wilson [Thu, 15 Oct 2015 23:50:40 +0000 (18:50 -0500)]
Add vhost-user support via ovs capabilities/datapath_type
Adds the ovs 'config' property which returns the contents of the
single row of the Open_vSwitch table. This gives access to certain
OVS capabilities such as datapath_types and iface_types.
Using this information in concert with the datapath_type config
option, vif details are calculated by the OVS mech driver. If
datapath_type == 'netdev' and OVS on the agent host is capable of
supporting dpdkvhostuser, then it is used.
Authored-By: Terry Wilson <twilson@redhat.com> Co-Authored-By: Sean Mooney <sean.k.mooney@intel.com>
Closes-Bug: #1506127
Change-Id: I5047f1d1276e2f52ff02a0cba136e222779d059c
Cedric Brandily [Wed, 21 Oct 2015 18:52:40 +0000 (20:52 +0200)]
Remove deprecated use_namespaces option
The use_namespaces option has been defined as a workaround to kernels
not properly supporting namespaces. This limitation is behind us, it's
time to remove use_namespaces after its deprecation in Kilo in order to
simplify code and remove a poorly tested case (use_namespaces=False).
This change prepares for removal pullup_route method[1] which was only
used when use_namespaces=False.
Eugene Nikanorov [Mon, 12 Oct 2015 09:59:01 +0000 (13:59 +0400)]
Resync L3, DHCP and OVS/LB agents upon revival
In big and busy clusters there could be a condition when
rabbitmq clustering mechanism synchronizes queues and during
this period agents connected to that instance of rabbitmq
can't communicate with the server and server considers them
dead moving resources away. After agent become active again,
it needs to cleanup state entries and synchronize its state
with neutron-server.
The solution is to make agents aware of their state from
neutron-server point of view. This is done by changing state
reports from cast to call that would return agent's status.
When agent was dead and becomes alive, it would receive special
AGENT_REVIVED status indicating that it should refresh its
local data which it would not do otherwise.
Elaborate how priorities are assigned to blueprints
Prioritizing is hard, and prioritizing in open source, let
alone Openstack, is even harder.
For this reason, this proposal attempts to clarify what priority
mean, how we prioritize in Neutron, in a way that's objective,
consistent, and reproducible. To start with, and make things slightly
simpler, we reduce the number of priority buckets we can choose from
to two: High and Low.
The way priorities are assigned is then based on a set of clearly defined
criteria: high priority work items are items that all core folks
collectively should care about because any failure in achieving tangible
result make them look bad. Low work items are great to have, but if they
slipped, it would be a shame but not the end of the world.
Hong Hui Xiao [Sun, 15 Nov 2015 09:06:45 +0000 (04:06 -0500)]
Don't add default route to HA router if there is no gateway ip
When adding an external network with no gateway ip to a HA router,
l3 agent will report exception. The exception comes from the code
of adding default route to HA router. However, if there is no
gateway ip in the external network, there is no need to add such
route.