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

rabbitmq-run.mk: Fix stop-brokers with NODES > 1 #281

Merged
merged 1 commit into from
Nov 16, 2018

Conversation

jeckersb
Copy link
Contributor

@jeckersb jeckersb commented Nov 12, 2018

Remove extra "1" in seq command. Previously, as an example with
NODES=2, will run seq 2 1 which produces no items to iterate, so the
entire stop-node loop does not execute and the brokers are left
running.

(This should qualify as an Obvious Fix for CLA purposes)

@pivotal-issuemaster
Copy link

@jeckersb Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@jeckersb This Pull Request contains an obvious fix. Signing the Contributor License Agreement is not necessary.

@michaelklishin
Copy link
Contributor

Thank you. We will take a look at this after our team-wide getaway that's happening this week.

Copy link
Contributor

@dumbbell dumbbell left a comment

Choose a reason for hiding this comment

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

Hi!

Thank you for the patch. Indeed, the seq(1) command on Linux doesn't produce the expected output which should be "2 1" in this example, to stop the brokers in the reversed order.

Could you please modify your patch so that the command is seq $(NODES) -1 1?

The seq command should include a -1 increment to stop nodes in reverse
order.  Previously, as an example with NODES=2, will run `seq 2 1`
which produces no items to iterate, so the entire stop-node loop does
not execute and the brokers are left running.
@jeckersb
Copy link
Contributor Author

@dumbbell thanks, makes much more sense to stop them in reverse order :)

@dumbbell dumbbell merged commit da14f86 into rabbitmq:master Nov 16, 2018
@dumbbell
Copy link
Contributor

Thank you, I merged your patch.

That was my mistake. I only tested this on my workstation running FreeBSD and seq(1) on BSD doesn't have the same default behavior regarding the implicit increment as the GNU implementation. So the usual Works On My Machine™ :-)

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.

4 participants