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
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
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
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
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
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
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
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
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
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
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
This extends the physical network configuration in Kayobe to configure
Cumulus physical switches using the nclu Ansible module.
Change-Id: I960027ead301c5793a0ada1959a23549a71bdbfb
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
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
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
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
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
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
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
One use case is to use seperate disk for the registry storage. This
can prevent the rootfs from filling up.
Change-Id: I9634ee7f5730e93b8ddd96de04982d638dd4dae2
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
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