}
};
- my $link0 = PVE::Cluster::parse_corosync_link($param->{link0});
- my $link1 = PVE::Cluster::parse_corosync_link($param->{link1});
+ my $link0 = PVE::Corosync::parse_corosync_link($param->{link0});
+ my $link1 = PVE::Corosync::parse_corosync_link($param->{link1});
$check_duplicate_addr->($link0);
$check_duplicate_addr->($link1);
my $host = $param->{hostname};
my $local_ip_address = PVE::Cluster::remote_node_ip($nodename);
- my $link0 = PVE::Cluster::parse_corosync_link($param->{link0});
- my $link1 = PVE::Cluster::parse_corosync_link($param->{link1});
+ my $link0 = PVE::Corosync::parse_corosync_link($param->{link0});
+ my $link1 = PVE::Corosync::parse_corosync_link($param->{link1});
PVE::Cluster::Setup::assert_joinable($local_ip_address, $link0, $link1, $param->{force});
return $cmd;
}
-my $corosync_link_format = {
- address => {
- default_key => 1,
- type => 'string', format => 'address',
- format_description => 'IP',
- description => "Hostname (or IP) of this corosync link address.",
- },
- priority => {
- optional => 1,
- type => 'integer',
- minimum => 0,
- maximum => 255,
- default => 0,
- description => "The priority for the link when knet is used in 'passive' mode. Lower value means higher priority.",
- },
-};
-my $corosync_link_desc = {
- type => 'string', format => $corosync_link_format,
- description => "Address and priority information of a single corosync link.",
- optional => 1,
-};
-PVE::JSONSchema::register_standard_option("corosync-link", $corosync_link_desc);
-
-sub parse_corosync_link {
- my ($value) = @_;
-
- return undef if !defined($value);
-
- return PVE::JSONSchema::parse_property_string($corosync_link_format, $value);
-}
-
# NOTE: filesystem must be offline here, no DB changes allowed
sub cfs_backup_database {
mkdir $dbbackupdir;
use PVE::APIClient::LWP;
use PVE::Cluster;
+use PVE::Corosync;
use PVE::INotify;
use PVE::JSONSchema;
use PVE::Network;
my $nodename = PVE::INotify::nodename();
my $local_ip_address = PVE::Cluster::remote_node_ip($nodename);
- my $link0 = PVE::Cluster::parse_corosync_link($param->{link0});
- my $link1 = PVE::Cluster::parse_corosync_link($param->{link1});
+ my $link0 = PVE::Corosync::parse_corosync_link($param->{link0});
+ my $link1 = PVE::Corosync::parse_corosync_link($param->{link1});
# check if we can join with the given parameters and current node state
assert_joinable($local_ip_address, $link0, $link1, $param->{force});
use Net::IP qw(ip_is_ipv6);
use PVE::Cluster;
+use PVE::JSONSchema;
use PVE::Tools;
use PVE::Tools qw($IPV4RE $IPV6RE);
interface => 1,
};
+my $corosync_link_format = {
+ address => {
+ default_key => 1,
+ type => 'string', format => 'address',
+ format_description => 'IP',
+ description => "Hostname (or IP) of this corosync link address.",
+ },
+ priority => {
+ optional => 1,
+ type => 'integer',
+ minimum => 0,
+ maximum => 255,
+ default => 0,
+ description => "The priority for the link when knet is used in 'passive' mode. Lower value means higher priority.",
+ },
+};
+my $corosync_link_desc = {
+ type => 'string', format => $corosync_link_format,
+ description => "Address and priority information of a single corosync link.",
+ optional => 1,
+};
+PVE::JSONSchema::register_standard_option("corosync-link", $corosync_link_desc);
+
+sub parse_corosync_link {
+ my ($value) = @_;
+
+ return undef if !defined($value);
+
+ return PVE::JSONSchema::parse_property_string($corosync_link_format, $value);
+}
+
# a very simply parser ...
sub parse_conf {
my ($filename, $raw) = @_;