Thanks Dmitriy, Updating version of rabbitmq-server in variable file after checking it from `apt-cache policy rabbitmq-server` fixed the issue. Regards, Danish Khan On Thu, Dec 12, 2024 at 3:09 PM Dmitriy Rabotyagov <noonedeadpunk@gmail.com> wrote:
Hey,
I think this is a "known" issue which we've addressed with the patch [1]. However we didn't backport it anywhere so far.
Previously we were relying just on APT package pinning, increasing priority for packages matching the version and coming from a specific source.
However, in case pinning was impossible to match, like in cases where the requested version is not present in the repository, the system was falling back to lower priorities and installing whatever is possible silently.
I'd suggest checking what versions are available in your system at the moment with `apt-cache policy rabbitmq-server` and would try to override `rabbitmq_package_version` to the closest available version in user_variables.
Also, as you're running Wallaby, we've changed a source repository where RabbitMQ is being taken from couple of times since then[2]. As the change of repo to novemberain was backported only up to Xena and it wasn't applied on Wallaby. So I would look into cherry-picking and applying this change, as that repository might have a compatible version stil.
[1] https://opendev.org/openstack/openstack-ansible-rabbitmq_server/commit/2f686... [2] https://review.opendev.org/q/I361757b8f76a6c2d087989a36d8f7543aba69e16
чт, 12 дек. 2024 г. в 09:47, Danish Khan <danish52.jmi@gmail.com>:
Dear All,
I have upgraded few of my openstack clusters from Ussuri to Wallaby
successfully.
But it seems rabbitmq repo is changed and now rabbitmq is getting its
packages from:
https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/ubuntu
Everything was working fine until I face below issue while running rabbitmq playbook:
TASK [rabbitmq_server : Apply rabbitmq policies]
failed: [rabbit_mq_container] (item={'name': 'HA', 'pattern': '^(?!(amq\\.)|(.*_fanout_)|(reply_)).*', 'priority': 0, 'tags': 'ha-mode=all'}) => {"ansible_loop_var": "item", "changed": false, "cmd": "/usr/sbin/rabbitmqctl -q -n '' set_policy -p / HA '^(?!(amq\\.)|(.*_fanout_)|(reply_)).*' '{\"ha-mode\": \"all\"}' --priority 0", "item": {"name": "HA", "pattern": "^(?!(amq\\.)|(.*_fanout_)|(reply_)).*", "priority": 0, "tags": "ha-mode=all"}, "msg": "Error:\nValidation failed\n\n[{<<\"ha-mode\">>,<<\"all\">>}] are not recognised policy settings", "rc": 69, "stderr": "Error:\nValidation failed\n\n[{<<\"ha-mode\">>,<<\"all\">>}] are not recognised policy settings\n\n", "stderr_lines": ["Error:", "Validation failed", "", "[{<<\"ha-mode\">>,<<\"all\">>}] are not recognised policy settings", ""], "stdout": "", "stdout_lines": []}
It seems ha-mode=all is deprecated in latest version of Rabbitmq (4.0.4).
I tried to install 3.8 or some other compatible version of rabbitmq but anyway the latest version of rabbitmq is getting installed.
I have updated below entries of file /etc/ansible/roles/rabbitmq_server/vars/debian.yml : _rabbitmq_package_version: "3.8.14-1" and _rabbitmq_erlang_version_spec: "{{ (rabbitmq_install_method == 'external_repo') | ternary('1:23.3.4.15-1', '1:22.*') }}"
Can someone please help me with this?
I guess either I need to find a away to install specific version of rabbitmq to fox rabbitmq policy issue or I need to update parameters of command while applying policy.
Regards, Danish Khan