20953 Commits

Author SHA1 Message Date
OpenDev Sysadmins
1214e59cc2 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:39:02 +00:00
Zuul
1088d4b2d8 Merge "neutron.conf needs lock_path set for router to operate This change is adding required configuration in neutron.conf to set the lock_path parameter, which was missing in compute-install-ubuntu.rst" into stable/rocky 2019-04-18 19:40:02 +00:00
Zuul
5e88181198 Merge "Do not call update_device_list in large sets" into stable/rocky 2019-04-17 19:23:25 +00:00
Zuul
d3cd720140 Merge "DVR: Correctly change MTU in fip namespace" into stable/rocky 2019-04-17 03:51:37 +00:00
Zuul
e01ee585d8 Merge "Avoid loading same service plugin more than once" into stable/rocky 2019-04-17 01:54:06 +00:00
Zuul
7a3d943fcd Merge "Add dependency for service plugin" into stable/rocky 2019-04-17 01:54:03 +00:00
Zuul
86b0a58641 Merge "Prevent bind fip to port has port forwarding" into stable/rocky 2019-04-16 15:51:13 +00:00
Zuul
be3fc4bb5e Merge "Make test service_plugins override simple" into stable/rocky 2019-04-16 15:51:02 +00:00
SapanaJadhav
bdeae63365 neutron.conf needs lock_path set for router to operate
This change is adding required configuration in neutron.conf
to set the lock_path parameter, which was missing in
compute-install-ubuntu.rst

Change-Id: If090bdf060dfe21d11b1a5dfd010dc8167d9e45e
Closes-Bug: #1796976
(cherry picked from commit f4d438019e3bd2f9b6c64badb9533168e583d8af)
2019-04-16 14:27:25 +00:00
Zuul
f9a08b5c99 Merge "Set router_id if floating IP has port_forwardings" into stable/rocky 2019-04-15 22:11:09 +00:00
Zuul
622a494023 Merge "Choose random value for HA routes' vr_id" into stable/rocky 2019-04-15 22:09:53 +00:00
Zuul
b398bd450c Merge "Change default local ovs connection timeout" into stable/rocky 2019-04-15 20:55:34 +00:00
LIU Yulong
5d705468de Do not call update_device_list in large sets
Ovs-agent can process the ports in large sets, then all
of these ports will have to update DB status or attributes.
But neutron server is centralized. It may have to do
something else, or the database processing can be also
time-consuming. Because of these, it sometimes returns
the RPC timeout exception to ovs-agent. And a fullsync
will be triggered in next rpc loop. The restart time is
becoming longer and longer.

Adds a default step to update the port to reduce
the probability of RPC timeout.

Related-Bug: #1813703
Related-Bug: #1813704
Related-Bug: #1813706
Related-Bug: #1813707

Change-Id: Ie37f4a4869969e235ce16b73cdfcbdc98626823e
(cherry picked from commit 8408af4f173a0ffde354599e26c49bf9e17e8bef)
(cherry picked from commit d7d30ea950844f11348fa2827908622e3a8c7dfb)
2019-04-12 15:42:45 +00:00
Slawek Kaplonski
fb0c062899 Avoid loading same service plugin more than once
In patch [1] requirement that only each service plugin
can be loaded only once was removed.
Unfortunatelly it is not possible that same service plugin
will be instantiate more than once because it may reqister some
callbacks or other things which can't be duplicated.

So this patch adds mechanism which will ensure that each service
plugin class is instantiate only once and reused if necessary.

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

Closes-Bug: #1816771

Change-Id: Ie6e6cc1bbbe50ff7cfad4e8033e48711569ea020
(cherry picked from commit d802fad8a92625005597ebda4931b0bbe13418e9)
2019-04-12 08:33:38 +00:00
LIU Yulong
2331e5fefc Add dependency for service plugin
Adds a required list 'required_service_plugins' to each service plugin,
then we can initialize the service plugin with required dependency.
And also adds the 'router' plugin to port forwarding service plugin
required list.

Conflicts:
    neutron/tests/unit/extensions/test_floating_ip_port_forwarding.py

Closes-Bug: #1809238
Change-Id: I53fdaee0cd96a5315a7abc39799657d613eb3a2e
(cherry picked from commit e8b7e768a2545621ee98511b8dd271c5117f76bd)
2019-04-12 08:33:27 +00:00
LIU Yulong
087e8f6bee Prevent bind fip to port has port forwarding
If one port has port forwarding and the port is under
a dvr router, then binding floating IP to this port
will not be allowed.

Change-Id: Ia014e18264b43cf751a5bc0e82bc55d106582620
Closes-Bug: #1799138
(cherry picked from commit 433228dd78098ca84a13c75b9dc5ce40f43c7f9d)
2019-04-12 08:33:09 +00:00
LIU Yulong
21bbe03619 Make test service_plugins override simple
Just make things simple and give a chance to accept that
ordered 'service_plugins' list or tuple for the base test
class NeutronDbPluginV2TestCase.

Change-Id: I7c352ede811703e3a96848378b92cbbf5e109228
Related-Bug: #1809238
(cherry picked from commit 76c28812013c558041612609efe30b88a5226267)
2019-04-12 08:32:57 +00:00
Slawek Kaplonski
ee2ed681c4 Choose random value for HA routes' vr_id
HA routers are using keepalived and needs to have virtual_router_id
configured. As routers which belongs to same tenant are using same
ha network, those values have to be different for each router.

Before this patch this value was always taken as first available value
from available_vr_ids range.
In some (rare) cases, when more than one router is created in parallel
for same tenant it may happen that those routers would have same vr_id
choosen so keepalived would treat them as single application and only
one router would be ACTIVE on one of L3 agents.

This patch changes this behaviour that now random value from available
vr_ids will be chosen instead of taking first value always.
That should mittigate this rare race condition that it will be (almost)
not noticable for users.

However, proper fix should be probably done as some additional
constraint in database layer. But such solution wouldn't be possible to
backport to stable branches so I decided to propose this easy patch
first.

Change-Id: Idb0ed744e54976dca23593fb2d7317bf77442e65
Related-Bug: #1823314
(cherry picked from commit a8d0f557d504957aeb91f451105cca9eee2d6adb)
2019-04-12 06:57:44 +00:00
Brian Haley
f71767bd02 DVR: Correctly change MTU in fip namespace
The code that ensures the fpr/rfp veth pair exists
between the qrouter and fip namespace was only setting
the mtu of the devices if it had to create them.  Set
it all the time to support the mtu being changed.

Change-Id: I176b5f4d4f12cf09f930e2c1944e98082a09bcc6
Closes-bug: #1823798
(cherry picked from commit 6ded6d217adf61216fb10383d0150c966b92f11c)
2019-04-12 06:27:23 +00:00
Zuul
65bee80deb Merge "Handle DBConnectionError in skip_if_timeout decorator" into stable/rocky 2019-04-12 05:08:42 +00:00
Slawek Kaplonski
14ed5515b9 Handle DBConnectionError in skip_if_timeout decorator
In some cases it may happen that when db test will fail due
to timeout oslo_db.exception.DBConnectionError will be raised
instead of sqlalchemy_exc.InterfaceError.
This patch adds handling such case in skip_if_timeout decorator.

Change-Id: I7350d5c884784317c94ff42f28526065ff399b40
Related-Bug: #1687027
(cherry picked from commit b7458b615972dc6ff93a12abbd0a8f32e8da55eb)
2019-04-11 07:21:52 +00:00
Doug Wiegley
0e71c29155 Fix regression with SG read API with empty ruleset
Used to be, we would return an empty list. Now, as of change
https://review.openstack.org/#/c/630401/, we don't return the
field at all. That's an API regression.

Go back to returning an empty list.

Change-Id: I295076155eea518152e2479f93f3cf1ea811a207
(cherry picked from commit cc4d5a2561ae31b94131dfcb7785594dc10052c8)
2019-04-11 05:11:03 +00:00
Zuul
2f4286890a Merge "Not set fip to ERROR if it exists on device" into stable/rocky 2019-04-10 19:54:38 +00:00
LIU Yulong
8f93410716 Not set fip to ERROR if it exists on device
The centralized floating IP can exist on the router device
due to some reasons like: uncleaned fip addr, and especially
multiple IP addr adding action: HA router _add_vip() and
Edge router add_ip_address().
This patch catches the IpAddressAlreadyExists error if fip
was already set on the device, and still process next step.

Change-Id: I324f6b96baa0520a0f7ef62a83d81864d7b27999
Closes-Bug: #1811213
(cherry picked from commit 4d45699f155a6aa5732c27b572d3288963638ee3)
2019-04-09 22:38:46 +00:00
Zuul
31a48bea86 Merge "Divide-and-conquer local bridge flows beasts" into stable/rocky 13.0.3 2019-04-09 13:20:27 +00:00
Zuul
7c6ab61492 Merge "Divide-and-conquer security group beasts" into stable/rocky 2019-04-09 07:06:24 +00:00
Zuul
5003c0ac98 Merge "Don't pass None arg to neutron-keepalived-state-change" into stable/rocky 2019-04-09 05:53:37 +00:00
Zuul
41bce47452 Merge "Fix KeyError in OVS firewall" into stable/rocky 2019-04-08 21:29:27 +00:00
Zuul
b6d1cf0511 Merge "Fix slow SG api calls when limiting fields" into stable/rocky 2019-04-08 14:20:57 +00:00
Zuul
f907f716dc Merge "OVS agent: always send start flag during initial sync" into stable/rocky 2019-04-08 11:28:05 +00:00
Zuul
8944a0275c Merge "Improve port dhcp Provisioning" into stable/rocky 2019-04-07 17:11:50 +00:00
Zuul
5dff70ceaf Merge "More accurate agent restart state transfer" into stable/rocky 2019-04-07 14:07:45 +00:00
Edward Hope-Morley
279c99ab7d Don't pass None arg to neutron-keepalived-state-change
The original fix for bug 1818614 added two new cli args
when spawning neutron-keepalived-state-change but if
e.g. self.agent_conf.AGENT.root_helper_daemon is unset
then "None" string is passed which breaks the
neutron-keepalived-state-change daemon.

Change-Id: I4afcdbbf2f3d2dafcad241ba3fc0778b52b8fc85
Related-Bug: #1818614
Related-Bug: #1823038
(cherry picked from commit afbbec83a2578aac6aa0f16c205c5da3a788969b)
(cherry picked from commit a7df1c458c1fcfee03abfff7e2dd5994eca3f91e)
2019-04-07 11:14:29 +01:00
Zuul
ff45f783e6 Merge "Try to enable dnsmasq process several times" into stable/rocky 2019-04-07 02:36:44 +00:00
Zuul
cf9722a9a2 Merge "Remove conntrack rule when FIP is deleted" into stable/rocky 2019-04-07 00:09:55 +00:00
Zuul
452921df3d Merge "Add enforcer logic for neutron policy" into stable/rocky 2019-04-07 00:09:49 +00:00
Zuul
ac286841c4 Merge "[OVS] Exception message when retrieving bridge-id and is not present" into stable/rocky 2019-04-06 20:51:46 +00:00
Zuul
956cfe7765 Merge "[Functional tests] Change way how conntrack entries are checked" into stable/rocky 2019-04-06 17:03:09 +00:00
yangjianfeng
056e049e2b Improve port dhcp Provisioning
Currently, the dhcp Provisioning of ports is the crucial bottleneck
of that concurrently boot multiple VM.

The root cause is that these ports will be processed one by one by dhcp
agent when they belong to the same network, And the 'Provisioning complete'
port is still blocked other port's processing in other dhcp agents. The
patch aim to optimize the dispatch strategy of the port cast to agent to
improve the Provisioning process.

In server side, I classify messages to multi levels. Especially, I classify
the port_update_end or port_create_end message to two levels, the high-level
message only cast to one agent, the low-level message cast to all agent. In
agent side I put these messages to `resource_processing_queue`, with the queue,
We can delete `_net_lock` and process these messages in order of priority.

Additonally, I modified the `resource_processing_queue` for my demand. I update
`_queue` from LIST to PriorityQueue in `ExclusiveResourceProcessor`, by this
way, we can sort all message which cached in `ExclusiveResourceProcessor` by
priority.

Conflicts:
    neutron/tests/unit/agent/dhcp/test_agent.py

Related-Bug: #1760047
Change-Id: I255caa0571c42fb012fe882259ef181070beccef
(cherry picked from commit 99f4495c940011293e3cabbb590770dc1e7b6900)
2019-04-06 07:32:01 +00:00
LIU Yulong
ef8ecef922 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
(cherry picked from commit f5842b304c3f24c9cdc8555664155fb4127b0809)
2019-04-06 07:31:54 +00:00
Slawek Kaplonski
1d81086f55 Try to enable dnsmasq process several times
Sometimes, during restart of dnsmasq process it may happend that
after process is killed, start attempt is made too fast, before
old process really unbind from IP address on which it was listening.
That causes an issue with starting dnsmasq process again.

In patch [1] disable() method was changed that it can wait
until process is really not active (no pid for it) but that didn't
solve the problem with starting a new dnsmasq process completely and
sometimes it still happens, at least in functional tests.

So now, enable() method is changed so that it will try to enable
dnsmasq process for 1 minute, until it will really be spawned properly.

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

Change-Id: I18d73b787fa3ab8803e12d5e5eb2bb7109205aba
Closes-Bug: #1811126
(cherry picked from commit 157e09e6af758b7669fbe5a8cdb0b1969f04661a)
2019-04-06 07:31:29 +00:00
Slawek Kaplonski
289f66bd74 [Functional tests] Change way how conntrack entries are checked
In netlink_lib functional tests module there are listed conntrack
entries and those entries are assert to some expected list.
It may happen that sometimes some additional entries from other
tests will also be in the list and that cause failures of
netlink_lib tests.

So this patch changes way how those assertions are done. For now
it will check if each of expected entries is in entries list and
in case of delete entries tests, it will also check if any of
deleted entries isn't actually in list.

Change-Id: I30c18f141a8356b060902e6493ba0657b21619ad
Closes-Bug: #1817295
(cherry picked from commit 798c6c731fc5872ade8b5eb1f571a2c002c8c0fb)
2019-04-06 07:31:23 +00:00
Rodolfo Alonso Hernandez
7590f3f591 Specify tenant_id in TestRevisionPlugin objects
In order to avoid interferences between other tests, the objects
created in TestRevisionPlugin will be created for random
tenant IDs, generated during the execution of each test.

Change-Id: Ica7fe2379c7b1ce516ae7b0cd3959cff88a0b895
Closes-Bug: #1819740
(cherry picked from commit 44382ac446d32e6300a732f968be0fbc843630e2)
2019-04-06 07:31:18 +00:00
Rodolfo Alonso Hernandez
f7262f5280 [OVS] Exception message when retrieving bridge-id and is not present
In the OVS agent, when setting up the ancillary bridges, the parameter
external_id:bridge-id is retrieved. If this parameter is not defined
(e.g.: manually created bridges), ovsdbapp writes an error in the logs.
This information is irrelevant and can cause confusion during debugging time.

Change-Id: Ic85db65f651eb67fcb56b937ebe5850ec1e8f29f
Closes-Bug: #1815912
(cherry picked from commit 769e9712936187b48984d7ab73bd7e6611ef4b60)
2019-04-06 07:31:11 +00:00
Doug Wiegley
97bf23244d
Fix slow SG api calls when limiting fields
Relating to the issue with creating rules, when reading security
groups, it is very slow. Even when limiting to id/name, it pulls
in all rules before returning just id/name.

This change looks at the fields requested, and if no "synthetic"
fields are in the list, skips initializing those.

Co-Authored-By: Hongbin Lu<hongbin.lu@huawei.com>
Closes-Bug: #1810563
Change-Id: Id6870633e3943666e9b7fb900ad2d0894ee2715d
2019-04-05 20:36:28 -06:00
Zuul
10de9ff017 Merge "Check if process' cmdline is "space separarated"" into stable/rocky 2019-04-05 22:18:51 +00:00
Zuul
9aa59d4dba Merge "Rename router processing queue code to be more generic" into stable/rocky 2019-04-05 21:24:04 +00:00
Zuul
3a1a394762 Merge "Set lower addr to avoid IP out of range" into stable/rocky 2019-04-05 21:10:48 +00:00
Oleg Bondarev
6b9d8bf308 OVS agent: always send start flag during initial sync
In order to avoid inaccurate agent_boot_time setting,
this patch suggests to consider agent as "started" only
after completion of initial sync with server.

Change-Id: Icba05288889219e8a606c3809efd88b2c234bef3
Closes-Bug: #1799178
(cherry picked from commit 8f20963c5b9e6762b6322f686bce99871bec6be9)
2019-04-05 17:52:54 +00:00
LIU Yulong
26a9765afb Change default local ovs connection timeout
Large number of flows can cause local ovs connection
timeout. Ultimately getting succeed will be better
than a retry or fullsync.

Related-Bug: #1813703
Related-Bug: #1813705
Related-Bug: #1813707
Related-Bug: #1813709

Change-Id: Ifa0608a7e131df3cad2f7727426720afce641a58
(cherry picked from commit 64ea642359e8f8aee2ebe494e037ecdfe8cf1b2c)
2019-04-05 17:32:03 +00:00