-
Notifications
You must be signed in to change notification settings - Fork 30
Make shutdown command require the node to be local (unless --no-wait is provided) #309
Conversation
Shutdown waits for the node to stop based on OS pid, if the node is not local, it will be the wrong pid. [#142699795]
I've moved the check to a validator. |
Let's double check if the BOSH release may be using this in a non-local scenario under any circumstances since it technically does work (the node will stop), even though not really as expected (the command won't wait for shutdown since there never will be a local pid file). |
@gerhard FYI. |
Add --[no-]wait (enabled by default) for those who would prefer to use it to shut down remote nodes even though it wouldn't wait for a verified node termination. Propagate --timeout to calls. References #309.
I introduced a new flag, |
Backported to |
This makes sense, good catch. I can see that cf-rabbitmq-release uses shutdown with remote nodes, this change is likely to impact them. cc @rabbitmq/rabbitmq-pcf-tile-team rabbitmq-server-boshrelease uses shutdown with local node, no impact. cc @rabbitmq/sme |
We've discovered with @nodo that in cf-rabbitmq-release Should we make the remote node check account for this edge-case? FWIW, the order in which inet_db data gets loaded in Erlang/OTP v20.3.8.20 |
If they are both |
@gerhard if a hostname is |
FWIW this is probably pretty common. Here's what I see on my own workstation -
The startup scripts use |
You might be thinking about the value returned in |
If |
Let me reproduce this issue locally so that it's easier to fix. |
@gerhard happy to help if you want to. |
inet_db is not a very reliable source as it doesn't take node name CLI arguments and ERL_INETRC file settings. That can lead to false positives in environments where inet_db returns the same value (e.g. `localhost`) for every cluster member. Per discussion with @gerhard. Closes #327. References #309.
inet_db is not a very reliable source as it doesn't take node name CLI arguments and ERL_INETRC file settings. That can lead to false positives in environments where inet_db returns the same value (e.g. `localhost`) for every cluster member. Per discussion with @gerhard. Closes #327. References #309. (cherry picked from commit f83ea58)
Without this -n has to be used when it previously wasn't required. Follow-up to #328, references #327, #309. Per discussion with @lukebakken.
Without this -n has to be used when it previously wasn't required. Follow-up to #328, references #327, #309. Per discussion with @lukebakken. (cherry picked from commit 952ec9e)
Shutdown waits for the node to stop based on OS pid,
if the node is not local, the pid file won't be local and will never exist.
[#142699795]
It's not that easy to autotest this feature, because it requires a node on a different host.