78fbffd20ccec4f49756ed4a67c54887d50a8579
Commit Graph

567 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
Dmitriy Rabotyagov
78fbffd20c Move RabbitMQ restart to handlers
Due to historical reasons RabbitMQ operations, like start/stop/restart
were perfromed in tasks and triggered on changes.
As of today there seems to be no need in such approach and we can use
handlers instead.
It will also move some tasks, which intend to run when service is
running, to their own file. This also allows to run them once on cluster
rather then for each host.
We also merge set_cookie with post_install as there is no reason to
maintain the task in it's own file.
Change-Id: I222b9de3ca531724b05c7fa2cf032a3271055d64
2024年11月05日 15:05:16 +00:00
Dmitriy Rabotyagov
9847546fe1 Refactor rabbitmq_upgrade behavior
At the moment rabbitmq_upgrade will temporary stop all nodes in the
cluster, shortly disrupting operations.
This behavior is now changed to perform a regular rolling upgrade [1]
Community right now relying on the rabbitmq_upgrade variable to
"recover" the cluster state by basically re-bootstrapping the cluster.
Such behaviour should be implemented separately in a follow-up patch.
[1] https://www.rabbitmq.com/docs/upgrade#rolling-upgrade
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/931801
Change-Id: Ibb3fae0d85dc31237ce169bb4cde9551dd5cabb6
2024年11月05日 15:04:16 +00:00
Zuul
c7b2ef91e0 Merge "Move verification of cluster_state to a separate file" 2024年11月04日 14:53:14 +00:00
Zuul
1138f9b942 Merge "Use json formatter for feature_flags fetcher" 2024年10月30日 21:16:54 +00:00
Zuul
ead47f2dbc Merge "Proceed with installation/upgrade even if cluster not healthy" 2024年10月18日 14:49:31 +00:00
Zuul
878ac35f10 Merge "Revert "Add retries for feature flags check"" 2024年10月17日 10:35:29 +00:00
Zuul
0f2281823c Merge "Fail in when installing RabbitMQ/Erlang versions not possible" 2024年10月15日 00:21:24 +00:00
Zuul
a0de794851 Merge "Add erlang package defenition to defaults" 2024年10月14日 14:22:42 +00:00
Dmitriy Rabotyagov
93f81f9270 Cleanup unneeded upgrade tasks
Change-Id: I377b26dab9c0939c5de701fef9ebf4d230e19701
2024年10月09日 18:04:12 +02:00
Dmitriy Rabotyagov
55a84bf7f8 Move verification of cluster_state to a separate file
As verification of the cluster state is generic action which needs
to be included and registered at different parts of the role, it
makes sense to include it separately and evaluate feature flag conditions
during tasks include
Change-Id: Ib00c5072a663cdccf05156badc43cab675e8de9f
2024年10月09日 17:29:26 +02:00
Dmitriy Rabotyagov
aecf15d5ad Use json formatter for feature_flags fetcher
We can replace shell with a simple command using json formatter,
which allows us to select only missing flags and enable them expclicitly
rather then enable all flags.
This also produces a better log, representing which flags were missing.
Change-Id: Idb5c02109458771853e0fdbc7f6bb27beaa731b4
2024年10月09日 15:04:04 +00:00
Dmitriy Rabotyagov
2f686f4bfd Fail in when installing RabbitMQ/Erlang versions not possible
Current behaviour with just pinning on Ubuntu/Debian leads to potential
situations, when there's no selected version available in repo to
proceed with what's available based on set priorities.
Instead, it might be worth to fail explicitly when requested version is
not available. This also aligns behaviour with EL distros.
Change-Id: Iad69cc4b5f8ca40246bcbc604e77eef7975eb104
2024年10月09日 10:01:35 +02:00
Dmitriy Rabotyagov
6b4a766db6 Proceed with installation/upgrade even if cluster not healthy
At the moment rabbitmq_upgrade flag is being used on unhealthy
clusters to repair them. However with change [1] we've introduced
running this task standalone very early during the playbook.
In case cluster is unhelathy - there is no good way to repair it anymore
as
`rabbitmqctl cluster_status` might fail right away with.
So let's ignore failures at this point and run feature_flags only if
we were successfull on fetching the status.
[1] https://review.opendev.org/q/Idf33b6810e1afb3a89dad5e65a48e86ac0a58a67
Change-Id: Ie453f327850f9c9ae54823c17b0292517fa56a82
2024年10月08日 16:55:01 +02:00
Dmitriy Rabotyagov
de2c7d19d3 Revert "Add retries for feature flags check"
This reverts commit 29d276582c.
Reason for revert: Eventually the failure, which we were reported previously
was caused not by retries, but by the very early inclusion of the task
from the playbook, which needs to be handled differently. A follow-up
change is needed to address that.
Change-Id: Ib64ff19201944a8581953eed8579abb6c9d9c401
2024年10月08日 14:41:14 +00:00
Dmitriy Rabotyagov
d1fd62e445 Add erlang package defenition to defaults
We do have a variable `rabbitmq_erlang_version_spec` which is applicable
only for Debian, while for EL the variable is only private.
This patch does some alignment on things:
* spec is replaced with just a version, as we don't need ternary logic
anymore.
* defenition of erlang version is unified across distros
Change-Id: Ic72212fa2d6df55f2f60d1d38c48310765442e51
2024年10月08日 14:10:06 +00:00
Jonathan Rosser
107ecca6ca Update rabbitmq and erlang repo locations to the current recommended locations.
Rabbitmq provide a new set of ppa fronted by Cloudflare, use those
instead of the previous one which is no longer mentioned in the
rabbitmq installation guide.
Change-Id: I6eff083b95b392e9f8a05f79ee2ec49705257a64
2024年10月08日 10:05:05 +01:00
Dmitriy Rabotyagov
494590447e Map all relevant architectures for deb822 repository setup
At the moment we fixup only x86_64 arch while there way more arches
in the wild. So it's worth to have a mapping for architectures in place
rather then maintain quite complex replaces.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/930272
Related-Bug: #2081764
Change-Id: I471fc337c0f13a5b8b10131760ed96032a34f9e8
2024年09月27日 07:28:36 +00:00
Dmitriy Rabotyagov
20b09197a2 Bump rabbitmq version to 3.13.7
This is the latest minor version in 3.13 series. Current 3.13.3 does not
exist for noble causing it to install the latest, which is now 4.0
series
Change-Id: Ifaa69e8b9caa8d5dfa9f4b83db31932c82641a40
2024年09月25日 14:06:36 +02:00
Zuul
615719ac2d Merge "Improve handling of rabbitmq_install_method changing" 2024年09月19日 16:11:39 +00:00
Zuul
5e62a6d5a9 Merge "Manage apt repositores and keys using deb822_repository module" 2024年09月16日 11:24:55 +00:00
Jonathan Rosser
c785927306 Improve handling of rabbitmq_install_method changing
Instead of using a conditional block, use the "state" parameter
of the yum_repository module to ensure that the repo
config is correctly added/removed if rabbitmq_install_method is
changed after initial deployment.
Change-Id: Ief07a74cd0019fefd58e27fb8dc4299b99299f99
2024年09月09日 12:57:02 +00:00
Jonathan Rosser
e9de2b505d Manage apt repositores and keys using deb822_repository module
The apt-key module is deprecated so the code is refactored to allow
any of the deb822_repository features to used instead.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-apt_package_pinning/+/927903
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/907886
Change-Id: I96f1f23d6a1cca223ad4fc48a1caa21833a98b22
2024年09月09日 12:56:30 +00:00
Dmitriy Rabotyagov
29d276582c Add retries for feature flags check
As task is execured right after handlers execution, it would make sense
to add retries just in case cluster doesn't come up immediatelly back.
Change-Id: Ia26c3a9e9a7a39969a5b6450703c14aad4760eea
2024年09月05日 15:22:43 +02:00
Dmitriy Rabotyagov
f05e2fff2a Include feature flags enablement only during upgrades
As we've backported feature flags enablement to previous releases,
there is expectation that at this point all missing flags were enabled
now.
With that there is no reason to run check each role run, except it is
an expected upgrade of rabbitmq, after which new flags might appear.
Change-Id: Ic004de1ea5d00965e5bebe50b4a93e247b82873d
2024年09月05日 11:18:36 +02:00
Jonathan Rosser
5675552c74 Update rabbitmq-server to 3.13.3
Change-Id: I4d2bfe34eaddb5e8c8ac6a0ff714ee6da7b7467f
2024年06月20日 10:36:00 +01:00
Zuul
fd9fd838c5 Merge "reno: Update master for unmaintained/zed" 2024年06月06日 10:45:37 +00:00
Zuul
5f69dad1a7 Merge "Enable feature flags post-upgrade" 2024年05月31日 09:39:29 +00:00
Andrew Bonney
5abd7b71ba Enable feature flags post-upgrade
Stable feature flags must be enabled before upgrades to ensure
the service can still start. These additional tasks check for
any disabled feature flags and enable them. This is done
immediately after upgrades so that systems can run with them
enabled striaght away.
Closes-Bug: #2038818
Change-Id: I5211a30899f544a9f7e609e85551a92b245d25bf
2024年05月21日 13:48:04 +01:00
Zuul
a424517c02 Merge "Add distro infra jobs" 2024年05月20日 22:07:46 +00:00
Dmitriy Rabotyagov
7e25ad5f6b Update rabbitmq/erlang to latest versions
Change-Id: Iddc69e81e1677efcd1930afb4dc3113596e9537b
2024年05月16日 13:34:39 +02:00
e8a829295b reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.
Change-Id: I220491d548f4fe1031e572de645962238a039207
2024年05月10日 18:58:30 +00:00
Zuul
ce5c559526 Merge "Add rabbitmq distro install support for EL" 2024年05月04日 09:38:05 +00:00
Zuul
9b7718b63a Merge "Do not pin packages nor install gpgs for distro method" 2024年05月02日 14:15:04 +00:00
Dmitriy Rabotyagov
5c3cec5344 Add distro infra jobs
These jobs aims to ensure that infra can be installed through distro
method
and it still executes it's required functionality.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/917148
Change-Id: I4aa840b93a320bd89f9f630a4f58b8004380f28a
2024年04月26日 14:15:34 +00:00
Dmitriy Rabotyagov
5e68cb6943 Do not pin packages nor install gpgs for distro method
When we do not need to install external GPG keys nor pin packages
to external sources when installation_method is set to distro.
Change-Id: I29bbcacd6ce06516f1ef34cf58da8cac8ef79ea8
2024年04月24日 19:22:18 +02:00
Dmitriy Rabotyagov
ff5b23ae93 Add rabbitmq distro install support for EL
This patch adds installation of "native" to EL repo (which actually
is "extras") that provides RabbitMQ and Erlang.
This behaviour would align EL with DEB systems in terms of "distro"
path.
Change-Id: Ifa197131dd010108f3a0745322b32de1fb08b813
2024年04月24日 19:16:51 +02:00
Andrew Bonney
f5ecdf4852 Adjust legacy OpenStack HA policy to make reply queues HA
Changes in oslo.messaging for 2023.1 exposed a known race
condition in RabbitMQ when dealing with non-HA classic queues.
When a RMQ cluster member is taken down, clients failing over
to other members may erroneously be told a queue exists when it
is in the process of being deleted. This can cause them to
permanently sit waiting for messages from a queue that no longer
exists until their services are restarted.
Making the reply queues HA resolves this issue, at the expense
of a x3 increase in reply queues across the cluster. My
assumption is that reply queues were previously excluded from HA
policy as a performance gain given their link to the number of
compute nodes in an OpenStack deployment.
Context: https://bugs.launchpad.net/oslo.messaging/+bug/2031512
Change-Id: Ia0a26fdfdfa09088c921f1530d4ac020b2bec290
2024年04月17日 08:34:20 +01:00
Andrew Bonney
cfb1c28151 Remove RabbitMQ restart when changing policy
My assumption is that this restart only exists for historical
reasons or in order to force client re-connection and
re-definition of queues to match this policy.
Unfortunately the current task only executes on a single RabbitMQ
node when part of a cluster, so it is ineffective in forcing
reconnection. From a brief review at least when shifting from
non-HA to HA this also isn't required as queues are immediately
updated to reflect the new policy.
Given no clear reason for the task to be present, I'm removing
it ahead of making changes to the default HA policy.
Change-Id: I956abe68d4d7921a4e87ae5a7694d49546bdde94
2024年04月17日 08:34:12 +01:00
Christian Rohmann
1d9a0837e9 Add support for the apply_to parameter for policies
Policies were always applied to target `all` aspects and
there was no way to have them target only e.g. exchanges.
This can be important though, see [1].
This change enables the use of the apply_to parmeter via the existing
variables while maintaining `all` to be the default.
[1] https://www.rabbitmq.com/docs/parameters#how-policies-work
Change-Id: I61d68c630599b8ef2382663e8a37fdc456435c11
2024年03月01日 10:54:57 +01:00
Zuul
e4c234dcdc Merge "Remove legacy upgrade task" 2024年02月12日 19:45:26 +00:00
Jonathan Rosser
6722f0bea4 Remove legacy upgrade task
This task is no longer needed in recent releases of openstack-ansible.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/907886
Change-Id: I2190c16548fb44948a26ee2817d8f71fbe66be53
2024年02月05日 17:06:21 +00:00
Niklas Schwarz
d10da56560 Add the abillity to configure the logging options
Add the ability to configure the logging options for the rabbitmq-server
via the rabbitmq_log variable and key-value pairs
Change-Id: If9f28f29311150ed7b8ba61d2ddf7e12ca07d3c4
2023年12月07日 11:51:29 +01:00
Niklas Schwarz
83d8ec2a30 Add ability to set environment variable RABBITMQ_USE_LONGNAMES
Add ability to set the environment variable RABBITMQ_USE_LONGNAMES
via the rabbitmq-env.conf to be able to use the FQDN for a node
Change-Id: I766bdbe847eb24010bfe9912f07e89d78bbc1bed
2023年11月16日 11:32:37 +01:00
Niklas Schwarz
e46cf7c988 Add ability to add custom configuration for RabbitMQ
This implements a new variable rabbitmq_custom_config to
be able to place custom configuration to the rabbitmq.conf
e.g. to configure installed plugins
Change-Id: I952eefe646b00f60184f8d353f6f055bbdc4ac90
2023年11月07日 09:50:42 +01:00
Dmitriy Rabotyagov
346cf85298 Update RabbitMQ to 3.12 series
Change-Id: I2e320b862dbc86a70f660510f2b946c6ac135ca1
2023年10月09日 08:02:14 +00:00
Dmitriy Rabotyagov
b4fbecd93f Add ability to define extra arguments for erlang
This implements new variable rabbitmq_erlang_extra_args that enable
deployers to define extra flags for erlang [1]
[1] https://www.rabbitmq.com/runtime.html#cpu-reduce-idle-usage
Change-Id: Ibb0963962d6c7483d54fac69960910c0b13802a5
2023年09月28日 14:31:50 +00:00
Jonathan Rosser
447584c0ec Fix linter errors in example playbook
Change-Id: I4aa03c4ddad206cac8bf73b1ec44eed5aa0f715b
2023年09月28日 15:31:18 +01:00
Dmitriy Rabotyagov
b4a3b6269b 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.
Change-Id: I63f6a2c803370736e969aa3a4dea3ea959316def
2023年07月12日 13:32:46 +02:00
Dmitriy Rabotyagov
2fc53a3a03 Adjust wildcard definition
There was no reason to adjust rabbitmq_package_version previously, as
replaced by the wildcard part is never changed, so patching that doesn't
have any practical sense. We also return `-1` to erlang spec, so that
wildcard would match only the part we expect to change.
This partially reverts I99683a031f935b579d38ae457c484c9a150344c6
Change-Id: Ie2e783d065f32b906ee1554abaf5dc3b24236ca8
2023年07月06日 09:39:35 +00:00
Damian Dabrowski
953ceccb0b Use wildcards to specify rabbit/erlang versions
For a long time we were struggling with disappearing packages on
packagecloud/cloudsmith repos.
We were told to use {ppa1,yum1}.novemberain.com because packages should
not disappear from there[1].
Unfortunately it just happened causing Rocky jobs to fail with error
message: "No package erlang-25.3.2-1.el9.x86_64 available."
Because we had this issue for a long time and we have not found any
proper solution so far, I think the best we can do is to use wildcards
for version definitions.
Wildcards are used only for build numbers(number after 3th dot) if they
are present. It should minimize a chance to install incompatible erlang
and rabbitmq versions.
[1] https://github.com/rabbitmq/rabbitmq-server/discussions/8386#discussioncomment-6022021
Required-By: https://review.opendev.org/c/openstack/openstack-ansible-os_rally/+/887528
Change-Id: I99683a031f935b579d38ae457c484c9a150344c6
2023年07月04日 18:42:49 +02:00