Fix carp FAQ: net.inet.carp.preempt is not necessary for group demotion failover
if I read the code correctly, the demotion counter would only _prevent_
preemptive failover if the preempting master was demoted.
A demoted master would failover to a less demoted backup no matter what
the advbase / advskew timing says.
The relevant code is following sys/netinet/ip_carp.c:665.
Here's the diff:
--- carp.html.orig Sun Nov 12 11:26:42 2017
+++ carp.html Sun Nov 12 11:33:05 2017
@@ -194,8 +194,12 @@
By default, all carp(4) interfaces are added to the <tt>carp</tt> group.
Each group has a <tt>carpdemote</tt> counter affecting all carp(4)
interfaces belonging to that group.
- As described below, it can be useful to group certain interfaces together
- for failover purposes.
+ This enables failing over the whole group of interfaces in the event that
+ one interface goes down.
+ If one physical CARP-enabled interface goes down, CARP will increase
+ the demotion counter, <tt>carpdemote</tt>, by 1 on interface groups that
+ the carp(4) interface is a member of, in effect causing all group
+ members to fail-over together.
<dd>This is the shared IP address assigned to the redundancy group.
@@ -219,12 +223,6 @@
<dd>Allow hosts within a redundancy group that have a better
<tt>advbase</tt> and <tt>advskew</tt> to preempt the master.
- In addition, this option also enables failing over a group of interfaces
- together in the event that one interface goes down.
- If one physical CARP-enabled interface goes down, CARP will increase
- the demotion counter, <tt>carpdemote</tt>, by 1 on interface groups that
- the carp(4) interface is a member of, in effect causing all group
- members to fail-over together.
<tt>net.inet.carp.preempt</tt> is 0 (disabled) by default.