This support is now available in the MichaelRigart.interfaces role.
The host configuration CI test has been updated to test policy-based
routing routes and rules on CentOS Stream and Rocky Linux. It also now
tests both the string and dict rule formats on CentOS and Rocky.
Change-Id: Ie77530c38ab426dcbaa442776bcf048d7bbc0f01
Refactored the code to switch the distribution source of the roles
to new collections for the roles that have already been migrated into
collections.
Updated:
- requirements
- role invocations
- documentation
- release notes
- minor whitespace fixes
Change-Id: I8dbb88aa2061b3afcab07caeb30f45b3a5c939af
Add the command ``kayobe baremetal introspection data save`` to save the
hardware introspection data gathered by ``kayobe baremetal compute
inspect``. This mirrors the functionality of ``kayobe overcloud
introspection data save``, but for use with the baremetal compute
Ironic, rather than Bifrost.
Change-Id: I654f7d6e923c442a8aa08f536cc2b82c5e5b69d1
Supports calling custom Kolla Ansible commands directly after a
``kayobe control host bootstrap``.
Change-Id: I19f188cc002f8578618003e90c0a4a154b806e49
Previously it was only possible to define custom playbook hooks in the
base configuration, and not in environments. This could be limiting in
cases where different environments require different hooks.
With this change it is now possible to define hooks both in the base
configuration and in environments.
Change-Id: Ic003c18402177318ac1aa4c2d851263893bd4e9f
If inline Ansible vault encryption is used to define an encrypted
variable in kayobe-config, running 'kayobe configuration dump -l <host>'
fails with the following:
Failed to decode config dump YAML file /tmp/tmp_fg1bv_j/localhost.yml:
ConstructorError(None, None, "could not determine a constructor for
the tag '!vault'", <yaml.error.Mark object at 0x7f1e5c7404c0>)
This change fixes the error by using the Ansible YAML loader which
supports the vault tag. Any vault encrypted variables are sanitised in
the dump output. Note that variables in vault encrypted files are not
sanitised.
Change-Id: I4830500d3c927b0689b6f0bca32c28137916420b
Closes-Bug: #2031390
We are seeing an issue on Rocky Linux 9 where VLAN interfaces on bridges
have their MTU set to MTU-1 after rebooting. This is likely related to
how MTU is set by NetworkManager for bridges: it first sets the MTU to
MTU-1 before setting it to the correct value [1].
We can work around this issue by not explicitly setting the MTU
configuration on the VLAN interface if it is the same as the parent
bridge. It will be automatically inherited from the parent.
[1] 864872e9a8
Closes-Bug: #2039947
Change-Id: I23366f4de7842e7c2fe40e431fac76f26e9892de
Backports of I9dd5b97dec93c0e5393a1e7d9640f85003651b56 to stable
branches are failing CI checks because several unit tests mock
os.path.exists and would need to be updated. This does not affect master
because test code changed in I4d9f96ec4cf3c6cd0d28dfe5ddb239d863498a72.
Work around this issue by replacing os.path.exists by os.path.isfile. It
is a better check anyway since we are reading the file.
Change-Id: Ic53efd03cecbd53ad3e3b64b664e084f4e25be0e
Related-Bug: #2020135
The return value was set to the following path which is not valid:
kayobe/kayobe/utils.py/..
The intent must have been to use dirname to produce:
kayobe/kayobe/..
Change-Id: I9d7d71d42026f3c12da6de9c5ca55dc647554fd0
Using an editable installation of Kayobe fails on Rocky Linux 9 or
Ubuntu with an error such as:
ERROR! The requirements file '/home/rocky/kayobe/kayobe/requirements.yml' does not exist.
Failed to install Ansible roles from /home/rocky/kayobe/kayobe/utils.py/../requirements.yml via Ansible Galaxy: returncode 1
Control host bootstrap failed - likely Ansible Galaxy flakiness. Sleeping 5 seconds before retrying
This is caused by recent changes to how pip manages editable
installations. The egg-link file that Kayobe was using to find the
source path does not exist anymore. Instead, there is a direct_url.json
file under the kayobe dist-info directory that can be parsed.
Change-Id: I9dd5b97dec93c0e5393a1e7d9640f85003651b56
Closes-Bug: #2020135
For Rocky Linux 9, Kayobe will now disable STP on a bridge by default,
to preserve compatibility with network scripts, as Network Manager
enables STP on all bridges by default.
Enabling STP can lead to port down event if BPDU guard is enabled
on the switch.
Closes-Bug: #2028775
Change-Id: I35eaa92f4243af00697306aa801e5a733885ce4f
Allows you to combine multiple environments by declaring any dependencies.
Story: 2002009
Task: 42911
Change-Id: I4d9f96ec4cf3c6cd0d28dfe5ddb239d863498a72
This patch adds new functionality - merging base & environment specific
kolla config. This allows you to place common settings in the base
configuration and only keep environment specific settings in the
environment directories.
Change-Id: Id4588f4529a4522e68e22ce58711cb927fa68a9d
Story: 2002009
Task: 42903
Previously, we only supported passing through group_vars. Passing
through the inventory as is allows you to use other features of ansible
inventory such as host vars. It also simplifies the logic of merging
multiple inventories as we can just pass the inventory to ansible and
let ansible take care of the rest. This is useful for the multiple
environments feature.
Change-Id: I28f5d73d414d405d67f5fc92ab371aa2e28a4ce3
Story: 2002009
Task: 42910
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/802863
If running a command in check mode such as
kayobe overcloud service deploy --check
Kayobe does not generate the local configuration for Kolla Ansible. This
can lead to an inaccurate result when comparing with the remote
configuration, if there are changes in kayobe-config.
For example:
* Run kayobe overcloud service deploy
* Change a file in etc/kayobe/kolla
* Run kayobe overcloud service deploy --check --diff
We would expect that the changed file results in a diff against the
remote config. However there is no diff displayed.
This change fixes the issue by always generating the local Kolla Ansible
config, even in check mode.
Change-Id: Ic1dd075076ea186b0928bba1a235605c0cd2ec71
Story: 2010526
Task: 47132
The dib_env_vars variable in the Bifrost's dib.yml file can contain
the DIB_BLOCK_DEVICE_CONFIG environment variable which is always the
Multiline-YAML data. By default, the format of the data is not
preserved while the configuration is merged and saved for the
bifrost-deploy container.
This is because Ansible uses the PyYAML library which has a default
80 symbol string length limit. The official Ansible documentation [1]
recommends using to_yaml or to_nice_yaml filters with width parameter.
This change adds the same ability to the merge_yaml Ansible plugin.
1. https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#formatting-data-yaml-and-json
The related change for the diskimage-builder to solve the issue with
incorrect data provided by Kolla-Ansible is also provided:
I3b74ede69eb064ad813a9108ec68a228e549e8bb
The related change for Kolla-Ansible is also provided:
Id79445c0311916ac6c1beb3986e14f652ee5a63c
Closes-Bug: #2014981
Related-Bug: #2014980
Change-Id: I339042d9ce405f59aba936dd98df7d89a88bb41e
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
This change fixes the output 'module_args' information of the plugins
'merge_configs' and 'merge_yaml' when Ansible is executed in maximum
verbose mode. Now all the plugin options are displayed instead of
standard 'copy' plugin options only.
Change-Id: Ie2d9a0501fe29bfd854eb31258f282b197855948
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
The 'kayobe * host configure' commands no longer use the 'kolla-ansible
bootstrap-servers' command, and associated 'baremetal' role in Kolla
Ansible. The functionality provided by the 'baremetal' role has been
extracted into the openstack.kolla Ansible collection, and split
into separate roles. This allows Kayobe to use it directly, and only the
necessary parts.
This change improves failure handling in these Kayobe commands, and aims
to reduce confusion over which '--limit' and '--tags' arguments to
provide. This ensures that if a host fails during a host configuration
command, other hosts are able to continue to completion. Previously, if
any host failed during the Kayobe playbooks, the 'kolla-ansible
bootstrap-servers' command would not run. This is useful at scale, where
host failures occur more frequently.
This change has implications for configuration of Kayobe, since some
variables that were previously in Kolla Ansible are now in Kayobe.
Several parts of the baremetal role have been split out and used here:
* apparmor-libvirt: disable AppArmor rules for libvirt on Ubuntu.
* docker: Docker installation & configuration. The docker role in
openstack.kolla combines functionality from kolla-ansible and kayobe.
* etc-hosts: it proved difficult to generalise this, so we have some
almost duplicated the code from kolla-ansible here. Requires delegated
fact gathering for the case when --limit is used.
* firewall: support to disable UFW, for feature parity.
* kolla-packages: miscellaneous package installs & removals.
The addition of the stack user to the docker group has been moved to the
user bootstrapping playbook, and the docker SDK installation has been
moved to the virtualenv setup playbook.
Depends-On: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/829587
Story: 2009854
Task: 44505
Change-Id: I61a61ca59652b13687c2247d5881012b51f666a7
If you give your bridge a long enough name, eg. `br-external`. The
extra characters added to the veth pairs can make the interface name
go beyond the 15 character limit. We can solve this by truncating the
name of the bridge used in the veth names.
Change-Id: I5b890e24195d033897a597a0a93a1cacfb2030d2
Adds the command ``kayobe overcloud service configuration validate`` to
run the ``oslo-config-validator`` on all hosts via Kolla-Ansible. The
output directory of the results is specified with the flag
``--output-dir``.
Change-Id: I5d5d16eeabe69e8659e33722165928df096b3559
Kayobe provides various roles and plugins in the ansible directory.
These are accessible to Kayobe playbooks in the same directory.
In some cases it can be useful to use these items from Kayobe custom
playbooks, however they cannot since they reside in a different
directory. Typically we work around this by symlinking to the relevant
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.
This change adds the Kayobe role, collection, and plugin paths to the
relevant Ansible lookup paths using environment variables. This allows
custom playbooks to use these items. Also added to the lookup paths are
roles, collections and plugins in Kayobe configuration in the
etc/kayobe/ansible/ directory. This removes the limitation of playbooks
needing to reside in the same directory as those items in order to use
them.
We import the Ansible configuration settings module directly, since it
avoids replicating the configuration logic.
Story: 2010280
Task: 46234
Change-Id: I2fb2b4d7ed937e0184a62b0f119659569448f8df
This change bumps up the maximum supported Ansible version to 6.x
(ansible-core 2.13.x) and minimum to 5.x. This synchronises Kayobe with
Kolla Ansible.
Shebang has been removed from modules due to [1].
os_openstacksdk_version has been added as openstack cloud modules don't
support versions greater than 0.99.
[1]: https://github.com/ansible/ansible/pull/76677
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/867546
Change-Id: Ibb00f6d079442a8509411ae8a71d74fd7bd8cccd
This follows removal of support from Kolla Ansible. This also removes
support for configuring Grafana with overcloud post configure.
Change-Id: I8102fafb00db178f1ae6801d37c43a39033cbfe6
Provide the option to add hosts to the SSH known hosts file when running
control host bootstrap.
Story: 2001670
Task: 6716
Change-Id: I512a343f875ee95194ab4fa98872e349f5a6dc7b