614 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov
9ad3fd7681 Auto-fix usage of modules via FQCN
Since ansible-core 2.10 it is recommended to use modules via FQCN
In order to align with recommendation, we perform migration
by applying suggestions made by `ansible-lint --fix=fqcn`

Change-Id: Ib3dafb476992c0c75ae1b3cc84024463641a0775
2025-02-12 12:45:21 +01:00
Dmitriy Rabotyagov
a6d3897090 Auto-fix yaml rules
In order to reduce divergance with ansible-lint rules, we apply
auto-fixing of violations.

In current patch we replace all kind of truthy variables with
`true` or `false` values to align with recommendations along with
alignment of used quotes.

Change-Id: If512039bae99218e054a8841cb32c3903b616ed7
2025-02-12 12:31:16 +01:00
Jonathan Heathcote
c2684a0a9e Migrate to from removed idrac-wsman to idrac-redfish
Closes-Bug: #2097444
Change-Id: I78f20542e2510e4a700bf506f10be518ecfc9404
2025-02-05 15:22:58 +00:00
Zuul
a4d125650b Merge "Fix quorum queue support for ironic-inspector" 2025-01-31 11:27:06 +00:00
Jonathan Heathcote
6d6b41731d Fix Ironic IPA version for 2024.2
Change-Id: Id41a9a3deaaff6b110755d7b0f4d23c5937748d1
2025-01-28 17:02:09 +00:00
Andrew Bonney
3f7e851b98 Fix quorum queue support for ironic-inspector
Configuration of RPC for ironic-inspector was a bit of a mixed
bag, with some config fixed at defaults which are only relevant
for HA queues. This conforms it to the way the majority of
variables are managed.

Note that this changes the default for
ironic_inspector_oslomsg_rpc_use_ssl, but this should be set via
oslomsg_rpc_use_ssl anyway.

This also removes various unused inspector notification defaults.

Change-Id: I7edc658f57de5ffc6d4aa158b02d26fa3ad71c9d
2025-01-20 10:51:25 +00:00
Jonathan Rosser
82e1741477 Remove support for amqp1
Support is removed in oslo.messaging so we remove support in
openstack-ansible roles.

Change-Id: I5d8a0e8752a403004aa3166e613081583449b259
2025-01-06 10:40:45 +00:00
Andrew Bonney
efbcae40b1 Change references to aki/ari to raw format
As noted in https://bugs.launchpad.net/ironic/+bug/2074090
the kernel and ramdisk images now need to be uploaded in raw
format due to fixes for underlying CVEs.

Change-Id: I2b74d9ab4d07a4d5b6045d353cf91db70c4e6cb1
2024-11-25 19:29:37 +00:00
Jonathan Rosser
b3bbef88b3 Replace default nginx config on rh-like systems
The default nginx config file on centos/rocky includes a server
section listening on port 80 and [::]:80. There is no way to disable
this other than to adjust the configuration file.

This patch supplies a modified version of the centos nginx config
file which does not include a default server section.

A systemd drop in is installed to override the nginx service
ExecStart which starts the service using the modified configuration
file.

Change-Id: If7674a750e5316feb4d0fcff8cd0f4df7a67ffbb
2024-11-20 11:39:53 +00:00
Dmitriy Rabotyagov
8980eacd67 Ensure that first/last host detection is deterministic
With ansible-core 2.16 a breaking changes landed [1] to some filters
making their result returned in arbitrary order. With that, we were
relying on them to always return exactly same ordered lists.

With that we need to ensure that we still have determenistic behaviour
where this is important.

[1] https://github.com/ansible/ansible/issues/82554

Change-Id: Id2aaa7d32b6a0c25699e6e8031ae23480efdbad3
2024-07-22 15:36:56 +02:00
Zuul
f7a63626fc Merge "Fix Ironic IPA version for 2024.1" 2024-07-09 19:29:23 +00:00
Andrew Bonney
aa2e8c319a Add new RBAC parameters which are necessary from 2024.1
See https://review.opendev.org/c/openstack/ironic/+/907148

Ironic enables oslo policy RBAC changes from 2024.1 by default.
Once enabled, in theory system scoped tokens are required for
various actions, but in practice this doesn't necessarily work
when interacting with other services.

New Ironic variables provide the means to continue with a
relatively standard deployment without having to make
far-reaching policy changes.

Change-Id: I2cb53414cce3a899a0db5f74e56798de95c6c4b1
2024-07-02 13:11:42 +01:00
Andrew Bonney
4e39cfd58e Fix Ironic IPA version for 2024.1
Change-Id: I74863815e83df675f5a763ac182c1ad5b26d4d91
2024-07-02 13:07:09 +01:00
Zuul
8d9997d103 Merge "reno: Update master for unmaintained/zed" 2024-06-06 10:53:09 +00:00
Dmitriy Rabotyagov
afae289013 Define unique hostname for QManager
Due to the shortcoming of QManager implementation [1], in case of uWSGI
usage on metal hosts, the flow ends up with having the same
hostname/processname set, making services to fight over same file
under SHM.

In order to avoid this, we prepend the hostname with a service_name.
We can not change processname instead, since it will lead to the fight
between different processes of the same service.

[1] https://bugs.launchpad.net/oslo.messaging/+bug/2065922

Change-Id: I562e8d0a65b12aa8ce88caea2d7e955f78c3bf33
2024-05-26 09:17:24 +00:00
Zuul
993ab16cab Merge "Add tag to enable targeting of post-install config elements only" 2024-05-16 20:52:56 +00:00
Andrew Bonney
0ad636ef46 Add tag to enable targeting of post-install config elements only
<service>-config tags are quite broad and have a long execution
time. Where you only need to modify a service's '.conf' file and
similar it is useful to have a quicker method to do so.

Change-Id: Ic1a896df1ba8d14aca9a12e0adf0d1822a5262d3
2024-05-15 09:09:22 +01:00
784cb9cdc7 reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.

Change-Id: I605a37f27d1eeeac76841f48a390b6c58e5bbae5
2024-05-10 18:55:35 +00:00
Dmitriy Rabotyagov
a8d0a32b5d Implement variables to address oslo.messaging improvements
During last release cycle oslo.messaging has landed [1] series of extremely
useful changes that are designed to implement modern messaging
techniques for rabbitmq quorum queues.

Since these changes are breaking and require queues being re-created,
it makes total sense to align these with migration to quorum queues by default.

[1] https://review.opendev.org/q/topic:%22bug-2031497%22

Change-Id: Ia0d7ac84ced77511b82f28e409477e4d1589adb6
2024-05-10 19:04:18 +02:00
Dmitriy Rabotyagov
3ecb27ab51 Add variable to globally control notifications enablement
In order to be able to globally enable notification reporting for all services,
without an need to have ceilometer deployed or bunch of overrides for each
service, we add `oslomsg_notify_enabled` variable that aims to control
behaviour of enabled notifications.

Presence of ceilometer is still respected by default and being referenced.

Potential usecase are various billing panels that do rely on notifications
but do not require presence of Ceilometer.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/914144
Change-Id: I9efc107116b149b75b2ed8b54335758e57d6dabc
2024-05-03 19:43:56 +02:00
Dmitriy Rabotyagov
84170d8491 Add service policies defenition
In order to allow definition of policies per service, we need to add variables
to service roles, that will be passed to openstack.osa.mq_setup.

Currently this can be handled by leveraging group_vars and overriding `oslomsg_rpc_policies` as a whole, but it's not obvious and
can be non-trivial for some groups which are co-locating multiple services
or in case of metal deployments.

Change-Id: Ia7bb2a6ddd3ccdf887ca514ff6b03f41fb8af612
2024-05-03 19:38:12 +02:00
James Denton
d9cfc61d02 Fixed typo for stackhpc-inspector-plugins package
Quick fix to address a typo in the URL for stackhpc-inspector-plugins.

Change-Id: Ie418974bc01d77f262d6593b3b9e3fb072a7be89
2024-02-15 08:53:56 -06:00
Zuul
7425ad4313 Merge "Fix a typo in pxe_redfish definition" 2024-02-13 15:49:59 +00:00
Dmitriy Rabotyagov
ca0a92ee2a Fix a typo in pxe_redfish definition
This typo leads for drivers misconfiguration and being unable to register
redfish as a proper driver.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/907180
Closes-Bug: #2050835
Change-Id: I0a2c3f3019f20c18dcfbc82847c432e656eda051
2024-01-30 08:47:42 +00:00
Dmitriy Rabotyagov
218724412b Allow to extend default ironic_driver_types
This patch implements extra variable that allows to define extra types
for ironic without need to fully override the existing ones.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/907180
Change-Id: Ic35dbeae949ba4425a0e352e51de64122b7c13d5
2024-01-30 08:47:29 +00:00
Zuul
8a3b336ca3 Merge "Stop generating ssh keypair for ironic user" 2023-12-13 05:28:44 +00:00
Andrew Bonney
ed85e8d2b1 Use common value for inspector callback URL
It appears this was missed in patch
Ib8d53b394937405c821687b1c46b2b19112267dd

This patch conforms the other pxe config to use the same
inspector callback URL

Change-Id: I5eee7d054bb4eda70acbaab9885c3985efb04002
2023-11-02 10:47:06 +00:00
Dmitriy Rabotyagov
fcde81e4a7 Add quorum queues support for service
This change implements and enables by default quorum support
for rabbitmq as well as providing default variables to globally tune
it's behaviour.

In order to ensure upgrade path and ability to switch back to HA queues
we change vhost names with removing leading `/`, as enabling quorum
requires to remove exchange which is tricky thing to do with running
services.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: I0f6ae74be36c0cb7a2270cfa1085c44e6dd4dc77
2023-10-20 12:19:49 +00:00
Dmitriy Rabotyagov
fb50e99438 Stop generating ssh keypair for ironic user
There is no obvious need to have an SSH keypairs for ironic user
I was not able to find any proof in the project installation guide that
such keypairs were ever needed. Thus, such functionality is removed.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: I493d5f5aa0a915e7bc9fb7dbcd2673749c0b95d3
2023-10-14 08:50:18 +00:00
Zuul
0f2e50ba41 Merge "Fix lack of constraints for ironic-inspector" 2023-08-17 13:04:51 +00:00
Dmitriy Rabotyagov
f5180b7ba1 Stop reffering _member_ role
Keystone has stopped providing or reffering `_member_` role for a while,
thus role should not be refferenced anymore.

Moreover, with 2023.1 service policies have dropped `_member_`
which resulted in the role to be insufficient for basic operations.

Change-Id: I3ee97d4b7a3070211dbba3824f9d605da3b8bd01
Related-Bug: #2029486
2023-08-15 13:02:56 +02:00
Andrew Bonney
a665f45a69 Fix lack of constraints for ironic-inspector
OSA playbooks only call this role once for all Ironic containers
(API and inspector). As a result, the wheel builds only happen
once. If the first host (which is responsible for wheel builds)
is an API container, these vars would prevent Ironic inspector
requirements being accounted for, and as such no matching
constraints will be generated.

When the venv is deployed to the Ironic inspector container,
the lack of constraints can cause dependencies which are too new
to be installed, causing the service to fail.

Alternatively this role could be called twice by the playbook
for differing container/host roles, but as inspector is expected
to be merged into ironic at some point this feels equally valid.

Change-Id: I3952a4e5514824381410d87ed6d535f13ec40498
2023-08-02 14:44:56 +01:00
Dmitriy Rabotyagov
7226653ad9 Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Change-Id: I1ab9664505068c20924370790322caa67cc6e022
2023-07-14 18:07:30 +02:00
Damian Dabrowski
36468adfac Define ipa-insecure=1 in LXC example
In LXC example, the BMAAS network is not routable to any other networks
nor to the internal VIP.
It means that Ironic Python Agent(IPA) is not able to communicate with
ironic API and ironic inspector over haproxy.
To solve that issue, `ironic_inspector_callback_url` and
`ironic_ironic_conf_overrides.service_catalog.endpoint_override` values
were overriden to instruct IPA to communicate with ironic api/inspector
backends directly on BMAAS network(instead of going via HAProxy on
management network).
It may cause a problem with certificate verification if these backends
are listening on https because most likely they are using self-signed
certificate.
As a workaround, `ipa-insecure=1` kernel parameter[1] is added to IPA
for both inspection and deployment.

[1] https://docs.openstack.org/ironic-python-agent/latest/install/index.html#ipa-and-tls

Change-Id: Idfb5a4e9bf4f39441fc99b5aa78500d6195e6da0
2023-05-23 18:57:22 +02:00
Zuul
e1aea9e9fd Merge "Add driver type for redfish" 2023-05-04 23:13:50 +00:00
Zuul
a8cd6a7658 Merge "Add TLS support to ironic backends" 2023-05-03 11:41:33 +00:00
Damian Dabrowski
61fd6b6e14 Add TLS support to ironic backends
By overriding the variable `ironic_backend_ssl: True` HTTPS will
be enabled, disabling HTTP support on the ironic backend api.

The ansible-role-pki is used to generate the required TLS
certificates if this functionality is enabled.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/879085
Change-Id: If97a857c36e9e3e7ad8a18926bb9cbf04189c7cb
2023-04-29 18:37:37 +02:00
Jonathan Rosser
b10a951953 Add driver type for redfish
Change-Id: I4a3d455cdddea3c0273c8350e0ddbbf0a0114cac
2023-04-25 08:19:16 +01:00
Jonathan Rosser
72cbb5c5e0 Add example networking-generic-switch user role for Arista switch
Change-Id: Ibb15f08fbeaf03e8a4f453066614a511ce7f250c
2023-04-19 08:36:31 +01:00
Dmitriy Rabotyagov
e9fab281bd Ensure service is restarted on unit file changes
At the moment we don't restart services if systemd unit file is changed.

We knowingly prevent systemd_service role handlers to execute
by providing `state: started` as otherwise service will be restarted twice.
With that now  we ensure that role handlers will also listen for systemd
unit changes.

Change-Id: Ia9d1164e1e38201244a062be95f936b314c5c56b
2023-04-10 14:08:08 +00:00
Zuul
e7099c1e47 Merge "Add a no_driver ironic driver type" 2023-04-04 19:29:17 +00:00
Zuul
0d90a08756 Merge "Enable raid interface implementations for ironic hardware drivers" 2023-04-04 19:29:16 +00:00
Zuul
1740d36112 Merge "Rename idrac interfaces to idrac-wsman" 2023-04-04 19:29:14 +00:00
Zuul
ee60da284a Merge "Install socat and configure ipmtool-socat console interface" 2023-04-04 19:29:13 +00:00
Zuul
e4a068ce45 Merge "Remove deprecated support for cisco ucs and cims ironic drivers." 2023-04-04 19:25:07 +00:00
Jonathan Rosser
6eb9142fc6 Update IPA version for 2023.1 release of Ironic
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_swift/+/877534
Change-Id: Ia3964416f0ccba49d2986aa2d8fc91c16a7a53da
2023-03-21 19:01:13 +00:00
Jonathan Rosser
0a5de94bf3 Add a no_driver ironic driver type
Enabling this driver type ensures that the no-console, no-raid
and no-inspect interfaces are enabled so that they can be later
configured on a per-node basis if required.

These interfaces are useful to have enabled at the same time as
driver specific interfaces such as idrac or ilo in order so that
managment of specific functions can be disabled if required.

Change-Id: I2904ba005e3fa18faf8ccf04661e206501fa4aa3
2023-03-21 19:00:45 +00:00
Jonathan Rosser
b6550a4c3f Enable raid interface implementations for ironic hardware drivers
This patch enables the native raid driver implementation for each
of the hardware types defined in `ironic_driver_types`. If necessary
this can be overridden in ironic.conf using config overrides.

Change-Id: I28b39b391d307e0a4aa71e13337f646d872925ec
2023-03-21 19:00:41 +00:00
Jonathan Rosser
5e420cca3c Rename idrac interfaces to idrac-wsman
idrac is the legacy name of the WSMAN interface. It has
been deprecated in favor of idrac-wsman and may be removed
in a future release of the idrac hardware type driver.

Change-Id: I2bf70374ac761c6ddeb8fc0b838470c036b70541
2023-03-21 19:00:36 +00:00
Jonathan Rosser
11b162cfa3 Install socat and configure ipmtool-socat console interface
This patch adds the `console` field to the ironic_driver_types
variable and then enables a set of console drivers in the ironic
config through the `enabled_console_interfaces` option.

If `ipmitool-socat` is one of the enabled drivers, then the socat
distro package is installed to support that.

Defaults are added for socat bind address and port range to
use.

[1] https://opendev.org/openstack/ironic/src/branch/master/doc/source/admin/upgrade-to-hardware-types.rst

Change-Id: I36dd1a0ec69e5702143a1a26bd5901fc88706e84
2023-03-21 19:00:31 +00:00