2373 Commits

Author SHA1 Message Date
Alex-Welsh
d7069283fd added option to skip hooks
adds the argument --skip-hooks/-sh which will stop the execution of
hooked ansible playbooks. Either a pattern can be specified to match
against or hook execution can be stopped altogether with "all"

Story: 2009241
Task: 43390

Change-Id: I4f2176aa056fec62e31d07140e3d05779480a93d
2022-10-04 14:40:31 +01:00
Zuul
608951fcce Merge "Add new DIB upper constraints variables" 2022-09-15 10:18:11 +00:00
Michal Nasiadka
9cbd1e2f52 CI: Drop centos8s and rocky8 jobs
After I3f7b480519aea38c3927bee7fb2c23eea178554d kolla-ansible
does not support EL8.

Those will be readded as Rocky9 via [1].

[1]: https://review.opendev.org/c/openstack/kayobe/+/855656

Change-Id: I6c3f9d8c54d0c6819092bd68b724a28048ac9e16
2022-09-13 13:03:37 +02:00
Rafal Lewandowski
e10f176ce1 Add new DIB upper constraints variables
overcloud-dib: added overcloud_dib_dib_upper_constraints_file
ipa: added ipa_build_dib_upper_constraints_file
added os_images_dib_upper_constraints_file to image build
playbooks

New variables were added to facilitate control over the DIB
upper constraints without changing them for other components.
They are empty by default in order to facilitate Rocky9
image builds.

Change-Id: Ib50dd61685f13c60ace67213ddd1e714a80dece3
2022-09-13 11:23:58 +02:00
Zuul
4a3f88694e Merge "Move group_vars to an inventory directory" 2022-09-08 14:48:26 +00:00
Michal Nasiadka
cfb5c004ea nclu-switch: Fix order in template
Currently description is applied first to the interface, but if it's a
virtual one - it won't exist before running the configuration commands.

Story: 2010279
Task: 46232

Change-Id: I40212b40a4d391272f4063f42e8a7043b3d58fd7
2022-09-08 11:33:33 +02:00
Mark Goddard
af3b719b73 Move group_vars to an inventory directory
The group variables originally in ansible/group_vars/ were playbook
group variables, due to being adjacent to the playbooks. Typically they
provided default values for global variables in the all group, as well
as some more specific groups. This has worked fairly well, but results
in (at least) a couple of problems.

1. The default variable precedence rules mean that these playbook group
   variables have a higher precedence than inventory group variables
   (for a given group). This can make it challenging to override
   playbook group variables in the inventory in Kayobe configuration.

2. Any playbook run by Kayobe must be in the same directory as the
   playbook group variables in order to use them. Given that they
   include variables required for connectivity such as ansible_host and
   ansible_user, this is quite critical. For Kayobe custom playbooks, we
   work around this by symlinking to the group_vars directory from the
   directory containing the custom playbook. This is not an elegant
   workaround, and has assumptions about the relative paths of the
   Kayobe configuration and virtual environment in which Kayobe is
   installed.

Story: 2010280
Task: 46233

Change-Id: Ifea5c7e73f6f410f96a7398bfd349d1f631d9fc0
2022-09-08 10:11:23 +01:00
Zuul
6e2f5a1884 Merge "Fix IP allocation limit in overcloud inventory discover" 2022-08-29 14:37:41 +00:00
Zuul
51b8b6f43f Merge "unit tests: Use assertListEqual and maxDiff = None" 2022-08-26 16:45:42 +00:00
Zuul
a2985978fa Merge "Improve comments in networking config files" 2022-08-26 16:45:39 +00:00
Zuul
149ed3469c Merge "Support --kolla-playbook argument" 2022-08-26 16:45:36 +00:00
Zuul
12b37356ba Merge "Fix use of become_user by installing acl package" 2022-08-26 16:45:33 +00:00
Zuul
a4281c54ee Merge "Remove timezone playbook" 2022-08-26 16:45:30 +00:00
Zuul
73b9ec07b4 Merge "Add support for specifying SNAT source and destination filters" 2022-08-26 16:19:11 +00:00
Zuul
a9292dc7f2 Merge "Remove unused parameter from seed container example" 2022-08-26 16:19:08 +00:00
Zuul
440c8b0e14 Merge "docs: fix formatting" 2022-08-26 14:33:19 +00:00
Mark Goddard
d490367634 Fix IP allocation limit in overcloud inventory discover
After generating an inventory file in 'kayobe overcloud inventory
discover', the IP allocation playbook runs to allocate IP addresses for
the new hosts. Currently this runs without a limit, meaning it targets
all hosts. This change fixes it to use a limit of overcloud.

TrivialFix

Change-Id: Ic3a98fb9e741a2dea792b2e6cf6a6ff802d099a2
2022-08-26 14:19:14 +00:00
Zuul
d7fa6c5358 Merge "Support authentication in Bifrost" 2022-08-26 13:35:34 +00:00
Mark Goddard
32a82ea039 Support authentication in Bifrost
* Switch from python-ironic-inspector-client to openstacksdk in
  ironic-inspector-rules. This allows us to use clouds.yaml to provide
  credentials.
* Enable authentication in Bifrost. Passwords are auto-generated by
  Bifrost, and stored files in /root/.config/bifrost/. This change
  depends on a Kolla Ansible patch that ensures that these credentials
  are persisted between recreations of the bifrost container.
* Copy clouds.yaml and (if present) a CA certificate from the Bifrost
  container to the seed host, under the Kayobe Ansible user (stack).
  This allows us to use the credentials to register introspection rules.
* This patch is needed by a Kolla Ansible patch that enables TLS in
  Bifrost, since we need the CA certificate on the host to register
  introspection rules when TLS is enabled.

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/851837
Needed-By: https://review.opendev.org/c/openstack/kolla-ansible/+/851838

Story: 2010206
Task: 45930

Change-Id: I757f1bb72afb01a4f1689bed292f5b71b9048fa0
2022-08-25 11:56:03 +02:00
Pierre Riteau
15ff2be7e5 docs: fix formatting
Change-Id: I26f6b1a995014e14688d072c43f375b3897e4416
2022-08-23 18:18:53 +02:00
Mark Goddard
0e4af118eb Support additional build host packages for IPA & overcloud
Adds support for installing additional build host dependencies when
building IPA and overcloud host images via
'ipa_build_dib_host_packages_extra' and
'overcloud_dib_host_packages_extra'.

Support for installing additional host packages was added in
stackhpc.os-images v1.15.0 [1].

[1] https://github.com/stackhpc/ansible-role-os-images/pull/63

Change-Id: I1a05d448031cb415cec4cd601a030abdb8a5eba5
2022-08-22 15:24:55 +02:00
Mark Goddard
a477cd9022 Fix use of become_user by installing acl package
Change-Id: I69bf810632d09eddaa3983ae56e833debe9fd03b
2022-08-17 11:29:36 +01:00
Pierre Riteau
3903ca92e9 Add support for specifying SNAT source and destination filters
This is useful if forwarded packets need to exit on a different
interface depending on the source or destination IP address or port.

Change-Id: Ifbfbade4baaa1901b08549e52acc725e45379a16
2022-08-11 12:42:57 +02:00
Zuul
a2f9801034 Merge "Add support for Ubuntu Jammy Jellyfish (22.04) LTS" 2022-08-08 09:29:02 +00:00
Zuul
2b308d6747 Merge "Update to latest Rocky Linux cloud image" 2022-08-05 19:15:57 +00:00
Zuul
ac90e076d2 Merge "Add support for firewalld on Ubuntu" 2022-08-05 14:37:09 +00:00
Michal Nasiadka
ebf8cfca62 Add support for Ubuntu Jammy Jellyfish (22.04) LTS
Co-Authored-By: Bartosz Bezak <bartosz@stackhpc.com>

Change-Id: I06a3e9922cf95979f3bca120cd82633046270fa3
2022-07-29 11:26:58 +02:00
k-s-dean
6990a041c7 Add support for firewalld on Ubuntu
Enables the installation and configuration of firewalld on Ubuntu
systems.

Change-Id: I4a97a2aeed277be672e15e5c7727b810e11d3c42
Story: 2010160
Task: 45818
2022-07-27 10:54:43 +01:00
Mark Goddard
79a8610030 Support --kolla-playbook argument
Adds support for specifying a custom playbook when running Kolla Ansible
commands via a '--kolla-playbook' argument.

Change-Id: Ie4bba0f1bdc82657572e0f06a71db1140c0bd3a4
2022-07-26 09:27:46 +01:00
Michal Nasiadka
5ee99c5948 ovn: add network group to neutron-ovn-metadata-agent
Follow up after I111df79f08eb76a735f33c6edf03b5a302fb6cc3 in kolla-ansible

Change-Id: I7e10b851016253bf85625e9daa89416c738242e8
2022-07-21 08:18:45 +02:00
Pierre Riteau
0030c5f1ed Update to latest Rocky Linux cloud image
The 8.5 image has moved to the Rocky Linux Vault.

Change-Id: I86c92a1b0b8cf5e4dc534e04709e38bd90f7660e
2022-07-20 12:28:46 +00:00
Pierre Riteau
a9d00a2073 Remove unused parameter from seed container example
The keys in the seed_containers dictionary are used as container names.

Change-Id: I3a95382cf6e761c5c0e5c7a47d6477b3cdfa8c19
2022-07-19 14:02:56 +02:00
Pierre Riteau
17d49908af Add missing dot in hook name
Change-Id: Ib182558e31da9d79a14f383c6a1d60fa66f1dc75
2022-07-19 10:29:22 +02:00
Mark Goddard
051f0c2345 Improve comments in networking config files
In networks.yml and inventory group_vars that become part of
kayobe-config, there are a lot of commented out variables for networks
that may or may not exist in a deployment. These are not always that
helpful, and may be actively harmful if the network names in a
deployment are different.

This change removes these variables, and replaces them with a short
explanation of what to add to the section.

Change-Id: I88abe2c515b60e1f1c4c7c073818ff3e47436e64
2022-07-18 14:56:25 +01:00
Mark Goddard
4ba8903004 unit tests: Use assertListEqual and maxDiff = None
Currently the output is truncated when mock call lists don't match. This
makes it difficult to diagnose the issue. Use assertListEqual and
maxDiff = None to avoid truncating the output.

Change-Id: I93bc6907e926722156739297ac58c327e9743d9d
2022-07-08 11:10:21 +01: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
Will Szumski
836f394a6d Run selinux playbook on seed hypervisor
Change-Id: Iec0b9cd24eda4fc0fc38003dea66c50ece7425b6
2022-06-24 14:00:13 +00:00
Michal Nasiadka
caa7cc54ee selinux: default to permissive
The disable-selinux role has been renamed to selinux and now supports
setting desired state.

Previously Kayobe was defaulting to disabling and rebooted the host - to
avoid audit logs filling up. This change allows operators to define
desired SELinux state and defaults to permissive - to adhere to those
site policies that require SELinux to be at least in permissive state.

Change-Id: I42933b0b7d55c69c9f6992e331fafb2e6c42d4d1
2022-06-17 09:24:27 +02:00
Pierre Riteau
66f763ea06 Remove timezone playbook
It is time.

Change-Id: I25fd8d4e4bcef4b015a1634ace927e37aa2e80a9
2022-06-17 07:38:53 +02:00
Zuul
0c9912ece1 Merge "Use openstack-ci-mirrors in overcloud and ipa image builds" 2022-06-16 14:02:58 +00:00
Zuul
258dd730d1 Merge "Force use of yoga upper constraints in ipa-builder" 2022-06-15 12:49:43 +00:00
Michal Nasiadka
002c08e032 Use openstack-ci-mirrors in overcloud and ipa image builds
Change-Id: Ibf4b928222713bedb7e856307f5ad91e60953795
2022-06-10 17:38:02 +02:00
Pierre Riteau
4ce746c199 Force use of yoga upper constraints in ipa-builder
IPA itself is still compatible with Python 3.6, but ipa-builder uses
master upper-constraints which have dropped support for 3.6 and are
pulling importlib-metadata===4.11.4, which requires 3.7.

    ERROR: Cannot install ironic-python-agent==8.6.1.dev13 because these package versions have conflicting dependencies.

    The conflict is caused by:
        ironic-python-agent 8.6.1.dev13 depends on importlib_metadata>=1.7.0
        The user requested (constraint) importlib-metadata===4.11.4

Change-Id: I0cc48d0d5ed17400badb081e9117c9351677bb38
2022-06-10 15:18:46 +02:00
Zuul
c8b89504e9 Merge "Add support for dellos10 switch configuration" 2022-06-10 11:39:21 +00:00
John Garbutt
9d8f8645e2 docs: update switch list to include arista eos
The support was added in this commit, but the docs were not updated:
c6263dbfd4dfbac5f53a4fdd94b154811fbd0af6

Change-Id: Icfc5cbc80af1199ad00f78292c6228273af701aa
2022-06-09 22:06:08 +02:00
Will Szumski
1fbb5cb400 Add support for dellos10 switch configuration
Change-Id: I2823016294e7df63f63be9ab26535b3962a71ebe
2022-06-09 21:59:33 +02:00
Rafal Lewandowski
b77033970a Add missing declaration of kolla_enable_hacluster
Story: 2010069
Task: 45540
Change-Id: I0658c0059867468d6032cb1bfa3d05ae0d01c422
2022-06-06 10:28:13 +02:00
Zuul
00eeec773c Merge "ironic: Set MTU on provisioning and cleaning Neutron networks" 2022-05-27 17:47:30 +00:00
Maksim Malchuk
3e7b01ad82 Fix forgotten hacluster regexp for image build
The 'overcloud container image build' command didn't build all the
hacluster images when hacluster is enabled.

TrivialFix

Change-Id: I9150e32579421e46782518948188e1363918fb39
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2022-05-25 12:34:53 +00: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