Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Rely on rabbit_env to infer node name #422

Merged
merged 1 commit into from
May 28, 2020
Merged

Conversation

michaelklishin
Copy link
Member

During the 3.8.4 cycle we have backported rabbit_env to v3.8.x.
Instead of messing with env variable prefixing, it tries both
RABBITMQ_{VAR} and {VAR} environment variables. However,
in CLI tools node name currently only picks up RABBITMQ_NODENAME,
so environments where node name has to be explicitly configured
via rabbitmq-env.conf:

NODENAME=rabbit@our.custom.hostname

would not pick this node name up. RABBITMQ_NODENAME had to be added
as a workaround.

With this change the behavior of CLI tools and the server is closer.

Note that this updates a few places which used Config.get_option/2
to get a "default node name" which more often than not ended up
being a node prefix ("rabbit"). Those tests had to be updated
to use Config.default/1.

Closes #421.
References 29ecca2, 4243d9a, #278.

During the 3.8.4 cycle we have backported `rabbit_env` to v3.8.x.
Instead of messing with env variable prefixing, it tries both
RABBITMQ_{VAR} and {VAR} environment variables. However,
in CLI tools node name currently only picks up RABBITMQ_NODENAME,
so environments where node name has to be explicitly configured
via rabbitmq-env.conf:

NODENAME=rabbit@our.custom.hostname

would not pick this node name up. RABBITMQ_NODENAME had to be added
as a workaround.

With this change the behavior of CLI tools and the server is closer.

Note that this updates a few places which used `Config.get_option/2`
to get a "default node name" which more often than not ended up
being a node prefix ("rabbit"). Those tests had to be updated
to use `Config.default/1`.

Closes #421.
References 29ecca2, 4243d9a.
Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

No issue with 3.8.3, reproduced problem with 3.8.4, this PR fixes it 👍

@michaelklishin michaelklishin removed the request for review from dumbbell May 28, 2020 02:59
@michaelklishin michaelklishin merged commit d34ef5b into master May 28, 2020
@michaelklishin michaelklishin deleted the rabbitmq-cli-421 branch May 28, 2020 03:00
michaelklishin added a commit that referenced this pull request May 28, 2020
Rely on rabbit_env to infer node name

(cherry picked from commit d34ef5b)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can extended environment variables be taken into account by CLI tools?
2 participants