Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 12 commits into from
May 31, 2022
Merged

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

merged 12 commits into from
May 31, 2022

Conversation

amanda11
Copy link
Contributor

@amanda11 amanda11 commented May 31, 2022

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

@pull-request-size pull-request-size bot added the size/S PR that changes 10-29 lines. Very easy to review. label May 31, 2022
@amanda11 amanda11 marked this pull request as draft May 31, 2022 08:48
@pull-request-size pull-request-size bot added size/M PR that changes 30-99 lines. Good size to review. and removed size/S PR that changes 10-29 lines. Very easy to review. labels May 31, 2022
@amanda11
Copy link
Contributor Author

amanda11 commented May 31, 2022

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]
  1. 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

  1. 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

  2. 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 amanda11 added this to In progress in StackStorm v3.8.0 via automation May 31, 2022
@amanda11
Copy link
Contributor Author

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

@amanda11 amanda11 marked this pull request as ready for review May 31, 2022 14:09
@amanda11 amanda11 changed the title [WIP] Use version of erlang < 1.25 Use version of erlang < 1.25 and fix EL8 passlib May 31, 2022
- name: auth | Install pip pre-reqs (RedHat)
become: yes
pip:
name: passlib
Copy link
Member

@arm4b arm4b May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we install the passlib via pip for all the OS flavors to get rid of this kind of mishmash?

# List of python variables
---
passlib: python-passlib

# List of python3 variables
---
passlib: python3-passlib

# List of python2 variables
---
passlib: python-passlib

# List of python3 variables
---
passlib: python3-passlib

Wondering if it'll make it any better or if we'll hit another corner case with the environment.

Copy link
Contributor Author

@amanda11 amanda11 May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll still need to mess about a bit, as the pip executable differs. So we have to point to pip3 on EL8, but we'll need to point to different pip versions on some of the other installs. (I tried with just the default pip module and no executable name - but that failed :-( )
So we'll just be replacing the passlib variable with a pip variable.

But might make it a little tidier. I'll give it a quick run on focal and EL8....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the efforts!
Approved the PR. Feel free to merge it with the fixes you'll find tidier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@armab We don't install default pip at moment for U20 as part of ansible install. So we'd need to add that in as well.
I'm not sure its going to make it any cleaner, just mean we'll have another pip on the box to perhaps get confused with....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either way looks like a rake.
Alright, thanks for checking.

LGTM 👍

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M PR that changes 30-99 lines. Good size to review.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Installation on EL8 reports failure due to passlib not installed
2 participants