471 Commits

Author SHA1 Message Date
Radosław Piliszek
cf918fbc29 Fix native openvswitch firewall driver in neutron-openvswitch-agent
ovs-ofctl is still being run by neutron-openvswitch-agent.
Potential removal is scheduled for Victoria.
Until then, we have to mount /run/openvswitch in there.

Change-Id: Ia73b5665cece523bb822f6a223335f6fae94fb6a
Closes-bug: #1867506
2020-03-16 19:36:40 +00:00
Zuul
2a2ce059dc Merge "Add notify restart container when cert changed" 2020-03-10 12:12:55 +00:00
yj.bai
d3cc2f670e Add notify restart container when cert changed
When change the cert file in /etc/kolla/certificate/.
The certificate in the container has not changed.
So I think can use kolla-ansible deploy when certificate is
changed. restart <container>

Partially-Implements: blueprint custom-cacerts

Change-Id: Iaac6f37e85ffdc0352e8062ae5049cc9a6b3db26
Signed-off-by: yj.bai <bai.yongjun@99cloud.net>
2020-03-10 16:23:09 +08:00
Radosław Piliszek
266fd61ad7 Use "name:" instead of "role:" for *_role modules
Both include_role and import_role expect role's name to be given
via "name" param instead of "role".
This worked but caused errors with ansible-lint.
See: https://review.opendev.org/694779

Change-Id: I388d4ae27111e430d38df1abcb6c6127d90a06e0
2020-03-02 10:01:17 +01:00
Zuul
542312d9cd Merge "Add /run/netns bindmount to Neutron containers" 2020-02-28 12:39:54 +00:00
Michal Nasiadka
61a59e015f Add /run/netns bindmount to Neutron containers
Closes-Bug: #1864856
Change-Id: I725eeb18a22b3fa7838f16761d19f7e699ab5e82
2020-02-27 20:53:57 +00:00
Radosław Piliszek
1d30d71d97 Fix neutron-metadata-agent to use provided CA for Nova metadata
Change-Id: I48148c56079a2998a8f8606ecd1f185f68733a6d
Partially-implements: blueprint custom-cacerts
2020-02-25 21:34:48 +01:00
Radosław Piliszek
7c200db70e Fix client TLS in neutron-metadata-agent
Backport to: Train.

Change-Id: Ide96ea43739d47e623026f0aecd4163f3a2abe7f
Closes-bug: #1864615
2020-02-25 21:30:56 +01:00
Zuul
7130b8e040 Merge "Remove useless neutron-linuxbridge-agent env vars" 2020-02-24 16:25:06 +00:00
Radosław Piliszek
c0eb07ddcb Remove useless neutron-linuxbridge-agent env vars
Change-Id: Ic14d565d155fda223ad2768ee6e1b3fcf85a6003
2020-02-21 20:24:41 +00:00
Michal Nasiadka
227008cf68 Change /run bind mount for neutron/openvswitch
Currently we have a very wide /run mount for all Neutron/OVS services,
which allows sudo/rootwrap to contact with the hosts dbus - all symptoms
are documented in the related bug.

Since we use tcp connections to OVS from Neutron agents - removing
bind mounts.

Closes-Bug: #1861792

Change-Id: Ifee4bec7b2e9ef4e2d624b1411f1a9e6332325c6
2020-02-20 09:09:12 +01:00
Zuul
b3c8ff59f1 Merge "Copy CA into containers." 2020-02-07 17:25:01 +00:00
Mark Goddard
5a786436be Python 3: Use distro_python_version for dev mode
In dev mode currently the python source is mounted under python2.7
site-packages. This change fixes this to use the distro_python_version
variable to ensure dev mode works with Python 3 images.

Change-Id: Ieae3778a02f1b79023b4f1c20eff27b37f481077
Partially-Implements: blueprint python-3
2020-01-30 14:00:34 +00:00
James Kirsch
511ba9f6a2 Copy CA into containers.
When kolla_copy_ca_into_containers is set to "yes", the Certificate
Authority in /etc/kolla/certificates will be copied into service
containers to enable trust for that CA. This is especially useful when
the CA is self signed, and would not be trusted by default.

Partially-Implements: blueprint custom-cacerts

Change-Id: I4368f8994147580460ebe7533850cf63a419d0b4
2020-01-28 14:03:32 -08:00
Zuul
5126087af5 Merge "CentOS 8: Support variable image tag suffix" 2020-01-21 09:29:58 +00:00
James Kirsch
c15dc20341 Configure services to use Certificate Authority
Include a reference to the globally configured Certificate Authority to
all services. Services use the CA to verify HTTPs connections.

Change-Id: I38da931cdd7ff46cce1994763b5c713652b096cc
Partially-Implements: blueprint support-trusted-ca-certificate-file
2020-01-13 11:00:11 -08:00
Mark Goddard
9755c924be CentOS 8: Support variable image tag suffix
For the CentOS 7 to 8 transition, we will have a period where both
CentOS 7 and 8 images are available. We differentiate these images via a
tag - the CentOS 8 images will have a tag of train-centos8 (or
master-centos8 temporarily).

To achieve this, and maintain backwards compatibility for the
openstack_release variable, we introduce a new 'openstack_tag' variable.
This variable is based on openstack_release, but has a suffix of
'openstack_tag_suffix', which is empty except on CentOS 8 where it has a
value of '-centos8'.

Change-Id: I12ce4661afb3c255136cdc1aabe7cbd25560d625
Partially-Implements: blueprint centos-rhel-8
2020-01-10 09:56:04 +00:00
Zuul
6c297e54c4 Merge "[neutron] Adjust neighbour table thresholds" 2019-12-16 11:19:26 +00:00
Jan Vondra
59b058e23d Neutron: Added loading ip6_tables kernel module
ip6_tables is needed for HybridFwDriver

Change-Id: I66c50b74a89c046dc59e59dd2422a80e0642ab72
2019-12-09 16:26:13 +00:00
Zuul
734e86a02f Merge "Split out OVS/Linuxbridge agent configs from ml2_conf.ini" 2019-11-27 18:14:43 +00:00
Pierre Riteau
4234cc4b5b [neutron] Adjust neighbour table thresholds
When clouds have a large number of hosts, the default size of the ARP
cache is too small. The cache can overflow, which means that the system
has no way to reach some IP addresses.

Increasing threshold limits addresses the situation, in a reasonably
safe way (the maximum impact is 5MB or so of additional RAM used).

More context on this issue:

* http://man7.org/linux/man-pages/man7/arp.7.html
* https://bugs.launchpad.net/charm-nova-compute/+bug/1780348
* https://bugs.launchpad.net/fuel/+bug/1488938
* https://bugs.launchpad.net/tripleo/+bug/1690087
* 0583a0c949
* 3dd21ea62a
* 1651a1805a

Change-Id: I60c871e8eb9f2c086818ff077987f2390930800c
Closes-Bug: #1844349
2019-11-27 16:32:47 +01:00
Michal Nasiadka
0947974ff6 Split out OVS/Linuxbridge agent configs from ml2_conf.ini
Change-Id: I799993728112a525e34cfbc4e786a10f0ed03be9
2019-11-27 13:42:48 +00:00
Pierre Riteau
c697dc98bc Remove endpoint_type from neutron.conf [DEFAULT] group
This option appears to have been removed in 2015 in Neutron change
I9cf36e1fd3a009c175e0d475af407a30f4e5c408.

Change-Id: Ib2d94743aeeff328c900ab1607900844acb4462b
2019-11-25 12:02:55 +01:00
Zuul
25e98f9047 Merge "Change local_action to delegate_to: localhost" 2019-11-22 18:35:54 +00:00
Michal Nasiadka
1009931162 Change local_action to delegate_to: localhost
As part of the effort to implement Ansible code linting in CI
(using ansible-lint) - we need to implement recommendations from
ansible-lint output [1].

One of them is to stop using local_action in favor of delegate_to -
to increase readability and and match the style of typical ansible
tasks.

[1]: https://review.opendev.org/694779/

Partially implements: blueprint ansible-lint

Change-Id: I46c259ddad5a6aaf9c7301e6c44cd8a1d5c457d3
2019-11-22 15:04:44 +00:00
Zuul
22cc65aafc Merge "Allow region setting for ironic-neutron-agent" 2019-11-22 12:21:21 +00:00
Zhuo Zhen
7f457cd928 Allow region setting for ironic-neutron-agent
The "os_region" param is missing in the ironic_neutron_agent.ini.j2
file. Without specifying the region, the neutron service will randomly
pick a region for the ironic-neutron-agent. Therefore, a list of
incorrect agents might be created in the neutron database "agents"
table for nodes from other regions. To list all neutron agents, use
'openstack network agent list'.

Change-Id: Idec265230d0ab63b7559d94690c059608dc2617e
Closes-bug: #1853464
2019-11-21 08:48:18 -06:00
Michal Nasiadka
865ac24fc5 Remove Neutron integration with ONOS
Change-Id: Ie35ea07b8b6f95cbb56eb722ae2366c00243e562
2019-11-18 15:39:19 +00:00
Zuul
c4818ffd16 Merge "Remove OpenDaylight role" 2019-11-18 15:30:39 +00:00
Michal Nasiadka
eec6831fff Remove OpenDaylight role
Opendaylight support has been deprecated in Train - time to remove it.

Change-Id: I3a61bfbcbf366c327ea3e25d2424bc3fedca29f0
2019-11-18 11:57:32 +00:00
Mark Goddard
0bd60388a8 Remove transitional support for neutron-lbaas removal
Support for deploying neutron-lbaas was removed in the Train release. We
no longer need the task to remove the container in the upgrade process.

Change-Id: Ie336f68c710616de29f34dd4011e137ec056973b
2019-11-14 11:48:56 +00:00
Mark Goddard
1f1f01f27f Fix playbooks for Ansible 2.9
The version_compare filter was renamed to version and changed to be a
test in 2.5. The old filter was removed in 2.9.

TrivialFix

Change-Id: Ib5d91b5fc53d0f6d16dd6eb38121cd9914e33d93
2019-11-01 09:34:18 +00:00
Will Szumski
ae5acc7f3c Limit open file descriptors for Neutron agent containers
See https://bugs.launchpad.net/oslo.rootwrap/+bug/1760471, in particular
comment #1 for an explanation of why inheriting the defaults of the
docker daemon can cause poor performance:

The performance difference likely comes from close_fds=True of subprocess.
Popen. On Python 2, Popen calls close(fd) on all file descriptors from 3 to
SC_OPEN_MAX. On my Fedora 27 "host", SC_OPEN_MAX is 1,024. But in docker,
SC_OPEN_MAX is... 1,048,576: 1,000x larger. On Python 3, Popen is smarter. On
Linux, it lists the content of /proc/self/fd/ to only close open file
descriptors. It doesn't depend on SC_OPEN_MAX value.

Change-Id: Iefef6039644192420abbd3bf614329cbc0d9a62a
Closes-Bug: #1848737
Related-Bug: #1760471
Related-Bug: #1757556
Related-Bug: #1824020
2019-10-21 13:36:11 +00:00
Zuul
5aa77e5457 Merge "Neutron: add support to use legacy iptables" 2019-10-18 05:53:21 +00:00
Zuul
dffbfd6c6d Merge "Fixes missing boolean for Neutron FWaaS" 2019-10-17 14:04:22 +00:00
Jan Vondra
e54edb55e4 Neutron: add support to use legacy iptables
neutron_legacy_iptables option sets the KOLLA_LEGACY_IPTABLES
environment variable in the neutron-l3-agent, neutron-linuxbridge-agent
and neutron_openvswich_agent container where it should be consumed
by kolla_extended_start script resulting in setting iptables-legacy.

Depends-On: https://review.opendev.org/#/c/683679/
Change-Id: Iaa8b46a2227b61a729b8d54bbe4b20f389f251d1
2019-10-17 09:42:00 +00:00
Dincer Celik
0346dc124e Fixes missing boolean for Neutron FWaaS
The missing boolean breaks Neutron FWaaS deployment.

Change-Id: I169246a6ce8b15af76fd84b32029437016bd3c42
Closes-Bug: #1847562
2019-10-16 14:21:52 +03:00
Radosław Piliszek
bc053c09c1 Implement IPv6 support in the control plane
Introduce kolla_address filter.
Introduce put_address_in_context filter.

Add AF config to vars.

Address contexts:
- raw (default): <ADDR>
- memcache: inet6:[<ADDR>]
- url: [<ADDR>]

Other changes:

globals.yml - mention just IP in comment

prechecks/port_checks (api_intf) - kolla_address handles validation

3x interface conditional (swift configs: replication/storage)

2x interface variable definition with hostname
(haproxy listens; api intf)

1x interface variable definition with hostname with bifrost exclusion
(baremetal pre-install /etc/hosts; api intf)

neutron's ml2 'overlay_ip_version' set to 6 for IPv6 on tunnel network

basic multinode source CI job for IPv6

prechecks for rabbitmq and qdrouterd use proper NSS database now

MariaDB Galera Cluster WSREP SST mariabackup workaround
(socat and IPv6)

Ceph naming workaround in CI
TODO: probably needs documenting

RabbitMQ IPv6-only proto_dist

Ceph ms switch to IPv6 mode

Remove neutron-server ml2_type_vxlan/vxlan_group setting
as it is not used (let's avoid any confusion)
and could break setups without proper multicast routing
if it started working (also IPv4-only)

haproxy upgrade checks for slaves based on ipv6 addresses

TODO:

ovs-dpdk grabs ipv4 network address (w/ prefix len / submask)
not supported, invalid by default because neutron_external has no address
No idea whether ovs-dpdk works at all atm.

ml2 for xenapi
Xen is not supported too well.
This would require working with XenAPI facts.

rp_filter setting
This would require meddling with ip6tables (there is no sysctl param).
By default nothing is dropped.
Unlikely we really need it.

ironic dnsmasq is configured IPv4-only
dnsmasq needs DHCPv6 options and testing in vivo.

KNOWN ISSUES (beyond us):

One cannot use IPv6 address to reference the image for docker like we
currently do, see: https://github.com/moby/moby/issues/39033
(docker_registry; docker API 400 - invalid reference format)
workaround: use hostname/FQDN

RabbitMQ may fail to bind to IPv6 if hostname resolves also to IPv4.
This is due to old RabbitMQ versions available in images.
IPv4 is preferred by default and may fail in the IPv6-only scenario.
This should be no problem in real life as IPv6-only is indeed IPv6-only.
Also, when new RabbitMQ (3.7.16/3.8+) makes it into images, this will
no longer be relevant as we supply all the necessary config.
See: https://github.com/rabbitmq/rabbitmq-server/pull/1982

For reliable runs, at least Ansible 2.8 is required (2.8.5 confirmed
to work well). Older Ansible versions are known to miss IPv6 addresses
in interface facts. This may affect redeploys, reconfigures and
upgrades which run after VIP address is assigned.
See: https://github.com/ansible/ansible/issues/63227

Bifrost Train does not support IPv6 deployments.
See: https://storyboard.openstack.org/#!/story/2006689

Change-Id: Ia34e6916ea4f99e9522cd2ddde03a0a4776f7e2c
Implements: blueprint ipv6-control-plane
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-10-16 10:24:35 +02:00
Zuul
87e671c6b4 Merge "Add a job that *only* deploys updated containers" 2019-09-30 13:19:28 +00:00
ZijianGuo
1171a8d552 Remove deprecated option 'ovsdb_interface'
The deprecated ovsdb_interface configuration option has been removed,
the default native driver is now always used. [1]

[1] cf37563c83

Change-Id: Idd4e8ad4b00064d180a50c7b98a4568804939f50
Signed-off-by: ZijianGuo <guozijn@gmail.com>
2019-09-29 10:30:57 +08:00
Kris Lindgren
2fe0d98ebb Add a job that *only* deploys updated containers
Sometimes as cloud admins, we want to only update code that is running
in a cloud.  But we dont need to do anything else.  Make an action in
kolla-ansible that allows us to do that.

Change-Id: I904f595c69f7276e71692696471e32fd1f88e6e8
Implements: blueprint deploy-containers-action
2019-09-26 17:51:14 +01:00
Mark Goddard
3522d235bd Refactor service, endpoint and user registration
Use upstream Ansible modules for registration of services, endpoints,
users, projects, roles, and role grants.

Change-Id: I7c9138d422cc91c177fd8992347176bb54156b5a
2019-09-17 10:13:56 -07:00
Manuel Rodriguez
1662a77b55 Add support to enable l3 port-forwarding plugin
Allows enabling neutron port forwarding plugin
and l3 extension to forward ports from floating
IP to a fixed neutron port.

Change-Id: Ic25c96a0ddcf4f69acbfb7a58acafec82c3b0aed
Implements: blueprint enable-l3-port-forwarding
2019-09-02 16:28:51 -04:00
Zuul
42aef5a50f Merge "Support configuration of trusted CA certificate file" 2019-08-28 07:48:51 +00:00
Zuul
4b4c10af2b Merge "Use default BGP speaker driver in bgp_dragent.ini" 2019-08-19 07:31:13 +00:00
Scott Solkhon
09e02ef8f1 Support configuration of trusted CA certificate file
This commit adds the functionality for an operator to specify
their own trusted CA certificate file for interacting with the
Keystone API.

Implements: blueprint support-trusted-ca-certificate-file
Change-Id: I84f9897cc8e107658701fb309ec318c0f805883b
2019-08-16 12:47:42 +00:00
Radosław Piliszek
85a5fb55c4 Fix FWaaS service provider (v2, Stein issue)
Because we merged both [1] and [2] in master,
we got broken FWaaS.
This patch unbreaks it and is required to backport
to Stein due to [2] backport waiting for merge,
while [1] is already backported.

[1] https://review.opendev.org/661704
[2] https://review.opendev.org/668406

Change-Id: I74427ce9b937c42393d86574614603bd788606af
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-08-08 20:26:57 +02:00
Mark Goddard
a13bc55042 Use default BGP speaker driver in bgp_dragent.ini
In the Stein release, neutron-dynamic-routing switched from
using ryu to os-ken (a fork of ryu). The config option
bgp_speaker_driver [1] is currently set in kolla-ansible to use the ryu
driver, but this is not included in the image due to it being removed
from neutron-dynamic-routing's requirements.txt.

This change uses the os-ken driver for bgp_speaker_driver, since this
package is included in the image.

[1] https://docs.openstack.org/neutron-dynamic-routing/latest/contributor/dragent-drivers.html#bgp-driver

Change-Id: I76ad84c6b963818208f080ebeb054b2553ff40af
Closes-Bug: #1839165
2019-08-07 15:18:11 +01:00
Marcin Juszkiewicz
35941738d5 Stop using MountFlags=shared in Docker configuration
According to Docker upstream release notes [1] MountFlags should be
empty.

1. https://docs.docker.com/engine/release-notes/#18091

"Important notes about this release

In Docker versions prior to 18.09, containerd was managed by the Docker
engine daemon. In Docker Engine 18.09, containerd is managed by systemd.
Since containerd is managed by systemd, any custom configuration to the
docker.service systemd configuration which changes mount settings (for
example, MountFlags=slave) breaks interactions between the Docker Engine
daemon and containerd, and you will not be able to start containers.

Run the following command to get the current value of the MountFlags
property for the docker.service:

sudo systemctl show --property=MountFlags docker.service
MountFlags=

Update your configuration if this command prints a non-empty value for
MountFlags, and restart the docker service."

Closes-bug: #1833835

Change-Id: I4f4cbb09df752d00073a606463c62f0a6ca6c067
2019-08-07 13:50:46 +02:00
Zuul
b59791ca92 Merge "Fix handling of docker restart policy" 2019-08-03 16:27:46 +00:00