aa5f1304e7f7b4d9f4e95a3a409fd56cb3fafd64
611 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Dmitriy Rabotyagov
|
aa5f1304e7 |
Use correct variable for erlang repo defenition
Current code de-facto ignores rabbitmq_erlang_install_method variable value for debian-based distros. We need to use it for erlang repo installation, otherwise it may lead to role failure. Change-Id: I826fec7febe3bda5748a0e90fa80fdb8586d63ac Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Dmitriy Rabotyagov
|
ff18eb25dd |
Install erlang for trixie from distro packages
After removal of content from ppa1.rabbitmq.com there are no other sources for the erlang, as deb1 does not contain trixie packages for erlang so far. We should revert this change as soon as packages appear in deb1 [1] [1] https://github.com/rabbitmq/erlang-debian-package/issues/45 Change-Id: I8a23fdf2693c2d8cb3a03563e912151f1c69cb49 Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Dmitriy Rabotyagov
|
e4e207cb92 |
Switch erlang repo to deb1.rabbitmq.com
Old repo (ppa1.rabbitmq.com) was put down in favor of deb1.rabbitmq.com, so we need to switch to it for erlang installation as well. Change-Id: I1bbb4b5a685cc6526e33fde429085d8ec8198c5d Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Dmitriy Rabotyagov
|
da28fe91f8 |
Add yum2 repo for EL distros
There are 2 mirrors available for erlang/rabbitmq - yum1 and yum2. Ansible's yum_repository module baseurl [1] can accept a list, so worth passing both mirrors for ability to failover. [1] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_repository_module.html#parameter-baseurl Change-Id: If42695aa347cb478b7f795726975724afcbecc22 Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Dmitriy Rabotyagov
|
c131c881d8 |
Bump RabbitMQ version to 4.1 series
RabbitMQ team has reverted their support policy, and made 4.1 series supported for 18 month again. Change-Id: Ifb2336b8b2d1b3b3118934a8a0727059e017df59 Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Dmitriy Rabotyagov
|
8e19f7b736 |
Change repository for deb to deb1.rabbitmq.com
RabbitMQ has changed their docs to suggest using deb1.rabbitmq.com instead of ppa1.rabbitmq.com. For Debian Trixie ppa1.rabbitmq.com contains only RabbitMQ 3.12, while deb1.rabbitmq.com contains all of 3.13, 4.0 and 4.1 We leave erlang as is for now, as it's not available for Trixie yet. Change-Id: I98dfeb1706701787e7a7e912e37910108cec3a10 Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Dmitriy Rabotyagov
|
2959750e81 |
Bump Erlang version to 27.x
RabbitMQ supports Erlang 27 since release 4.0.4 [1] With that Debian Trixie package is available only for Erlang 27 [1] https://www.rabbitmq.com/docs/which-erlang Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/965798 Change-Id: I055941dd6829c4055377fd46ec6cec8f9351546e Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Zuul
|
47769e5c85 | Merge "Small fix for task name" | ||
|
Zuul
|
3f1f6316c5 | Merge "Use loop label for deb822_repository" | ||
|
Ivan Anfimov
|
cd12da523d |
tox: Remove ineffective ignore_basepython_conflict and bump minimum version
Change-Id: Ia5940434b593dc993bbd9fef11b483475f8a96db Signed-off-by: Ivan Anfimov <lazekteam@gmail.com> |
||
|
Ivan Anfimov
|
0a98a751dc |
Small fix for task name
use full broker name. trivial fix Change-Id: I976d120e91ae0ecbd391d261c579d328eb60bf43 Signed-off-by: Ivan Anfimov <lazekteam@gmail.com> |
||
|
Dmitriy Rabotyagov
|
4d098fed10 |
Use management address when available
In case of defining different IP address for SSH and Management network in metal scenario, as described in [1], you get SSH address defined as `ansible_host`, which results in HAProxy configuring backends on SSH address rather then management one, where service is actually listening. We use `ansible_host` as a fallback for non-OSA usage of the role. [1] https://docs.openstack.org/openstack-ansible/latest/reference/inventory/configure-inventory.html#having-ssh-network-different-from-openstack-management-network Change-Id: I85a164b181b41025f8f872dbdf5426bf58f6f36e Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Dmitriy Rabotyagov
|
97e98cffe3 |
Use loop label for deb822_repository
The module has quite massive output due to included GPG key into the structure, which makes it barely readable. Using loop label on the module will limit output to necessary set of arguments. Change-Id: I4d050312410951847413c728165a74ce26fd77a0 Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Zuul
|
46b7f5114a | Merge "Ensure no CQ mirroring policies applied" | ||
|
Zuul
|
7b4bab7369 | Merge "docs: updated information about dependencies" | ||
|
Dmitriy Rabotyagov
|
1a9074c590 |
Ensure no CQ mirroring policies applied
During migration to Quorum queues we have renamed vhosts
to not contain leading slash for them. However, some services
at the same time were configured not to have RPC messaging,
but only notifications whenever needed - like keystone, glance, etc.
This left such vhosts still containing HA policy on them, leading
to RabbitMQ upgrade failures with:
```
rabbitmq-server[2934794]: Application rabbit exited with reason:
{{failed_to_deny_deprecated_features,[classic_queue_mirroring]},{rabbit,start,[normal,[]]}}
```
This patch implements a check of deprecated feature flags and
disables all HA policies across the board before upgrade happens.
As we don't want to force removal when running RabbitMQ 3.13,
the removal is enforced only during upgrade to 4.0.
Conditions are maintained on a task level rather then a block
to make it extendable with other deprecated flags in the future.
Change-Id: I372421e0347687a1d861b548fd20ee92b150c301
Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
|
||
|
Dmitriy Rabotyagov
|
e346e79ed3 |
Ensure su/runuser is installed for rabbitmq
su/runuser is required for some rabbitmqctl commands, thus let's ensure they're present for all cases. This intends to fix CentOS 10 Stream molecule jobs at the first place. Change-Id: I4fe224b471eff483b442d0256da49f32440549ec Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/957859 Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com> |
||
|
Ivan Anfimov
|
e0972fa926 |
docs: updated information about dependencies
Change-Id: I167743ef596b1041acd8e3820c2d981fde90ec50 |
||
|
Dmitriy Rabotyagov
|
ac16614326 |
Add EL10 support
With no specific repository for EL10, packages built for EL9 are installable and seems working at first glance. Once an appropriate repository is published, this commit can be reversed Change-Id: Ic80b316b69dc6b8086d90cfff46ceb318072ac0a |
||
|
Dmitriy Rabotyagov
|
01a5b781f2 |
Bump RabbitMQ version to 4.0.9
Change-Id: Ic5c9a6d0a13538b7e31851f9cbbfafb8e654e4fe |
||
|
Zuul
|
bd72dc01b5 | Merge "Remove tags from README" | ||
|
Ivan Anfimov
|
85ed12ffb3 |
Remove tags from README
The tags framework has been discontinued for a long time. https://governance.openstack.org/tc/reference/tags/ https://governance.openstack.org/tc/resolutions/20211224-tags-framework-removal.html Change-Id: Iba8f67aaa663747da22843435f0d38ae54b0965b |
||
|
Dmitriy Rabotyagov
|
399b7683ed |
Execute rabbitmq post_upgrade hook
Current implementation of rabbitmq-upgrade post_upgrade [1] performs re-balance of queues between nodes, once upgrade is completed. Which might be a very reasonable task to execute after any upgrade. [1] https://www.rabbitmq.com/docs/man/rabbitmq-upgrade.8#post_upgrade Change-Id: I54b8e22d3c8a3ea797724611f542d9e17982d92c |
||
|
Dmitriy Rabotyagov
|
8ea306455e |
Fix quorum/stream queues if they're below minimal size
In case it is unsafe to shutdown current node due to queues going below their minimal quorum size, we attempt to fix them by growing affected queues to rest of the cluster. This step is vital one in case of OS upgrades, when operating system on controller is being re-installed, as quorum/stream queues must be manually stretched after re-install. Change-Id: I87e2ae7b43dbcf77c9f166656686d25dbd8937fd |
||
|
Dmitriy Rabotyagov
|
485ee87076 |
Ensure that failures are fatal for upgrade_check
Ansible's fail will fail only current host in case of met conditions while continuing play for others. In order to prevent further execution for all hosts in case of unmet conditions, which may further break the cluster, `any_errors_fatal` was added to fail tasks. This will end the play for current batch and cancel further batches. Change-Id: I92f24c77b5fb8a3dd9ed17915d7c725d15f9f21e |
||
|
Dmitriy Rabotyagov
|
4655c91089 |
Fail with human-readable errors if upgrade impossible
At the moment we simply skip the upgrade preparation tasks in case cluster is not healthy or meeting expectations for the role to proceed with the upgrade. This may lead to unexpected behaviour and unobvious failures later on in the role. Instead, we add another failure before node upgrade preparation is run which will display all noticed inconsistencies and human readable message for each occurance. Change-Id: I0f252d08b2bcb94bca142dce5e376b5c3bc06417 |
||
|
Jonathan Heathcote
|
0139ac0cdf |
Workaround rabbitmq-server issue #3369
Change-Id: I3c2751da86492c8659252cf5d7b691ce2cc111cf |
||
|
Dmitriy Rabotyagov
|
858b79056d |
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: Id8a34727251ade1a1b2d5a881e5ee5e808b495dc |
||
|
Dmitriy Rabotyagov
|
6afb2944dc |
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: Ie295a52b403df4d404bf984fe0296d5be110f532 |
||
|
Dmitriy Rabotyagov
|
45f6078fe5 |
Add molecule testing to the role
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/939824 Change-Id: Iba67d3e321c6ebc256bb63de27ce61c26db10ab0 |
||
|
Jonathan Rosser
|
b09ac39cbc |
Service must always be restarted during an upgrade
The service is unconditionally stopped during the upgrade prep tasks. There are several conditions that will notify the handler to restart the service, such as updating the config file or installing a new version of the rabbitmq package. It is possible that none of these things happen resulting in the service not being restarted during an upgrade. This patch ensures that the service is always restarted during an upgrade by notifying the restart handler when the service is sucessfully stopped in the upgrade prep tasks. Change-Id: I9fbe7806b3531921b90ac91c17b6a07deca2a4d2 |
||
|
Jonathan Rosser
|
0e00919287 |
Ensure that rabbitmq-erlang and rabbitmq-server repos use the same pins
There is currently a mismatch between the apt pin priorities for the erlang and server rabbitmq repos. This patch sets the pinning to be the same. This should not affect normal package installation as recent changes to this role require installation of a specific version and will fail "safe" should that be unavailable. The intention with this patch is to ensure that the behaviour is the same for both the erlang and server repos in an abnormal situation where the installation might fail. Change-Id: I0d988572a102ca148059d198379d2a3115ecb795 |
||
|
Zuul
|
795d141c85 |
Merge "Respect package_state for the role"
|
||
|
Zuul
|
82069b5d23 | Merge "Move version pinnings from distro vars to defaults" | ||
|
Zuul
|
65bf290620 | Merge "Bump RabbitMQ version to 4.0" | ||
|
Zuul
|
54d2ae5b9b | Merge "Move RabbitMQ restart to handlers" | ||
|
Andrew Bonney
|
42df3a2142 |
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: I9ca1c66f88e9beea0e2c5add30a356fb717cfcfa |
||
|
Zuul
|
461ccfa46c | Merge "Get exact version of installed rabbitmq" | ||
|
Zuul
|
a531ddefa9 | Merge "Refactor rabbitmq_upgrade behavior" | ||
|
Dmitriy Rabotyagov
|
699febf764 |
Respect package_state for the role
Having rabbitmq_package_state latest by default is not always expected as all other roles do respect defined `package_state` value. Change-Id: I5bcc550419cfe6d51dfb73eb935a93b93e460068 |
||
|
Dmitriy Rabotyagov
|
8cdf2cf51e |
Move version pinnings from distro vars to defaults
We are aligned on used RabbitMQ/Erlang versions for quite a while now so it makes sense to move version defenition to defaults instead of carrying them separately per distro family. Change-Id: I5ca75bf25d099260bc446a6b4f7d9be7a2bdde58 |
||
|
Dmitriy Rabotyagov
|
fef83101a6 |
Bump RabbitMQ version to 4.0
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/934042 Change-Id: I231ea65b5340c43bffb541ce23d3a8e600015c2d |
||
|
Dmitriy Rabotyagov
|
1396510eb8 |
Get exact version of installed rabbitmq
This makes us possible to leverage version comparison instead of search. This also might come handy in the future when we need to be more specific of expected versions for upgrade process. Change-Id: I7a132145bc781db999f82ecb192e6e1ecfc9c0ad |
||
|
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 |
||
|
Dmitriy Rabotyagov
|
d8d98a4e42 |
Use rabbitmq_cluster_state task instead of command
We can simplify logic and re-use rabbitmq_cluster_state tasks to fetch the current state of the cluster in a dictionary, which allows to avoid unnecessary today parsing of rabbitmq output. Change-Id: Ib99fcb1a3e0092bf96143435a0c876ab6f286f36 |
||
|
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 |
||
|
Zuul
|
c7b2ef91e0 | Merge "Move verification of cluster_state to a separate file" | ||
|
Zuul
|
1138f9b942 | Merge "Use json formatter for feature_flags fetcher" | ||
|
Zuul
|
ead47f2dbc | Merge "Proceed with installation/upgrade even if cluster not healthy" | ||
|
Zuul
|
878ac35f10 | Merge "Revert "Add retries for feature flags check"" |