StackStorm / ansible-st2

Ansible Roles and Playbooks to deploy StackStorm
https://galaxy.ansible.com/StackStorm/stackstorm/
Apache License 2.0
100 stars 75 forks source link

Use version of erlang < 1.25 and fix EL8 passlib #313

Closed amanda11 closed 2 years ago

amanda11 commented 2 years ago

Use the CloudSmith rabbitmq-erlang packages rather than the LaunchPad erlang packages for Debian installations, so that we can specify a 24.x version of the rabbitmq-erlang. (25.x and 22.x are only available in LaunchPad for Debian and fail with latest rabbitMQ).

We no-longer want to use the latest 1.25 that is available in the rabbitmq-erlang repository, as this means that rabbitmq fails to install, and instead reports error:

fatal: [localhost]: FAILED! => {"attempts": 5, "cache_update_time": 1653987046, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"      install 'rabbitmq-server'' failed: E: Unable to correct problems, you have held broken packages.\n", "rc": 100, "stderr": "E: Unable to correct problems, you have held broken packages.\n", "stderr_lines": ["E: Unable to correct problems, you have held broken packages."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n rabbitmq-server : Depends: erlang-base (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            erlang-base-hipe (< 1:25.0) but it is not going to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-crypto (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-eldap (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-inets (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-mnesia (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-os-mon (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-parsetools (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-public-key (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-runtime-tools (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-ssl (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-syntax-tools (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-tools (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n                   Depends: erlang-xmerl (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or\n                            esl-erlang (< 1:25.0) but it is not installable\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " rabbitmq-server : Depends: erlang-base (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            erlang-base-hipe (< 1:25.0) but it is not going to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-crypto (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-eldap (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-inets (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-mnesia (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-os-mon (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-parsetools (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-public-key (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-runtime-tools (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-ssl (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-syntax-tools (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-tools (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable", "                   Depends: erlang-xmerl (< 1:25.0) but 1:25.0-1rmq1ppa1~ubuntu18.04.1 is to be installed or", "                            esl-erlang (< 1:25.0) but it is not installable"]}

Resolves #312

amanda11 commented 2 years ago

Seems to be a problem with dependencies. I have been unable to install erlang and rabbitMQ compatible verisons on U20 using the repositories we currently use (LaunchPad ones). Also affects U18.

1) Previously we installed version 1:24.3.4-1rmq1ppa1~ubuntu20.04.1 when it was working successfully - for erlang-base etc. But this version doesn't seem to be available any more on the LaunchPad apt repository. 2) The latest erlang-base etc version I can find is 1:22.... 3) If you use the older erlang-base then you can't install the latest rabbitMQ as it requires erlang >= 1:23.2

So either: 1) we need to find the erlang-base, erlang-asn1 etc 1:24 versions we used before. But I've not managed to find it in the repos we set:

$ apt list erlang-base -a
Listing... Done
erlang-base/focal 1:25.0-1rmq1ppa1~ubuntu20.04.1 amd64 [upgradable from: 1:22.2.7+dfsg-1]
erlang-base/focal,now 1:22.2.7+dfsg-1 amd64 [installed,upgradable to: 1:25.0-1rmq1ppa1~ubuntu20.04.1]

2) Have managed to get compatible set of erlang repos from "erlang solutions" repos, see https://www.rabbitmq.com/which-erlang.html#erlang-repositories If we use this repo and install version 1:24.3.3-1, then I was able to install rabbitmq-server

Also the older erlang repositories seem to be available at their cloudsmith repos: https://cloudsmith.io/~rabbitmq/repos/rabbitmq-erlang/packages/?q=erlang-base

3) I've found the erlang group package 1:24.3.4-1rmq1ppa1~ubuntu22.04.1 is available at https://launchpad.net/~rabbitmq/+archive/ubuntu/rabbitmq-erlang/+packages?field.name_filter=&field.status_filter=published&field.series_filter= But if I attempt to install that it complains about missing dependencies - so that doesn't seem to work

4) If we go back to the earlier erlang-base etc that is in the LaunchPad repository then we would have to rollback rabbitMQ version as well - and ideally we don't really want to rollback erlang and rabbitmq versions...

amanda11 commented 2 years ago

Using cloudsmith repos instead of LaunchPad allows us to install erlang version that works with rabbitmq Using pip install of passlib on EL8 resolves the failing to find passlib for python3.8