-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
CLI Environment Fixes #876
Changes from 7 commits
46dfc45
9b39d7b
200a093
a484bb1
72cded3
a2515d4
e8cb1d5
b7b8ef8
7cf4442
a0b068c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
# @api private | ||
class rabbitmq::repo::rhel ( | ||
$location = "https://packagecloud.io/rabbitmq/rabbitmq-server/el/${facts['os'][release][major]}/\$basearch", | ||
$erlang_location = "https://packagecloud.io/rabbitmq/erlang/el/${facts['os'][release][major]}/\$basearch", | ||
String $key_source = $rabbitmq::package_gpg_key, | ||
) { | ||
yumrepo { 'rabbitmq': | ||
|
@@ -14,6 +15,17 @@ | |
gpgcheck => 1, | ||
} | ||
|
||
# This is required because when using the latest version of rabbitmq because the latest version in EPEL | ||
# for Erlang is 22.0.7 which is not compatible: https://www.rabbitmq.com/which-erlang.html | ||
yumrepo { 'erlang': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Historically, the module is setup in such a way that Erlang configuration is out of the module’s scope. There have been some proposals to fix puppet-erlang, but I think any fix along these lines would have to be made in that module and then update that dependency here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally I would agree except this is a version of Erlang packaged and maintained by RabbitMQ https://www.rabbitmq.com/which-erlang.html#erlang-repositories so i think that it makes sense to have it in here only when managing the repos and downloading from their package cloud. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue would be if users also need a competing (but compatible) erlang version on the same machine. Also, adding this here only would be inconsistent with how the module works on other OSes / distros. However, if https://github.com/voxpupuli/puppet-erlang gets released finally, it could be made a dependency or a recommended install, and the issue could be solved that way. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the current behavior, the module is also not (by default) using the official rabbitmq packages either, tho there have been some proposals to switch that to being the default. most of them have gotten stuck on similar issues around the Erlang dependency issues. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can add the same code for the other OS's to make it consistent, that definitely makes sense. We could also add second variable to manage this repo if you think that may be a better option? When using RHEL 8 with out this addition made the module unusable. So I definitely think having this in here even if it is optional would be a good add. Especially since https://github.com/voxpupuli/puppet-erlang isn't released yet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's pretty much always been the case with this module that the user has to satisfy the Erlang dependency themself, I think. It could potentially be documented better, but IMO, it's better if that's done through a separate module vs. a parameter in this one. Keep in mind that the module doesn't list support for RHEL 8 yet. #842 was @nmaludy's WIP working on adding support for it, which has some good discussion about these points. I think if we that can work. That said, so far, haven't seen anyone follow through with getting all this done in a way that works, passes tests, etc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, could there be issues with the newer erlang if older versions of rabbitmq were chosen? |
||
ensure => present, | ||
name => 'rabbitmq_erlang', | ||
baseurl => $erlang_location, | ||
gpgkey => $key_source, | ||
enabled => 1, | ||
gpgcheck => 1, | ||
} | ||
|
||
# This may still be needed to prevent warnings | ||
# packagecloud key is gpg-pubkey-d59097ab-52d46e88 | ||
exec { "rpm --import ${key_source}": | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "puppet-rabbitmq", | ||
"version": "11.0.1-rc0", | ||
"version": "11.0.2-rc0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this shouldn't be adjusted in here. it will get bumped with a release. |
||
"author": "voxpupuli", | ||
"summary": "Installs, configures, and manages RabbitMQ.", | ||
"license": "Apache-2.0", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, this should already be set for most use cases via
puppet-rabbitmq/data/common.yaml
Lines 82 to 83 in dfd7607
I'm not 100% sure that that applies to commands run in the provider, but I think it should; I know there have been some previous fixes around this error.
Since
environment_variables
is a parameter already, maybe the right fix here is to somehow either addHOME
to defaults or merge the defaults with the environment for the CLI here?Either way, I think the environment fix here should probably be a separate PR, as it's a narrower fix that we should be able to merge quickly, and likely affects other OSes besides RHEL.
Did you confirm that both
LANG
andLC_ALL
were necessary?LC_ALL
has worked in the past and is the somewhat narrower fix.