21141 Commits

Author SHA1 Message Date
Slawek Kaplonski
f4089680b5 Add missing step for ovs deploy guides
There was missing step about adding underlying interface to the
provider bridge in ovs deployment guides.
This patch adds this missing step.

Change-Id: I2ef5f12c469647d7f197cb5db71692e68d23f718
Closes-Bug: #1801361
2018-11-06 22:22:42 +00:00
Slawek Kaplonski
916e774516 Wait to ipv6 forwarding be really changed by L3 agent
In test test_ha_router_namespace_has_ipv6_forwarding_disabled
functional test it may happen that L3 agent will not change ipv6
forwarding and test fails because it checks that only once just
after router state is change to master.

This patch fixes that race by adding wait for 60 seconds to
ipv6 forwarding change.

Change-Id: I85a602561ebe9b7ab135913af49a3f010b09f196
Closes-Bug: #1801930
2018-11-06 15:40:34 +01:00
Boden R
3316b45665 use MAX_RETRIES from neutron-lib
The MAX_RETRIES constant from neutron.db.api is available in neutron-lib
and is already used by most of the code today. This patch changes the
remaining references over to use lib's constant and removes the
MAX_RETRIES from neutron.db.api

NeutronLibImpact

Change-Id: I79480daca9cca3d4e1504767d286aab22504e0b9
2018-11-06 07:40:05 -07:00
Zuul
c4f081d024 Merge "supported_vnic_type configurable for sriov" 2018-11-06 04:14:20 +00:00
Zuul
4afc4bf1de Merge "Add test cases to verify port number 0 for port_forwaring" 2018-11-06 03:20:10 +00:00
Zuul
75af9170a4 Merge "OVSNeutronAgent.rpc_loop is always called with "polling_manager"" 2018-11-05 23:53:29 +00:00
Slawek Kaplonski
a000fb0855 Update lower-constraints to meet neutron-lib
This patch updates minimal required versions of

oslo.concurrency
oslo.config

to be same as in neutron-lib.

Change-Id: I2a2f68731445634b2599f27b3146c1bff31cb0c9
2018-11-05 22:52:17 +01:00
Zuul
2a7079ddd1 Merge "notification: Add 'status' to agent after_create/update" 2018-11-05 21:25:10 +00:00
Rodolfo Alonso Hernandez
4f3cde2322 Use NetworkRBAC OVO in tests/unit/db/test_db_base_plugin_v2.py
Change-Id: I3655605ccb08cedd05e1da650d02a6aad1be6f9f
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2018-11-05 16:04:56 +00:00
LIU Yulong
f5842b304c Set router_id if floating IP has port_forwardings
Set floating IP's router_id when it has port_forwardings
during the update API.

Co-Authored-By: chenguobin <chengb@chinatelecom.cn>

Closes-Bug: #1799135
Change-Id: Idb1a52b6f32bdb18d920bce2b891b4d73c557dfb
2018-11-05 20:56:25 +08:00
Zuul
5fcfa3d874 Merge "Use NetworkRBAC OVO in neutron/db/external_net_db.py" 2018-11-05 12:45:33 +00:00
Lajos Katona
d860109bf6 supported_vnic_type configurable for sriov
Now supported_vnic_types is hardcoded to the mechanism drivers, but that
can depend on several factors, like type of the NIC, admin decision,
etc.
With this patch we put the right to decide which vnic types are
supported for ovs agent into the hands of the admin, by allowing
blacklisting items from the mechanism driver specific list.
Background: http://eavesdrop.openstack.org/meetings/neutron_qos/2018/
neutron_qos.2018-07-31-15.00.log.html#l-58

Change-Id: Iad9e2e966df53b4164d2a56a93215c69825b5241
Partial-Bug: #1578989
See-Also: https://review.openstack.org/502306 (nova spec)
See-Also: https://review.openstack.org/508149 (neutron spec)
2018-11-05 11:40:13 +01:00
Zuul
0587824123 Merge "Use NetworkRBAC OVO in neutron/db/db_base_plugin_v2.py" 2018-11-04 01:46:12 +00:00
Zuul
a6997efae6 Merge "Scan for MAC through all devices in macvtap agent" 2018-11-03 12:11:18 +00:00
Slawek Kaplonski
e9e374fa7d Increase timout of gate jobs
In patch [1] timeout for
- tempest-full
- tempest-full-py3
was increaced to 3h.
Unfortunatelly it was done only for check queue.
I forgot to do the same change for jobs in gate queue

This patch adds same change for gate queue.

[1] https://review.openstack.org/#/c/614423/

Change-Id: I263124aa732efea8295313aeff7697b91c00f3f4
2018-11-02 23:12:01 +01:00
LIU Yulong
c183781231 Add test cases to verify port number 0 for port_forwaring
Floating IP port forwarding internal or external port number should
not allow 0, otherwise you will get some ValueError exception in
neutron server.

Change-Id: I8bf8ed6f9c4b937743f8c0f998ee897e3af17459
Closes-Bug: #1799150
2018-11-02 15:41:48 +08:00
Zuul
5ad2bfdbfe Merge "iptables-restore wait period cannot be zero" 2018-11-02 01:05:20 +00:00
Zuul
2005700de4 Merge "Verify port_forwarding subnet and IP address both" 2018-11-01 23:13:25 +00:00
Zuul
8d338f2516 Merge "Update docs for disabling DNS server announcement" 2018-11-01 21:14:55 +00:00
Brian Haley
a58a527494 Scan for MAC through all devices in macvtap agent
The first device the agent happens to pick could be something
without a MAC address like a 6in6 interface. This was causing
the agent to fail to start if it was unlucky enough to pick
that address.

This patch just adjusts the logic to keep iterating through
the list until we find a MAC.

Change-Id: Iba9c7c3cb200e74a78ea885e8d9323de64c2c663
Closes-Bug: #1801030
2018-11-01 16:00:16 -04:00
Zuul
463db49a36 Merge "Increase tempest-full jobs timeout" 2018-11-01 19:57:46 +00:00
Slawek Kaplonski
5018d70241 Fix connection between 2 dvr routers
In case when 2 dvr routers are connected to each other with
tenant network, those routers needs to be always deployed
on same compute nodes.
So this patch changes dvr routers scheduler that it will create
dvr router on each host on which there are vms or other dvr routers
connected to same subnets.

Co-Authored-By: Swaminathan Vasudevan <SVasudevan@suse.com>

Closes-Bug: #1786272

Change-Id: I579c2522f8aed2b4388afacba34d9ffdc26708e3
2018-11-01 18:01:25 +01:00
Jens Harbott
698e6d475c Update docs for disabling DNS server announcement
The functionality allowing to disable DNS server announcement from the
DHCP agent for certain subnets was introduced in [0]. We should mention
this feature in the corresponding documentation.

[0] https://review.openstack.org/495781

Change-Id: I4adfa7ba789a59f967297ebb6c571deb0652c7ca
Related-Bug: 1311040
2018-11-01 11:15:01 +00:00
Zuul
4a4fa0db7f Merge "Block port update from unbound DHCP agent" 2018-11-01 01:11:53 +00:00
Zuul
6e98d52eb8 Merge "Fix incorrectly passing ext_ips as gateway ips" 2018-10-31 18:20:03 +00:00
Rodolfo Alonso Hernandez
84a9a5ec57 iptables-restore wait period cannot be zero
In case --wait (-w) parameter is zero, iptables-restore returns an
error.

Correct:
  [root@dev02 iptables]# iptables-restore -w 1 -W 20000 ipt

Incorrect:
  [root@dev02 iptables]# iptables-restore -w 0 -W 20000 ipt
  Option --wait-interval requires option --wait

Change-Id: I431fe6f637b963d61d81afed30a4fb1ec112d66c
Closes-Bug: #1800884
2018-10-31 17:01:48 +00:00
Kailun Qin
b70ee4df88 Block port update from unbound DHCP agent
Current DHCP port management in Neutron makes the server to clear the
device_id while the agent is responsible for setting it.

This may cause a potential race condition, for example during network
rescheduling. The server aims to clear the device_id on a DHCP port and
assign the network to another agent while the old agent might just be
taking possession of the port. If the DHCP agent takes possession of the
port (i.e., update port...set the device_id) before the server clears
it, then there is no issue. However, if this happens after the clear
operation by server then the DHCP port would be updated/marked to be
owned by the old agent.

When the new agent takes over the network scheduled to it, it won't be
able to find a port to reuse so that an extra port might need to be
created. This leads to two issues:
1) an extra port is created and never deleted;
2) the extra port creation may fail if there are no available IP
addresses.

This patch proposes a validation check to prevent an agent from updating
a DHCP port unless the network is bound to that agent.

Co-authored-by: Allain Legacy <Allain.legacy@windriver.com>

Closes-Bug: #1795126
Story: 2003919
Change-Id: Ie619516c07fb3dc9d025f64c0e1e59d5d808cb6f
2018-10-31 12:58:45 +00:00
Slawek Kaplonski
20800389f1 Increase tempest-full jobs timeout
For jobs:
- tempest-full
- tempest-full-py3

Sometimes we hit timeouts which aren't related
directly to Neutron.
So, as was done for some other jobs in [1] it will also
increase timeout for tempest-full jobs.

This patch adds also our own list of irrelevant files for
tempest-full-py3 job as it wasn't specified before.

[1] https://review.openstack.org/#/c/613234/

Change-Id: I6e56b5f9243cdc29e8a36399ae98f95173e61c98
2018-10-31 08:58:31 +01:00
Zuul
eb8759aa98 Merge "Introduce floating IP pool resource" 2018-10-30 06:54:59 +00:00
Zuul
03310bd9b0 Merge "Add neutron-status upgrade check command framework" 2018-10-30 04:57:24 +00:00
lizheng
f5d3a4159b Verify port_forwarding subnet and IP address both
Free subnet can not remove from router if other router's
subnets have port_forwarding. This patch fixed it by
checking the router interface subnet and IP address.

Co-Authored-By: LIU Yulong <i@liuyulong.me>
Closes-Bug: #1799140
Change-Id: Idace35126bb00139fa1f9f48be3aa3aab265b9d8
2018-10-30 10:31:38 +08:00
mid_one
221f386029 Fix incorrectly passing ext_ips as gateway ips
An event will be sent out after creating
router gateway. Within the event, ext_ips
is sent incorrectly while gw_ips is expected.
Project neutron-dynamic-routing subscribes
the topic and will process the event. But
it can't process ext_ips.

This commit gets the gw_ips through the
ext_ips and sends gw_ips out.

Co-Authored-By: Allain Legacy<Allain.legacy@windriver.com>

Change-Id: I9b67b58e87faa9cbb8ed4cd03c74f467ca20d73f
Closes-Bug: #1796629
2018-10-30 08:59:28 +08:00
Zuul
04c772a4cd Merge "Add capabilities for privsep" 2018-10-29 11:05:47 +00:00
Zuul
55be92e253 Merge "use context manager from neutron-lib" 2018-10-27 09:39:17 +00:00
Oleg Bondarev
32cc8b63d7 Add capabilities for privsep
CAP_DAC_OVERRIDE and CAP_DAC_READ_SEARCH were added
(like in nova) to fix agents on kernel 4.15.
Please see bug for details

Change-Id: Ieed6f5f6906036cdeaf2c3d96350eeae9559c0c7
Closes-Bug: #1800157
2018-10-26 18:03:52 +04:00
Lajos Katona
9b23e1be07 sriov-agent: fullstack test resource info report
Change-Id: Ibbe656707276d6c3c68b051e6d66d6d388dbfd18
Partial-Bug: #1578989
See-Also: https://review.openstack.org/502306 (nova spec)
See-Also: https://review.openstack.org/508149 (neutron spec)
2018-10-26 08:14:46 +00:00
Zuul
aefd805cca Merge "Event driven periodic resync task for DHCP agents" 2018-10-26 01:02:41 +00:00
Zuul
af2f660c2e Merge "remove unused db api functions" 2018-10-25 18:25:49 +00:00
Kailun Qin
1d98f0a7d4 Event driven periodic resync task for DHCP agents
The DHCP agent will resync its state with Neutron to recover from any
transient notification or RPC errors. Currently, the periodic resync
task waits on a timer to determine whether a re-sync is necessary. The
interval between attempts by default is 5 seconds and can be longer
thru config. This may cause a potentially long delay before an agent
gets new work via an agent_updated RPC call.

The idea of this RFE is to change the timer based periodic resync task
into an event driven one. It also proposes a new DHCP agent config
option "resync_throttle" to ensure the minimum interval taken between
resync state events to avoid too frequent resyncing. In this way, we
could force the agent to act on the resync request immediately therefore
decreasing how much time is needed before DHCP services are available.

Co-authored-by: Allain Legacy <Allain.legacy@windriver.com>

Closes-Bug: #1780370
Change-Id: Ie9d758ba5f750a38dc19ea5ce8b2c6b414f9ef80
2018-10-26 01:24:24 +08:00
Zuul
df94340f0f Merge "ovs-agent: fullstack test resource info report" 2018-10-25 14:19:34 +00:00
Bence Romsics
69d6b86f56 ovs/sriov mech drivers: resource_provider_uuid5_namespace
Set a UUID v5 namespace for the Open vSwitch mechanism driver and
another for the SR-IOV mechanism driver. These will be used to
deterministically generate Placement Resource Provider UUIDs.

Change-Id: I365a0aeefffe68bd7d5ba5f6697b814bf2713a19
Depends-On: https://review.openstack.org/586567
Partial-Bug: #1578989
See-Also: https://review.openstack.org/502306 (nova spec)
See-Also: https://review.openstack.org/508149 (neutron spec)
2018-10-25 15:34:06 +02:00
Bence Romsics
8bd5ecd4fc notification: Add 'status' to agent after_create/update
Make the same status information available to notification consumers
(resource==agent, event==after_create/after_update) as it was already
available where the notification is sent in class AgentDbMixin.

Change-Id: Ie74091da934c7e49fd29ae4c6f930a7eb47e14b2
Partial-Bug: #1578989
See-Also: https://review.openstack.org/502306 (nova spec)
See-Also: https://review.openstack.org/508149 (neutron spec)
2018-10-25 15:34:06 +02:00
Slawek Kaplonski
152364dbc8 Add neutron-status upgrade check command framework
This adds basic framework for neutron-status upgrade check commands.

For now it has only "check_nothing" check implemented.
Real checks can be added to this tool in the future.

Depends-On: https://review.openstack.org/#/c/610061/

Change-Id: Ib08119e1bb8de80856edb6a39769d4bc9d98c587
Story: 2003657
Task: 26144
2018-10-25 12:11:27 +02:00
Zuul
b5fbac8ec8 Merge "[Functional] Increase test_timeout for db migration tests" 2018-10-25 03:38:36 +00:00
Zuul
2fbe2f260b Merge "Revert "Add openstack/placement as a required project for neutron-grenade*"" 2018-10-24 21:54:37 +00:00
Zuul
f72f45c60e Merge "Increase tempest jobs timeout" 2018-10-24 21:39:19 +00:00
Boden R
029f77e96c remove unused db api functions
There are a handful of functions in neutron.db.api that are no longer
used due to the consumption of the db api from neutron-lib. This patch
removes them.

Removed:
- _copy_if_lds()
- add_to_rel_load_list()
- load_one_to_manys()
- LOG

Renamed:
- expire_for_fk_change is now named _expire_for_fk_change to indicate
it's private and should not be used by consumers.

NeutronLibImpact

Change-Id: Icbdad6712345d04b0b45194422cbe0813cd7e1e4
2018-10-24 13:12:41 -06:00
Rodolfo Alonso Hernandez
60c50d9296 OVSNeutronAgent.rpc_loop is always called with "polling_manager"
Furthermore, "polling_manager" cannot be retrieved like in [1].
"get_polling_manager" is a generator and must be used within a
context manager.

[1] e5726c7bda/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py (L2074-L2076)

Change-Id: I7a704f63fbfee770ee214e5f233134d17ff2d7a1
Closes-Bug: #1799748
2018-10-24 17:51:59 +00:00
Zuul
e5726c7bda Merge "sriov-agent: Report resource info in heartbeat" 2018-10-24 16:27:31 +00:00
Boden R
e4aa5902f7 use context manager from neutron-lib
The neutron.db.api.context_manager already references neutron-lib's
context manager; so consumers of it are already using neutron-lib. This
patch switches neutron's references to the context_manager over to
use neutron-lib's directly rather than that in neutron.db.api.

NeutronLibImpact

Change-Id: I97120faeec73690592ed21a5ec3c6202f61e1429
2018-10-24 07:18:46 -06:00