Commit Graph

90 Commits

Author SHA1 Message Date
Zuul f2b658ecb6 Merge "Generate KA config before ``kolla ansible run``" 2024-02-16 19:36:21 +00:00
Pierre Riteau bb51db15fe CI: support .gitreview of unmaintained branch
Change-Id: Ica6c0b204094ed61aef8242c934eb3b7715ce944
2024-02-13 22:07:19 +00:00
Matt Crees bc98c494ae Generate KA config before ``kolla ansible run``
Supports calling custom Kolla Ansible commands directly after a
``kayobe control host bootstrap``.

Change-Id: I19f188cc002f8578618003e90c0a4a154b806e49
2024-02-02 13:25:58 +00:00
Mark Goddard 0f1f009a85 CI: Run configuration dump against localhost
Since using the to_bool function in more places in
I3a5a43fef9c3d68d0db02be12b9f892c437e513d, we are now more strict about
the result of the variable dump. If there are no controllers in the
inventory, the result will not be a valid boolean and the to_bool
function will exit non-zero.

This change fixes the issue by running against localhost, which should
always be in the inventory.

Change-Id: Idcfd9d335f11f6c4d676033128d207f62b363ee9
2023-11-29 09:25:13 +00:00
Zuul c9086d7d29 Merge "dev: Improve error checking for config check functions" 2023-11-08 16:56:03 +00:00
Pierre Riteau 990370a367 Revert "CI: Disable bare metal testing on RL9/c9s"
This requires disabling libvirt_vm_trust_guest_rx_filters, which when
enabled triggers the following errors when booting baremetal instances
with Tenks on Libvirt 9 (and most likely since 8.9.0):

    Cannot set interface flags on 'macvtap1': Value too large for defined data type

This is apparently triggered by a Libvirt commit refreshing rx-filters
more often [1].

As explained in I71a2051d8acd63379bd70bc1287a059d4a7f6387, this setting
was added to allow traffic destined for other MAC addresses to reach VMs
when using a macvtap interface.

This will prevent multicast from working, but we don't need it for
baremetal tests in CI.

This setting will be enabled again once the issue is resolved in either
Libvirt or Tenks.

This reverts commit 21c68bbfaf.

Also increase timeout of upgrade jobs which is too short now due to the
added delay added by bare metal testing.

[1] 060d4c83ef

Change-Id: I2cfd2667abb1ae8988b7a7fd9761b75c20a0eaa4
2023-10-09 09:25:04 +02:00
Matt Crees e104468371 CI: Migrate RabbitMQ queues during upgrade tasks
Kolla Ansible enabled RabbitMQ HA queues by default, which require a
manual migration step [1]. Adds these to the Kayobe upgrade CI.

[1] https://review.opendev.org/c/openstack/kolla-ansible/+/882825

Change-Id: I82c286fd17e3a1d7f31952442fa281302cda7ee4
2023-08-30 14:25:02 +01:00
Mark Goddard 89fc4fa279 dev: Improve error checking for config check functions
Various functions in the development/testing scripts rely on 'kayobe
configuration dump' to extract the value of flags. If this command fails
for any reason, we should exit the script. Currently, some places we
continue and return 1, since we check the output against the string
'true'.

The to_bool helper function handles failure by checking for a valid
boolean output, so let's use that everywhere.

Change-Id: I3a5a43fef9c3d68d0db02be12b9f892c437e513d
2023-05-24 14:47:40 +01:00
Pierre Riteau 5b84ef3760 Use master upper constraints
Yoga upper constraints were used to keep compatibility with Python 3.6.
This is not needed with all supported OS using Python 3.9 or newer.

This reverts commits d2e0d64eb0 and
d190e9e3a3.

Change-Id: I35a07bcc2b7c9cbb49fa60e6802cc6288a34fbd8
2022-12-14 08:58:30 +01:00
Bartosz Bezak 2f447f6545 Move to Rocky Linux 9
CentOS Stream 8 support has been dropped. Migration path will be present
in Yoga release - as a followup change.

MichaelRigart.interfaces does not support custom routes for
NetworkManager yet. It has been disabled in CI for Rocky Linux 9
temporarily.

Non-voting CentOS Stream 9 CI overcloud job is using RL9 container
images (as kolla CI is not building CS9 images anymore).

Change-Id: Idf5ee822b03ba40179803c981500a6bad37594bf
2022-12-12 22:24:47 +01:00
Rafal Lewandowski 29c6f2ef88 Fix for sed in write_bifrost_clouds_yaml function
Fixed sed replacement line.

Change-Id: I2e26a08ea37e5f558af533b38d096f011ed2a5b8
2022-10-07 13:42:21 +02:00
Rafal Lewandowski 20e2ac9cbd Update write_bifrost_clouds_yaml logic
This is changed in order to facilitate running Ironic checks before
OpenStack is deployed.

Change-Id: Ibc4c9c93f52414c23cd7d8b4f1b32c85cb233681
2022-10-04 09:18:38 +02:00
Pierre Riteau d190e9e3a3 Use yoga upper constraints in dev scripts
This is required to be able to install tenks. Otherwise, we try to
install Jinja2 3.1.2 which requires Python 3.7 or newer.

Change-Id: Ie497b191b6de8bc818dc4a2a12f7129a02d0fd00
2022-07-05 09:46:33 +02:00
Pierre Riteau d2e0d64eb0 Use yoga upper constraints to avoid Python version conflict
Requirements upper constraints bumped python-novaclient to version
18.0.0 [1], which requires Python 3.8 [2]. This results in failures when
installing python-openstackclient on CentOS and Rocky with Python 3.6.

    ERROR: Cannot install python-openstackclient==5.8.0 because these package versions have conflicting dependencies.

    The conflict is caused by:
        python-openstackclient 5.8.0 depends on python-novaclient>=17.0.0
        The user requested (constraint) python-novaclient===18.0.0

Work around this issue by using yoga upper constraints until we upgrade
to CentOS Stream 9 and Rocky Linux 9.

This also fixes another issue seen on Ubuntu where image uploads to
Glance through Ansible fail with a 400 Bad Request error. This is caused
by the bump of openstacksdk to version 0.99.0 and will be fixed by a new
release of ansible-collections-openstack.

[1] https://review.opendev.org/c/openstack/requirements/+/842808
[2] https://review.opendev.org/c/openstack/python-novaclient/+/838944

Change-Id: I40c6b898963c2218d41d37bd73d40ce8dcf22b87
2022-05-25 09:41:01 +02:00
Mark Goddard 05c09523fa ironic: default to ipxe booting
Enable the Ironic ipxe boot interface by default, following a similar
change in Ironic [1].

Drop the kolla_enable_ironic_ipxe flag, following a similar change in
Kolla Ansible [2]. Both PXE and iPXE are now enabled by default. Users
may revert to using PXE for ironic inspector's dnsmasq, by setting
ironic_dnsmasq_serve_ipxe to false in etc/kayobe/kolla/globals.yml.

[1] https://review.opendev.org/c/openstack/ironic/+/816824
[2] https://review.opendev.org/c/openstack/kolla-ansible/+/834512/

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/832159
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/834511
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/837069

Change-Id: Ifb80bd15a20c9cfb8fbc6e0f6ac23baae631a18e
2022-04-12 11:57:21 +00:00
Mark Goddard c4b74f4801 libvirt: deploy libvirt on the host
In some cases it may be desirable to run libvirt daemon on the host. For
example, when mixing host and container OS distributions.

This change makes it possible to disable the nova_libvirt container, by
setting kolla_enable_nova_libvirt_container to false.

The stackhpc.libvirt-host role is used in order to install and configure
a libvirt daemon on compute hosts when
kolla_enable_nova_libvirt_container is false.

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/825357
Depends-On: https://review.opendev.org/c/openstack/kayobe-config-dev/+/829225
Depends-On: https://github.com/stackhpc/ansible-role-libvirt-host/pull/51

Story: 2009858
Task: 44495

Change-Id: I73fef63fb886a9d543d2f4231fb009523495edb3
2022-03-24 13:44:48 +00:00
Zuul 4616c87010 Merge "Add support for Rocky Linux 8" 2022-03-20 22:20:24 +00:00
Michal Nasiadka 8e55ea08a4 Add support for Rocky Linux 8
Change-Id: If7d6e58b19f98ccb7cc4c209e458cb6f4f4765ad
2022-03-18 15:04:21 +00:00
Mark Goddard a0665cd9c6 CI: stop using zuul as kayobe_ansible_user in TLS jobs
Previously we were using the zuul user in the TLS jobs. This was due to
a permissions issue when accessing the CA certificate in kayobe-config
in the zuul user's home directory.

This change reverts to the default of using the stack user for the TLS
jobs. In order to make this work, the generated CA cert chain is added
to the trust store.

Change-Id: I875f8976df75dee68ba00842fe624c29cc1b123c
2022-03-02 13:34:12 +00:00
Mark Goddard b57b94bbad CI: test ironic UEFI boot mode in overcloud TLS jobs
Set the Ironic boot mode to legacy BIOS explicitly in Tenks config in
anticipation of an upcoming change to the default boot mode.

Override the boot mode to UEFI in the overcloud TLS job to improve
coverage. This requires enabling iPXE booting.

Depends-On: https://review.opendev.org/c/openstack/tenks/+/827479/

Change-Id: Id1b4e9775c834b8b97e086241ee8b247977225a2
2022-02-08 11:16:03 +00:00
Pierre Riteau c35f112a14 Build overcloud host image directly with DIB
As a first step towards supporting multiple overcloud disk images, this
change introduces a new command to build a disk image directly with DIB:
`kayobe overcloud host image build`.

It also disables building a root disk image during Bifrost bootstrap if
overcloud_dib_build_host_images is set to true.

Change-Id: I93d242889e225b4e60254f6b9cc5eeb457294ac8
Story: 2002098
Task: 41693
2021-11-26 09:28:00 +01:00
Mark Goddard 104e383fc7 CI: add Infra VM jobs
Depends-On: https://review.opendev.org/c/openstack/kayobe/+/812670
Depends-On: https://review.opendev.org/c/openstack/kayobe-config-dev/+/805239
Depends-On: https://review.opendev.org/c/openstack/kayobe/+/813212

Change-Id: I7dbd643fec72223bfda20cbbc37809ae78073804
2021-10-26 09:35:17 +01:00
Mark Goddard 7b16300c8f Allow passing arguments to dev/environment-setup.sh
Arguments are passed through to kayobe-env in kayobe-config, which
allows to set the Kayobe environment.

Change-Id: I4c72e32e5379237340284a09874b0c500e41ad0f
2021-09-08 15:43:30 +01:00
Mark Goddard f639ad0b35 Use ansible_facts to reference facts
By default, Ansible injects a variable for every fact, prefixed with
ansible_. This can result in a large number of variables for each host,
which at scale can incur a performance penalty. Ansible provides a
configuration option [0] that can be set to False to prevent this
injection of facts. In this case, facts should be referenced via
ansible_facts.<fact>.

This change updates all references to Ansible facts within Kayobe
from using individual fact variables to using the items in the
ansible_facts dictionary. This allows users to disable fact variable
injection in their Ansible configuration, which may provide some
performance improvement.

This change disables fact variable injection in the ansible
configuration used in CI, to catch any attempts to use the injected
variables.

[0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars

Story: 2007993
Task: 42464
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/791276

Change-Id: I14db53ed6e57d37bbd28dd5819e432e3fe6628b2
2021-08-21 09:57:29 +02:00
Pierre Riteau f0aae6b8bc Remove iscsi deploy interface
The iscsi deploy interface was removed from Ironic [1]. Switch to the
direct deploy interface instead, which is the default.

[1] https://review.opendev.org/c/openstack/ironic/+/789382

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/801267
Change-Id: Ia0dcd3d302e0f04adbda4f3abf75a0ca7dd20dee
2021-07-22 16:24:50 +01:00
Zuul 95af2edc6b Merge "docs: improve automated seed development info" 2021-06-09 11:19:56 +00:00
Mark Goddard 82def9a516 Ubuntu: ensure /usr/bin/python is python3
/usr/bin/python may be python 2 on Focal, which causes problems with
Ansible on the control host. By installing the python-is-python3 package
we ensure that the correct interpreter is used.

This change updates the installation documentation and development
environment scripts.

Story: 2004960
Task: 42579

Change-Id: Ie94099075bae3c491f9cf830c38e6cfc8af605a6
2021-06-07 10:00:40 +01:00
Mark Goddard d2e3f6f1ae docs: improve automated seed development info
* add 'bridge_type: linuxbridge' to tenks configuration to avoid
  dependency on OVS
* extend seed development environment testing to include overcloud
  provisioning and deployment
* remove seed hypervisor and seed VM environments. These are very
  stale, and largely replaced by a-universe-from-nothing. Add a link to
  that workshop on the same page

Change-Id: I9928e5912e6770bdcc1d5d0884d2f101c16ee6a9
2021-05-27 15:10:31 +01:00
Mark Goddard 760c2b796d CI: use retries for control host bootstrap in seed VM jobs
All instances of 'kayobe control host bootstrap' in the development
scripts use a helper function, except for during seed_hypervisor_deploy.
The helper adds a retry mechanism to combat flakiness often seen during
Ansible Galaxy installs.

This change fixes the issue.

TrivialFix

Change-Id: I954cb604a18874744b3673ebf2e2c29caa18ce8f
2021-04-12 15:58:10 +00:00
Mark Goddard 3084cf67ce CentOS Stream 8: Use /usr/bin/which instead of bash function
A bug has been introduced to the which package in CentOS Stream 8 which
causes it to fail when used with the following bash options:

set -u
set -o pipefail

Then, when running which we see the following output:

environment: line 1: _declare: unbound variable

As found by Pierre, this seems to be caused by the implementation of
which as a bash function which references an unbound variable
(_declare). It's tracked in Fedora by
https://bugzilla.redhat.com/show_bug.cgi?id=1944877#.

This change works around the issue by using the /usr/bin/which binary.

Co-Authored-By: Pierre Riteau <pierre@stackhpc.com>

Change-Id: I468d4e0460c13791b9f01d5854ef45472528c6fe
Story: 2008795
Task: 42215
2021-04-06 12:29:33 +01:00
Mark Goddard df00ba22e7 CI: increase Ansible Galaxy retries & add delay
We still see flakiness when downloading content from Ansible Galaxy,
often HTTP 520. This change increases the retries from 3 to 10, and adds
a 5 second delay between attempts.

Change-Id: I0c46e5fcc6979027dc6f1bc5cc49e923a205f654
Related: https://github.com/ansible/galaxy/issues/2429
2021-03-26 17:34:40 +00:00
Mark Goddard 775620733b CI: Fix IP address detection in baremetal compute test
The 'openstack server show <server> -f value -c addresses' command
previously had output like this:

    <network name>=<IP>

Now it shows a Python output like this:

    {'<network name>': ['IP']}

This broke the parsing of the command output when determining which IP
address to use to access a bare metal instance via SSH.

This change fixes the issue by querying the server's port in Neutron,
and using the fixed IP address.

Change-Id: I55b5f185fb7136d3c6fa565aa46598f21c94eb43
2021-03-23 12:03:20 +00:00
Zuul 3d7f15faa9 Merge "CI: display VM console log on ping or SSH failure" 2021-03-10 14:08:25 +00:00
Mark Goddard 9f41cefc15 CI: add Ubuntu overcloud deploy job
* Use source images
* Need to specify bash for &> syntax

Issues worked around:

* Manually configuring bridge via ip commands makes ifup fail to bring
  up the link. Adds a kayobe-network-bootstrap Zuul CI role that adds
  persistent configuration for the all-in-one network.

* bridge not active after interfaces role bounce. Added a pause, similar
  to https://github.com/michaelrigart/ansible-role-interfaces/pull/31

* fails installing docker python module for kolla user. WARNING: The
  repository located at mirror-int.ord.rax.opendev.org is not a trusted
  or secure host and is being ignored ERROR: No matching distribution
  found for docker===4.4.0 Adding trusted host for PyPI mirror.

* Tenks fails to create block devices - missing qemu-img (in qemu-utils)

* Tenks qemu emulator is different on Ubuntu

Remaining issues:

* Bare metal testing is unreliable on Ubuntu - some jobs see IPMI
  failures such as the following:

    ipmitool chassis bootdev pxe

    Error setting Chassis Boot Parameter 5\nError setting Chassis Boot
    Parameter 0\n

  Bare metal testing is disabled on Ubuntu for now.

Depends-On: https://review.opendev.org/766984
Depends-On: https://review.opendev.org/766958

Story: 2004960
Task: 29393

Change-Id: I1985efae7c18f55c3ff7c27c17d6242523904f3e
2021-03-01 17:57:51 +00:00
Mark Goddard f9d9afcfba CI: Fix overcloud and seed VM jobs on vexxhost clouds
This partially reverts commit 47bbb96b29
which triggered a retry on vexxhost clouds.

The issue was introduced in Ie8fd965165e8d347d27528a2c16d0647e412ccdc,
which applied some fixes for CentOS 8.3, and inadvertently removed
the Tenks variable that forces the use of qemu for 'bare metal' VMs.
This lead to autodetection of KVM, which does not work well when nested
in all CI cloud providers.

This change fixes the issue by forcing the use of qemu for the overcloud
once more. It also adds a similar option for the seed VM job.

Change-Id: I6bc8da2b8da903e09b97df8cd95c68a562c11db9
2021-02-26 11:11:18 +00:00
Mark Goddard 25ae0be2f9 CI: display VM console log on ping or SSH failure
Also increase attempts to 12, in line with Kolla Ansible CI.

Change-Id: I81cabf27f44af3c8135efe8e427db1ffee5f0091
2021-02-24 11:54:49 +00:00
Pierre Riteau c84a9757dd Test building seed deployment images in the seed job
This requires stackhpc.os-images v1.10.0 or newer, for compatibility
with CentOS 8 when SELinux is enabled: we disable SELinux, but without
rebooting it stays enabled.

This Ansible role was updated to v1.10.2 in master and stable/victoria
by I5efdbd52556721914fe69d7c6ba454b2c721b643, for another reason.
Remember to bump the requirement when backporting to earlier releases.

It also needs changes in the way we interact with Bifrost to avoid using
the env-vars file which has been removed. This is implemented by change
I25078e69acdf41a4ef9957f99fe5047de54b778d.

Finally, it requires building seed deployment images only after
deploying Bifrost, because the task copying images onto the seed expects
/etc/kolla/bifrost to exist.

We also copy log files to identify issues when the job fails.

Change-Id: I4719b4d397c01b35c78cb84c6d686dd27742d1c0
2021-02-05 11:50:15 +01:00
Mark Goddard 4398856ec8 Fixes for CentOS 8.3
* Bump stackhpc.libvirt-host to v1.7.1. On seed-hypervisors installed
  using CentOS 8.2 or earlier, interaction with libvirt may fail due to
  libgcrypt being incompatible. See
  https://github.com/stackhpc/ansible-role-libvirt-host/issues/42

* Bump MichaelRigart.interfaces to v1.9.2. The CentOS 8.3 cloud image
  includes an ifcfg-ens3-1 file. See
  https://github.com/michaelrigart/ansible-role-interfaces/pull/93

* Previously a second libvirt daemon was installed by Tenks on the host,
  however changes in libvirt 6.0.0 to separate libvirtd into multiple
  daemons do not allow for customisation of the PID files used by the
  new daemons. This leads to a conflict between the container and host
  daemons. Update the Tenks config to use the containerised Nova libvirt
  daemon. This depends on a change to the stackhpc.libvirt-host role:
  https://github.com/stackhpc/ansible-role-libvirt-host/pull/44

* Not CentOS 8.3 related, but tox jobs are now failing on python
  dependencies. Remove upper limits from docker and paramiko.

* Not CentOS 8.3 related, but Bifrost has enabled authentication by
  default. We are not ready to support this, so override it.

Story: 2008429
Task: 41378

Change-Id: Ie8fd965165e8d347d27528a2c16d0647e412ccdc
2020-12-16 11:04:48 +00:00
Mark Goddard 6a4e7c4e91 dev: fix test scripts when ironic is disabled
While we always test baremetal compute in CI, development environments
may not. Given that Ironic is now disabled by default, we should make
this work out of the box.

Story: 2008207
Task: 41003

Change-Id: Id3128380f5ff74d24265f6b2132c6d7992bf00ba
2020-10-02 14:24:30 +00:00
Mark Goddard 081222753c CI: Add a CentOS 8 overcloud job with TLS enabled
Change-Id: I5fc49fb734d0fe94f5f75c66eb4c1a935774ef30
2020-10-01 09:49:21 +00:00
Zuul e0491a1d0a Merge "CI: Update IPA images during upgrade" 2020-06-17 19:08:41 +00:00
Zuul 79f9a1cc25 Merge "IPA: Switch to IPA builder and CentOS 8" 2020-06-17 19:03:01 +00:00
Mark Goddard c16597aa2d Add seed VM provisioning CI job
Adds the kayobe-seed-vm-centos8 CI job to configure the Zuul VM as a
seed hypervisor, and use nested virt to provision a seed VM.  This
ensures that the seed hypervisor code paths are tested.

The job uses a Cirros image for the seed VM rather than the usual CentOS
cloud image. This is to reduce bandwidth required to download the image.
It does mean that the resulting seed VM cannot be used as a seed, but
nested virt would make this slow and unreliable anyway. Cirros does not
load cdrom drivers by default, so we add the configdrive as a disk
rather than a cdrom device.

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

Change-Id: I2268a1ddf9a2870c713f32a40689e1686365aabd
Story: 2001655
Task: 6683
2020-06-16 17:19:47 +01:00
Mark Goddard 3d9c586134 CI: Update IPA images during upgrade
This ensures we are using the appropriate IPA images in the upgraded
environment.

Change-Id: I4a72d9ae49ad41716522c3074c16d8ca23c3ff94
2020-06-12 16:25:11 +00:00
Mark Goddard 20fb05bfb4 IPA: Switch to IPA builder and CentOS 8
Switches to use the IPA builder project for building IPA images.

Switches the IPA images used by default to CentOS 8 based image.

Changes the file extension of the IPA kernel image from vmlinuz to
kernel.

Story: 2007070
Task: 37953

Change-Id: I82fc455f41f48dacb453e135870dd776895d7c99
Story: 2006574
Task: 39485
2020-06-12 17:24:31 +01:00
Mark Goddard b9d76f6ef5 Remove support for CentOS 7 and Python 2
* Always use Python 3
* Drop code paths for CentOS 7
* Drop support for Yum
* Remove support for host NTP daemon, always use chrony
* Switch references from 'yum_install_epel' to 'dnf_install_epel'
* Remove overcloud host image workaround for tagged VLAN admin network
* Remove the kayobe.utils.yum_install function, which is unused

Change-Id: I368f6edafed9779658798fc342116b4c1b3ffd48
Story: 2006574
Task: 39481
2020-05-28 10:25:51 +01:00
Zuul 558276a8a6 Merge "CI: Add overcloud host configure job" 2020-04-24 00:03:24 +00:00
Zuul 7932314e54 Merge "Use upper constraints when installing Tenks" 2020-04-22 20:11:14 +00:00
Zuul 6b19b817cf Merge "CI: Test SSH connectivity to deployed instances" 2020-04-22 00:28:44 +00: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