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

Pass a HOME environment variable to all rabbitmq execute blocks #352

Merged
merged 1 commit into from Mar 8, 2016

Conversation

Projects
None yet
3 participants
@RoboticCheese
Copy link
Contributor

commented Mar 2, 2016

I ran into #334 today when rolling some new Rabbitmq servers. Since the ShellOuts are already ensuring the presence of a HOME environment variable, it seemed logical to have the execute blocks do the same. Agree/disagree/thoughts?

Thanks!

@jjasghar

This comment has been minimized.

Copy link
Collaborator

commented Mar 2, 2016

Looks good to me.

Just need another 👍

@@ -51,6 +51,7 @@ def parameter_exists?(vhost, name)

execute "set_parameter #{parameter}" do
command cmd
environment 'HOME' => ENV.fetch('HOME', '/root')

This comment has been minimized.

Copy link
@michaelklishin

michaelklishin Mar 2, 2016

Member

Wouldn't /var/lib/rabbitmq be a better fallback value?

This comment has been minimized.

Copy link
@RoboticCheese

RoboticCheese Mar 2, 2016

Author Contributor

If so, should I change it to that in the places where /root was already being set as well?

This comment has been minimized.

Copy link
@michaelklishin

michaelklishin Mar 2, 2016

Member

I think so. RabbitMQ or its CLI tools are typically do not run as root. Granted, /var/lib/rabbitmq isn't portable but it's the most sensible fallback value I can come up with.

@RoboticCheese RoboticCheese force-pushed the RoboticCheese:jdh-execute-env-home branch from 25ef1d0 to fb7a13e Mar 3, 2016

@RoboticCheese

This comment has been minimized.

Copy link
Contributor Author

commented Mar 3, 2016

At @michaelklishin's suggestion, updated all the fallback home dirs to /var/lib/rabbitmq.

jjasghar pushed a commit that referenced this pull request Mar 8, 2016

JJ Asghar
Merge pull request #352 from RoboticCheese/jdh-execute-env-home
Pass a HOME environment variable to all rabbitmq execute blocks

@jjasghar jjasghar merged commit f4d8da4 into rabbitmq:master Mar 8, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@RoboticCheese RoboticCheese deleted the RoboticCheese:jdh-execute-env-home branch Mar 8, 2016

iramello added a commit to iramello/rabbitmq that referenced this pull request Apr 4, 2016

Revert "Merge pull request rabbitmq#352 from RoboticCheese/jdh-execut…
…e-env-home"

This reverts commit f4d8da4, reversing
changes made to 2dc1ba9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.