[pve-devel] [PATCH cluster 3/8] pvecm create: remove rrp_mode parameter
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Feb 22 16:59:06 CET 2017
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 at proxmox.com>
---
I should not have added it in the first place... :/
data/PVE/CLI/pvecm.pm | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm
index f15f467..294486f 100755
--- a/data/PVE/CLI/pvecm.pm
+++ b/data/PVE/CLI/pvecm.pm
@@ -133,15 +133,6 @@ __PACKAGE__->register_method ({
" 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".
@@ -202,13 +193,11 @@ __PACKAGE__->register_method ({
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 .= "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') {
@@ -220,9 +209,6 @@ __PACKAGE__->register_method ({
}
- $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';
--
2.1.4
More information about the pve-devel
mailing list