pvecm create now adds the following additional corosync.conf parameters:
* totem.ip_version
* totem.interface.ringnumber
* totem.interface.bindnetaddr
For ipv6 corosync needs a 'totem.interface' list with at least one entry
containing a bindnetaddr setting. Additionally 'totem.ip_version' needs to
explicitly be set to ipv6 (or an 'mcastaddr' set, which corosync can
choose automatically, though, so we let it do just that).
use Getopt::Long;
use Socket;
use IO::File;
+use Net::IP;
use File::Path;
use File::Basename;
use Data::Dumper; # fixme: remove
$param->{votes} = 1 if !defined($param->{votes});
+ # No, corosync cannot deduce this on its own
+ my $ipversion = Net::IP::ip_is_ipv6($local_ip_address) ? 'ipv6' : 'ipv4';
+
my $config = <<_EOD;
totem {
version: 2
secauth: on
cluster_name: $clustername
config_version: 1
+ ip_version: $ipversion
+ interface {
+ ringnumber: 0
+ bindnetaddr: $local_ip_address
+ }
}
nodelist {