1476 Commits

Author SHA1 Message Date
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
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
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
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
Zuul
5ee815b0e9 Merge "CentOS 8: Add seed and overcloud CI jobs, drop CentOS 7 jobs" 2020-03-12 11:29:48 +00:00
Mark Goddard
b0359e37df CentOS 8: Add seed and overcloud CI jobs, drop CentOS 7 jobs
CentOS 8 removes interfaces from their bridge during ifdown, and removes
the bridge if there are no interfaces left. When Kayobe bounces veth
links plugged into the bridge, it causes the bridge which has the IP we
are using for SSH to be removed. Use a dummy interface in CI to avoid
this problem.

Kolla-ansible has dropped all CentOS 7 jobs on master now, and prechecks
only allow CentOS 7 hosts. Drop all CentOS 7 jobs. We will have to run
without upgrade jobs in place until Train supports CentOS 8.

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

Change-Id: I7c1a885b36445e33d4db1b1c8533db28a644b4a1
Story: 2006574
Task: 38870
2020-03-11 16:36:44 +00:00
Zuul
be1e3d8853 Merge "CentOS 8: Disable ntpd, enable chrony container" 2020-03-06 19:39:30 +00:00
Zuul
30a3ce1e99 Merge "Skip resmo.ntp role if ntp_service_enabled is false" 2020-03-06 17:01:14 +00:00
Mark Goddard
5507bba744 Blacklist Ansible 2.8.9
Backport: train

OpenStack Ansible modules were broken in Ansible 2.8.9. This affects
kolla-toolbox, and kayobe's ansible install for tasks that interact with
APIs. See https://github.com/ansible/ansible/issues/68042 and
https://bugs.launchpad.net/kolla/+bug/1866181.

This change blacklists ansible 2.8.9 for Kayobe and Kolla Ansible. A
separate change will be made to kolla to blacklist ansible 2.8.9 from
the kolla-toolbox image.

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

Change-Id: I535ab240b7ab8f3ab104b49170e4a9ee01fc482b
Story: 2007383
Task: 38959
2020-03-05 17:00:46 +00:00
Mark Goddard
71d36cbe5e CentOS 8: Disable ntpd, enable chrony container
CentOS 8 does not provide an ntp package. Instead fall back to using the
chrony container provided by Kolla Ansible by default.

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

Change-Id: If5230854d7565c8b3c91a46da4795c63edf095e4
Story: 2006574
Task: 38866
2020-03-05 16:56:58 +00:00
Mark Goddard
35e50bb6b8 Skip resmo.ntp role if ntp_service_enabled is false
We enable ntpd by default, and provide a variable to disable it -
ntp_service_enabled. It is also automatically disabled if the user
enables the chrony container (kolla_enable_chrony).

However, setting ntp_service_enabled to false will cause the host
configure commands to fail due to a bug in the resmo.ntp role. This is
because it tries to configure the ntpd service in systemd, but it will
not exist so the task fails.

This change fixes the issue by skipping the resmo.ntp role if the NTP
service is disabled.

Change-Id: I640873c11ceae5008030dc03984c089a410a0cee
Story: 2007384
Task: 38968
2020-03-05 16:46:05 +00:00
Pierre Riteau
7b7d39ebbe Remove seed_hypervisor_libvirt_pool_capacity variable
This is ignored by Libvirt, so there is no need to pass it to the
libvirt-host role.

Note: omitting the capacity argument requires libvirt-host 1.3.1 or
later.

Change-Id: Id94e7b514ed36c8e042e56e8f1891d98f8371e5d
Story: 2007381
Task: 38957
2020-03-05 16:06:49 +01:00
Pierre Riteau
1ee19568b0 Add support for configuring Cumulus switches with NCLU
This extends the physical network configuration in Kayobe to configure
Cumulus physical switches using the nclu Ansible module.

Change-Id: I960027ead301c5793a0ada1959a23549a71bdbfb
2020-03-03 20:46:32 +00:00
Ghanshyam Mann
208c46e72c [ussuri][goal] More cleanup for python 2.7 drop
Cleanup requirement and set ignore_basepython_conflict = True
in tox to avoid python version conflict warning which going
to be error in future.

Change-Id: Ia4ce42a20417d69efd50ef563aabd8cffbb7b346
2020-02-29 15:23:18 -06:00
Zuul
afa42f72a1 Merge "Bump Ansible version range to 2.8 - 2.9" 2020-02-28 21:47:00 +00:00
Zuul
bc655cbe00 Merge "CentOS 8: Bump MichaelRigart.interfaces to 1.4.0" 2020-02-28 21:22:08 +00:00
Zuul
382c38c92b Merge "Make Kayobe code compatible with Python 3" 2020-02-28 21:18:49 +00:00
Zuul
7ebe1def69 Merge "Allow setting pip_proxy" 2020-02-28 14:18:37 +00:00
Mark Goddard
1560bbc8fb Junos switch: update ncclient to 0.6.7+
ncclient 0.6.7 has been released and includes a fix [1] for the host key
checking issue that required us to pin to 0.6.2.

Restrict the package to <0.7.0 to avoid potential breakage from new
releases of ncclient.

[1] ead7b64092

Change-Id: Ia665cffb11253f58bbdce7ea9892766c36f7af40
Story: 2006378
Task: 38765
2020-02-28 09:49:42 +00:00
Mark Goddard
ebd5aa4477 Bump Ansible version range to 2.8 - 2.9
Updates the minimum version of Ansible from 2.6 to 2.8, and the maximum
supported version from 2.8 to 2.9.

CentOS 8 requires Ansible 2.8.

Change-Id: I3f8f7f8d7d37e3cb851965a491ac9c43030869d5
Story: 2006574
Task: 38826
2020-02-27 15:39:27 +00:00
Mark Goddard
3c9daababe CentOS 8: Bump MichaelRigart.interfaces to 1.4.0
This release provides support for CentOS 8.

Change-Id: Ie597e1bee46e1f7b7a7129d37e70d88c08cade74
Story: 2006574
Task: 38869
2020-02-27 15:39:27 +00:00
Pierre Riteau
15109ccb54 Make Kayobe code compatible with Python 3
Co-Authored-By: Mark Goddard <mark@stackhpc.com>

Change-Id: I2a7a82d7f576739c5516a0072f953712ffa5c233
Story: 2004959
Task: 29392
2020-02-27 11:10:29 +00:00
Zuul
9eb0254275 Merge "CI: set previous_release to train" 2020-02-27 09:32:37 +00:00
Michal Nasiadka
a0ab81d752 Allow setting pip_proxy
Change-Id: I2547ef2556ca96b614854515069aaca3349cd692
2020-02-26 11:10:01 +01:00
Mark Goddard
a91135179d CentOS 8: Use ansible_playbook_python for localhost dependencies
Currently we install python dependencies on the Ansible control host
each time the ip-allocation and console-allocation roles are executed.
This is inefficient, particularly in the case of the ip-allocation role
which is run serially for all hosts. It is also unnecessary since we
have these packages available in the Python environment used to execute
kayobe.

The kolla-ansible role also has an implicit dependency on PyYAML for
managing kolla passwords.

This change uses ansible_playbook_python as the Python interpreter for
the necessary tasks in these roles to avoid installing dependencies on
the system on CentOS 8 and Ubuntu. For CentOS 7 we still need to use the
platform Python, due to needing SELinux bindings.

Change-Id: Ic6a1c69a34241f4fbe617a0b12aec9b1528ba352
Story: 2006574
Task: 38825
2020-02-25 16:15:09 +00:00
Mark Goddard
f1a4b8cafc CI: set previous_release to train
This controls which release we are upgrading from.

Change-Id: I6b56a56e94f0b00b042c693a18ec1685724c7683
Depends-On: https://review.opendev.org/709189
2020-02-21 16:42:42 +00:00
Doug Szumski
167e2ff3db Fix Kayobe overcloud introspection data save
Kayobe overcloud introspection data save fails because the dynamic
inventory script siliently breaks causing Ansible to parse it as a
static inventory file. The failure occurs due to OS_TOKEN being set.
This change works around setting OS_TOKEN before running the dynamic
inventory script by setting OS_CLOUD before querying inspector.

Confirmed on Stein and Train, and verified in both environments.

Story: 2007326
Task: 38846
Change-Id: I57fbf91ae3440d3e4e6a64cd7d05151e299c9322
2020-02-21 15:53:07 +00:00
Mark Goddard
2e842ab3f5 Remove activate-virtualenv and deactivate-virtualenv roles
These roles are no longer necessary now that Ansible supports setting
ansible_python_interpreter via a task- or role-scoped variable.

Change-Id: I4121d01dc83ac028350d4d98d3e1158e15fdfd63
Story: 2006574
Task: 38824
2020-02-20 15:28:56 +00:00
Mark Goddard
2de3a2c578 Switch from shade to openstacksdk
Upstream Ansible OpenStack modules now use openstacksdk rather than shade.
Switch local Ansible modules to follow suit. Also switch to use the
stackhpc.os_openstacksdk role from stackhpc.os-shade.

The stackhpc.os-shade role is removed during 'kayobe control host upgrade'.

Change-Id: Id3894c3c36ef99f00ed463de6a3457e11733d6b7
Story: 2007294
Task: 38759
2020-02-20 15:28:56 +00:00
Zuul
3de40b57ba Merge "Use latest release of StackHPC iDRAC role" 2020-02-19 14:41:13 +00:00
Will Szumski
06ad1c3a96 Make docker registry volume configurable
One use case is to use seperate disk for the registry storage. This
can prevent the rootfs from filling up.

Change-Id: I9634ee7f5730e93b8ddd96de04982d638dd4dae2
2020-02-19 10:16:00 +00:00
Zuul
2822e9d77c Merge "Stop gzipping logs in get-logs.sh" 2020-02-18 19:31:54 +00:00
Doug Szumski
f2d46a57e4 Use latest release of StackHPC iDRAC role
This pulls in a number of fixes to the iDRAC role which includes
a change to allow the role to work with a recent version of the
python-dracclient library.

Change-Id: I6aa1fcece42f93cf404cf06dc96b2d70b140775e
2020-02-18 11:23:41 +00:00
Pierre Riteau
c9474bf9b0 Revert "Use OpenStack Train release"
This reverts commit a93b85ba07113a77a6c0db498a59cef3bca15b94.

The local Python executable for Kolla Ansible is changed to Python 3
because Kolla Ansible master no longer supports Python 2.

Change-Id: I768ce8db9cec1c70d94f271997bbcc64d370403e
2020-02-14 14:54:23 +00:00