I detected a bug where we overwrote the whole $interfaces variable
(and so all interfaces from the corosync config) if the 'rrp_mode'
param was set.
While this would be easy to with by changing the line to
$interfaces .= ...
I removed the whole rrp_mode parameter instead.
As:
a) I've seen no one running into this bug, so this parameter was not
really used either way.
b) only the 'passive' is supported and works, 'active' has a whole
lot of problems. If someone really wants it he should edit the
corosync config file to achieve this
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
" Defaults to the hostname of the node.",
optional => 1,
},
" Defaults to the hostname of the node.",
optional => 1,
},
- rrp_mode => {
- type => 'string',
- enum => ['none', 'active', 'passive'],
- description => "This specifies the mode of redundant ring, which" .
- " may be none, active or passive. Using multiple interfaces".
- " only allows 'active' or 'passive'.",
- default => 'none',
- optional => 1,
- },
bindnet1_addr => {
type => 'string', format => 'ip',
description => "This specifies the network address the corosync ring 1".
bindnet1_addr => {
type => 'string', format => 'ip',
description => "This specifies the network address the corosync ring 1".
die "IPv6 and IPv4 cannot be mixed, use one or the other!\n"
if Net::IP::ip_is_ipv6($param->{bindnet1_addr}) != $bind_is_ipv6;
die "IPv6 and IPv4 cannot be mixed, use one or the other!\n"
if Net::IP::ip_is_ipv6($param->{bindnet1_addr}) != $bind_is_ipv6;
- die "rrp_mode 'none' is not allowed when using multiple interfaces,".
- " use 'active' or 'passive'!\n"
- if !$param->{rrp_mode} || $param->{rrp_mode} eq 'none';
-
$interfaces .= "\n interface {\n ringnumber: 1\n" .
" bindnetaddr: $param->{bindnet1_addr}\n }\n";
$interfaces .= "\n interface {\n ringnumber: 1\n" .
" bindnetaddr: $param->{bindnet1_addr}\n }\n";
+ $interfaces .= "rrp_mode: passive\n"; # only passive is stable and tested
+
$ring_addresses .= "\n ring1_addr: $param->{ring1_addr}";
} elsif($param->{rrp_mode} && $param->{rrp_mode} ne 'none') {
$ring_addresses .= "\n ring1_addr: $param->{ring1_addr}";
} elsif($param->{rrp_mode} && $param->{rrp_mode} ne 'none') {
- $interfaces = "rrp_mode: $param->{rrp_mode}\n " . $interfaces
- if $param->{rrp_mode};
-
# No, corosync cannot deduce this on its own
my $ipversion = $bind_is_ipv6 ? 'ipv6' : 'ipv4';
# No, corosync cannot deduce this on its own
my $ipversion = $bind_is_ipv6 ? 'ipv6' : 'ipv4';