1708 Commits

Author SHA1 Message Date
Zuul
eaf511adad Merge "Don't use become for Kolla Ansible" 2020-04-22 00:50:41 +00:00
Zuul
6b19b817cf Merge "CI: Test SSH connectivity to deployed instances" 2020-04-22 00:28:44 +00:00
Zuul
95a4d7e093 Merge "Add support for stopping overcloud services" 2020-04-22 00:28:40 +00:00
Radosław Piliszek
83bc574ba5 Cleanup py27 support
Removes and/or replaces all mentions of py27.

Cleans up obsolete requirements and their lower-constraints.

Update cliff minimum to 3.1.0 in requirements.txt, which has a fix for
story 2005891.

Change-Id: I52cffa2f1aee944f79c4618ea20b779755792f2a
2020-04-20 18:04:19 +00:00
Mark Goddard
dcd5159c17 Remove nameservers with any IP in overcloud resolv.conf workaround
Kayobe has a workaround for CentOS cloud images which contain a bogus
nameserver entry in /etc/resolv.conf. By setting
overcloud_host_image_workaround_resolv_enabled to true, the entry would
be removed. Previously we removed a specific IP address - 10.0.2.3 -
that was present in the CentOS 7 images. However, it seems that CentOS 8
images have a different IP - 192.168.122.1.

This change fixes the issue and becomes resilient to future changes by
matching any IP address. This should be fairly safe, since this
workaround is opt-in.

Change-Id: I9323a38cb2bb627ff56f5713900be00595ea8d4b
Story: 2006574
Task: 39484
2020-04-20 16:06:41 +01:00
Mark Goddard
8bed623571 Fix passwords.yml generation with vault encryption on Python 3
Kayobe generates passwords.yml for Kolla Ansible, and can encrypt it
using the vault password. Previously this was failing on Python 3 due to
passing a string to file.write() which expects bytes.

This change fixes the issue by encoding the password string passed to
file.write().

This allows us to run the ansible role tests under Python 3.

Change-Id: I33813f79984a46f1967ef3aee455dcfbe7eb93da
Story: 2006574
Task: 39481
2020-04-20 15:42:22 +01:00
Pierre Riteau
27779992b1 Use upper constraints when installing Tenks
Backport: train, stein, rocky

This fixes issues seen with a-universe-from-nothing using stable/train.

Change-Id: Ib477de5f3af2e4c182d0c2999c274dbb5553531c
Story: 2007572
Task: 39469
2020-04-19 15:30:36 +02:00
Mark Goddard
28a5b92be5 Docs: fix reference to deprecated external_net_name
Use the modern variable in the documented example.

Change-Id: I24560bf22cea28c1afc488c9abf9ea421a0286ad
2020-04-17 15:43:30 +01:00
Mark Goddard
58db0ed2e0 Avoid writing out requirements.txt in kolla-ansible role
We can use the Ansible pip module's support for specifying a list of
packages with version constraints.

Change-Id: If5d3c7117175732c54e38025692eb4c036053ebc
2020-04-17 11:14:49 +01:00
Mark Goddard
073499f322 Allow OVS bridges to connect directly to interface
Currently we require a Linux bridge to exist between OVS and the
physical interface. This is necessary if you want to set an IP on the
native VLAN of that interface, but that is not always the case.

This change allows the physical interface (or any non-bridge interface)
to be plugged into OVS.

Change-Id: I2172a74f4719605f6ec81fadec46ce49f8310a96
Story: 2007364
Task: 38920
2020-04-17 10:51:13 +01:00
Mark Goddard
97cd65dd63 Docs: Ansible tuning
Adds information on tuning Ansible, including forks, SSH pipelining and
fact caching.

Change-Id: I83d1469c62d63390222750d9d1f6e337e45b2373
Story: 2007492
Task: 39447
2020-04-17 10:00:27 +02:00
Mark Goddard
40e43e235d Run kolla-ansible bootstrap-servers as kolla user
Previously, Kayobe used Kolla Ansible's bootstrap-servers command to
create a user account and Python virtual environment for Kolla Ansible.
In order to do this it used the Kayobe Ansible user and Python
interpreter.

This causes problems for Ansible fact caching, which needs separate
caches for Kayobe and Kolla Ansible, since the different users and
Python interpreters used result in different facts. Bootstrapping
servers with the Kayobe user and interpreter resulted in the Kolla
Ansible fact cache being populated with Kayobe's user and interpreter.

This change disables user creation during Kolla Ansible's
bootstrap-servers command, instead creating the user and virtual
environment in Kayobe prior to running the command. This allows the
bootstrap-servers command to be executed using the normal Kolla Ansible
user and interpreter, which results in the correct facts being gathered.

The downside here is some duplication of code and configuration, but a
nice side effect is that we no longer need to dump configuration in the
CLI for host configure in order to fetch the Ansible user and
interpreter.

Change-Id: I85670be7242bc436f73c689f027670b0938ba031
Story: 2007492
Task: 39444
2020-04-16 20:44:34 +01:00
Mark Goddard
92a437f63c CI: Add overcloud host configure job
Tests various non-default configuration:

* Custom users
* Network interfaces, VLANs, bridges, bonds
* Software RAID
* LVM & docker devicemapper
* timezone
* Package mirrors
* yum-cron / DNF automatic

This improved test coverage allows us to be more confident about these
features working on CentOS 8.

Change-Id: I36148e4356deb7d5ec00d8d3ebeb2d3932ff4f94
Story: 2006574
Task: 38938
2020-04-16 15:44:49 +00:00
Mark Goddard
e0932bd788 Update inventory templates for Ussuri
Sync with kolla-ansible multinode inventory.

Change-Id: I30bd5286c4783fce544c41e726efc5f800d6f56a
2020-04-16 16:44:23 +01:00
Zuul
c31870591d Merge "Prevent openrc files from using wrong OS_CACERT value" 2020-04-15 17:27:33 +00:00
Zuul
ca2dc0e585 Merge "CentOS 8: seed VM & bifrost" 2020-04-15 16:28:47 +00:00
Zuul
bac385ad9e Merge "Docs: Configure firewall to allow testing of baremetal" 2020-04-15 16:23:36 +00:00
Zuul
c069d95099 Merge "Update documentation for release tasks" 2020-04-15 16:23:32 +00:00
Zuul
9d5a671f3c Merge "Filter out switch port descriptions on Ruckus switches" 2020-04-09 15:33:41 +00:00
Mark Goddard
51b84b6001 CentOS 8: seed VM & bifrost
* Change default seed VM image to CentOS 8
* Change default bifrost deploy image to CentOS 8
* Workaround DIB bug
  https://bugs.launchpad.net/diskimage-builder/+bug/1866847 by setting
  DIB_DISABLE_KERNEL_CLEANUP to 1
* Install iptables on seed for SNAT - missing on CentOS 8
* Fix provider network MTU lookup for empty string
* Bump stackhpc.libvirt-host to 1.7.0 for CentOS 8 support
* Bump stackhpc.libvirt-vm to 1.13.0 for CentOS 8 support
* Bump jriguera.configdrive for Python 3 support

Change-Id: Ie0edf6a924a914395c6502e2d5cf1139bce14a48
Story: 2006574
Task: 39000
2020-04-09 14:04:22 +00:00
Pierre Riteau
010681d7d9 Filter out switch port descriptions on Ruckus switches
Some Ruckus switches, e.g. the Ruckus ICX 7150, advertise switch
interface names as switch port descriptions. Unlike Dell switches, there
is no space character between port type and port number. For example:
GigabitEthernet1/1/9.

Update regular expression to match both styles.

Change-Id: I359b07abadc8665ff0a8c3407ca0fc5effc504cf
Story: 2007532
Task: 39343
2020-04-09 08:35:45 +02:00
Pierre Riteau
cc3d27e2e1 Fix seed VM provisioning on a remote seed hypervisor
The seed VM will fail to provision if the Ansible control host and the
seed hypervisor are not the same hosts.

This is because Kayobe creates the seed-vm-user-data file on the
seed-hypervisor host. It then invokes the jriguera.configdrive role
which uses a copy task without remote_src, which fails to find the
source file locally on the Ansible control host.

Instead we create a local temporary file for seed VM user data.

Change-Id: Iabbe4c624b9ad02bb82c323070f99c16e5822966
Story: 2007530
Task: 39338
2020-04-08 19:02:19 +02:00
Mark Goddard
e924c99c52 Avoid unconditional fact gathering
One way to improve the performance of Ansible is through fact caching.
Rather than gather facts in every play, we can configure Ansible to
cache them in a persistent store. An example Ansible configuration for
doing this is as follows:

[defaults]
gathering = smart
fact_caching = jsonfile
fact_caching_connection = ./facts
fact_caching_timeout = 86400

While this mostly just works, there are a few places where we
unconditionally gather facts using the setup module. This change
modifies these to only gather facts when necessary.

We no longer execute the MichaelRigart.interfaces role using become:
true, since it may gather facts and we do not want it to do so as root.
The role uses become where necessary.

Change-Id: I9984a187fc6c0496ada489bb8eef36e44d695aac
Story: 2007492
Task: 39216
2020-04-08 16:56:32 +00:00
Mark Goddard
9475e05e30 Add kolla_enable_openstack_core variable
Adds a new variable, 'kolla_enable_openstack_core', which can be set a
default value for whether the default OpenStack services are enabled.
This includes Glance, Heat, Horizon, Ironic, Keystone, Neutron and Nova.
It is 'true' by default.

Change-Id: I7768d3a92272d4353522dbf1a96f124225f4d73d
Story: 2007524
Task: 39315
2020-04-06 16:32:42 +00:00
Mark Goddard
6ca967e27f Use Ansible connection reset support in docker role
When configuring Docker we need to kill persistent SSH connections to
refresh the membership of the docker group for the stack user. Currently
we are using a fairly heavy handed method of removing all ControlPersist
sockets because the Ansible reset_connection meta module previously did
not work [1]. This issue is fixed since Ansible 2.5.6.

This change switches to the reset_connection meta module, which now
works as expected.

[1] https://github.com/ansible/ansible/issues/27520

Change-Id: Id4d951e447720e1d769491c0d34ad83099c030eb
2020-04-03 17:25:24 +01:00
Pierre Riteau
ce212cc23c Prevent openrc files from using wrong OS_CACERT value
Kolla Ansible sets kolla_{external,internal}_fqdn_cacert variables with
default values compatible with the use of `kolla-ansible certificates`.

However, when these variables are left unset in Kayobe, which is
generally the case when using trusted certificates, we end up with
openrc files setting OS_CACERT to a file that does not exist:

    ${KOLLA_CONFIG_PATH}/certificates/haproxy-ca.crt

Instead we allow null cacert variables to be passed to kolla-ansible,
which results in openrc files without the bogus OS_CACERT entry.

Change-Id: Ifa615888b6d8d54c9e6314fd90f3fc4872fc6e5a
Story: 2007516
Task: 39299
2020-04-03 17:17:24 +02:00
Mark Goddard
611111b8bd Use unittest.mock instead of PyPI mock
Now that py2 is gone, oslotest dropped dependency on mock and will
soon affect Ussuri CI [1], let's use unittest.mock built in py3.

This also fixes py38 jobs and proactively prevents py36 and py37
failing due to [1]. This is because we never included mock in
test-requirements and instead relied on oslotest to bring it in.

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

Change-Id: I0c18b13c4e1fbaa9db41da4e2039ad908c28caa6
2020-04-03 10:22:39 +01:00
Zuul
7110477bcb Merge "Install python-openstackclient using upper constraints" 2020-04-02 20:07:52 +00:00
Zuul
ba21631aaa Merge "Switch to stackhpc fork of resmo.ntp" 2020-04-02 17:11:21 +00:00
Mark Goddard
6e1def534c Update documentation for release tasks
Since Kayobe is now an official OpenStack deliverable, our releases
documentation page is now outdated. It needs to be updated to document
the process using official release tools.

This change makes the releases page more similar to the Kolla release
management page:
https://docs.openstack.org/kolla/latest/contributor/release-management.html.

Change-Id: Ic49a63d66dfdb8e4235a60c1f01ad70bef6bea43
Story: 2007079
Task: 37990
2020-04-02 16:23:43 +00:00
Pierre Riteau
ef33e6ecb7 Install python-openstackclient using upper constraints
Detect current branch from .gitreview and use upper constraints to
install python-openstackclient, to guarantee compatibility with the
Python version in use.

Change-Id: Ie44508fe3d3b08190afa5a43748e43548a63ff82
2020-04-02 16:58:50 +02:00
Will Szumski
31ad22abc4 Switch to stackhpc fork of resmo.ntp
There is no activity on the resmo fork of the role and it seems
impossible to get any patches merged.

Change-Id: I1f09f7c11767226e89b34687dab1553e87be76ba
Story: 2005272
Task: 39197
2020-04-02 14:44:27 +02:00
Mark Goddard
dcac05a30c Support custom Ansible configuration
Tuning Ansible is typically done by customising configuration in
ansible.cfg. Currently Kayobe adheres to the standard locations for
Ansible configuration [1].

This change allows custom Ansible configuration files stored in the
kayobe-config repository to be used for execution of Kayobe and Kolla
Ansible playbooks.

[1] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings-locations

Change-Id: Iab2021b8e88b5a3a2b0f8583f1246ab2c83670e5
Story: 2007494
Task: 39219
2020-03-31 19:03:00 +01:00
Mark Goddard
939e298c56 Don't use become for Kolla Ansible
Using become for all Kolla Ansible tasks is not ideal from a security
perspective. It is also incompatible with fact caching, since it causes
facts to be gathered and cached as root, which changes some facts.

This change modifies the default value of kolla_ansible_become to false.

Change-Id: I9ee5c55e59276f70c92e9c698c01123dcf8919a1
Story: 2007492
Task: 39217
2020-03-31 15:32:10 +01:00
Doug Szumski
cdc1d5ada2 Fix loading of Monasca Grafana dashboards
This is a minimal fix to support loading dashboards into the Monasca
Grafana fork. It firstly aligns the default Monasca Grafana control
plane organisation and Monasca Grafana local admin username with Kolla
Ansible to make the feature easier to use. Secondly, it extracts the
associated OpenStack project name from this variable by stripping off
the OpenStack domain.

Longer term we may wish to move the dashboard loading functionality into
Kolla Ansible, now that it supports deploying Monasca.

Affects Rocky onwards.

Change-Id: I77c94edf654565a12ce8be681e3c9b16caa55c86
Story: 2007477
Task: 39186
2020-03-30 15:13:15 +02:00
Zuul
35ccc0d2cc Merge "CentOS 8: Enable seed upgrade job" 2020-03-28 13:58:35 +00:00
Zuul
1617ce680a Merge "Add support for configuring Cumulus switches with NCLU" 2020-03-28 00:28:35 +00:00
Zuul
ea070e42c3 Merge "Remove seed_hypervisor_libvirt_pool_capacity variable" 2020-03-28 00:28:31 +00:00
Mark Goddard
71c2aa1d90 Add support for stopping overcloud services
Implemented via 'kolla-ansible stop'.

Change-Id: Iaf8db47e70f023b446c17aa61fc8bb89cf7c2b28
Story: 2007467
Task: 39155
2020-03-26 14:34:07 +00:00
Mark Goddard
0628beaa01 CentOS 8: Enable seed upgrade job
Kolla CentOS 8 Train Bifrost image is now available.

Change-Id: If2b06f80fa2817377ed881aa61ef73e4be38df55
Story: 2006574
Task: 39047
2020-03-25 14:56:57 +00:00
Zuul
15e2dce049 Merge "CentOS 8: Enable overcloud upgrade job" 2020-03-23 14:24:55 +00:00
Mark Goddard
a28fd66b6e CentOS 8: Enable overcloud upgrade job
Missing bifrost image for Train, so no seed upgrade job yet.

Depends-On: https://review.opendev.org/711067

Change-Id: I0e88683f775769c1a80879685b0e7a2983599b08
Story: 2006574
Task: 39047
2020-03-23 10:32:57 +00:00
Zuul
f4def02e0e Merge "CentOS 8: Support DNF" 2020-03-19 18:34:10 +00:00
Zuul
8bd7df5de3 Merge "Make docker registry volume configurable" 2020-03-19 13:50:18 +00:00
Mark Goddard
dc32b52f08 CentOS 8: Support DNF
Adds support for configuration of DNF repo mirrors for CentOS and EPEL
repositories, as well as custom repositories.

Adds support for DNF automatic, which is a replacement for yum-cron.

Configuration is backwards compatible, falling back to the equivalent
yum variables when DNF variables have not been overridden.

Change-Id: I8bef5e9c8e1c77c25d6077ff690da8f2cde6a643
Story: 2006574
Task: 38922
2020-03-19 11:23:39 +00:00
Zuul
a5f1f2bc49 Merge "Junos switch: update ncclient to 0.6.7+" 2020-03-19 11:12:09 +00:00
Zuul
f41cde46a9 Merge "CI: Redirect stderr to ansible logs" 2020-03-19 11:07:07 +00:00
Zuul
458e6a6424 Merge "Fix Kayobe overcloud introspection data save" 2020-03-19 11:03:20 +00:00
Zuul
03cff293f1 Merge "Docs: fix libvirt connection URI for tenks" 2020-03-19 09:58:43 +00:00
Radosław Piliszek
e7d7daa531 Remove ceph block device support
It leaves certain ceph mentions in globals.yml.j2 as it needs
syncing with kolla-ansible contents anyways
(these are all comments).

Change-Id: I05e9c6223583e9bb5dc0020edc0b56990275093c
Story: 2007295
Task: 38766
2020-03-18 10:28:33 +00:00