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.
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 [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.
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.
Yalei Wang [Wed, 11 Nov 2015 15:50:20 +0000 (23:50 +0800)]
Add the missing arg of RetryRequest exception in _lock_subnetpool
RetryRequest exception defined in oslo.db need be called with a arg
which describes the inner exception. _lock_subnetpool method missed this
arg, and this patch adds it.
Eugene Nikanorov [Mon, 19 Oct 2015 13:41:32 +0000 (17:41 +0400)]
Avoid race condition for reserved DHCP ports
This patch introduces mechanism similar to compare-and-swap
for updating reserved DHCP port.
This addresses a case when two DHCP agents that start nearly at
the same time are assigned to one network and there is a reserved
DHCP port in the network. Then each of agents will try to use it
because agents don't check if reserved port is still available.
Reserved DHCP port can be acquired by different agent between calls to
get_active_networks and update_port, so this patch adds a check for
this case.
The lease duration isn't DHCP agent specific. DHCP is a feature that
should be provided by whatever plugin is loaded and operators would
still like to set lease times for DHCP.
In the reference implementation we just consume it directly in the
agent, but that doesn't mean it's specific to the agent implementation.
Bogdan Tabor [Wed, 7 Oct 2015 13:49:08 +0000 (15:49 +0200)]
Switch to using neutron.common.utils:replace_file()
neutron.agent.linux.utils:replace_file() and
neutron.common.utils:replace_file() have same functionality.
This is the 1st patch in the series of 4 patches.
It modifies neutron.common.utils:replace_file(),
so it can be used by all components as a replacement
for neutron.agent.linux.utils:replace_file().
New keyword parameter 'file_mode=0o644' is added
to neutron.common.utils:replace_file().
Ann Kamyshnikova [Wed, 21 Oct 2015 14:37:34 +0000 (17:37 +0300)]
Skip bindings with agent_id=None
To avoid having extra L3HARouterAgentPortBinding with l3_agent as None,
operation of setting l3_agent should be atomic.
For this purpose, transaction was added in methods
create_ha_port_and_bind and _bind_ha_router_to_agents in change
Iaad82fe522cfd70061daecf411c924fdc11b7e41
In case if router was just created and l3 agent was not scheduled yet,
so l3_agent_id is None, l3-agent-list-hosting-router <router> will fail.
This change makes it work by skipping binding with agent_id=None.
Oleg Bondarev [Wed, 28 Oct 2015 06:08:26 +0000 (15:08 +0900)]
Use admin context when requesting floating ip's router info
Currently it is possible for admin to create router and add any
tenant subnet to it, thus connecting the subnet to the external
network. In this case tenant user can assign floating ips to its
VMs though it does not own the router.
For proper notification we need to get router info using admin
context.