Skip to content

Support kernel.net_ticktime in Cuttlefish configuration (master) #1524

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

Conversation

acogoluegnes
Copy link
Contributor

net_ticktime, if present in the .conf file, is set up with net_kernel:set_net_ticktime/1 before the configuration of the .conf file is applied to the other applications. The kernel application is already running when the configuration is applied, so net_ticktime is set in a specific way.

Fixes #1522

michaelklishin and others added 3 commits February 21, 2018 12:29
RABBITMQ_NAME_TYPE should be correctly set in Windows batch files
net_ticktime, if present in the .conf file, is set up with
net_kernel:set_net_ticktime/1 before the configuration
of the .conf is applied to the other applications. The kernel
is already running when the configuration is applied, so net_ticktime
is set in a specific way.

[#155393098]

Fixes #1522
net_ticktime, if present in the .conf file, is set up with
net_kernel:set_net_ticktime/1 before the configuration
of the .conf is applied to the other applications. The kernel
is already running when the configuration is applied, so net_ticktime
is set in a specific way.

[#155393098]

Fixes #1522

(cherry picked from commit fdb3e75)
@michaelklishin michaelklishin changed the title Support kernel.net_ticktime in Cuttlefish configuration Support kernel.net_ticktime in Cuttlefish configuration (master) Feb 22, 2018
@michaelklishin
Copy link
Collaborator

I discovered the following during manual testing: since the transition period by default takes 60 seconds, should a CLI tool contact a running node with net_ticktime in the .conf file with this PR, it will fail with something like this:

Stopping and halting node rabbit@warp10 ...
Error:
function_clause
 Stacktrace [{net_kernel,set_net_ticktime,
                         [{ongoing_change_to,20},0],
                         [{file,"net_kernel.erl"},{line,195}]},
             {rabbit_misc,rpc_call,5,
                          [{file,"src/rabbit_misc.erl"},{line,1175}]},
             {'Elixir.RabbitMQCtl',maybe_run_command,3,
                                   [{file,"lib/rabbitmqctl.ex"},{line,113}]},
             {'Elixir.RabbitMQCtl','-exec_command/2-fun-0-',5,
                                   [{file,"lib/rabbitmqctl.ex"},{line,80}]},
             {'Elixir.RabbitMQCtl',main,1,
                                   [{file,"lib/rabbitmqctl.ex"},{line,43}]},
             {'Elixir.Kernel.CLI','-exec_fun/2-fun-0-',3,
                                  [{file,"lib/kernel/cli.ex"},{line,76}]}]

because CLI tools temporarily tweak node's net_ticktime for the two values to be in sync.

We can try a transition period of 0 but I don't know what complications can stem out of that. I don't think the change is worth the risk since it's a minor convenience improvement.

@michaelklishin
Copy link
Collaborator

michaelklishin commented Feb 22, 2018

A correction: it's not just CLI tools, it's any code that uses rabbit_misc:rpc_call/5 but it should not be used on any hot code path.

Updating that function to support transition periods should be sufficient. It can still potentially be a breaking change for the environment where CLI tools use a significantly higher tick time value vs. the server: the server would then detect inactivity on an idle connection much earlier than the CLI tool. We don't have a lot of reports about that, though, possibly because CLI tool connections do go inactive for long enough periods of time.

@michaelklishin
Copy link
Collaborator

According to rabbitmq/rabbitmq-common#60, that function is used by management and possibly other plugins.

@michaelklishin michaelklishin merged commit 4cb2298 into master Feb 22, 2018
michaelklishin added a commit to rabbitmq/rabbitmq-common that referenced this pull request Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants