[pve-devel] r6434 - in pve-cluster/trunk/data: . PVE
svn-commits at proxmox.com
svn-commits at proxmox.com
Tue Aug 9 06:24:26 CEST 2011
Author: dietmar
Date: 2011-08-09 06:24:26 +0200 (Tue, 09 Aug 2011)
New Revision: 6434
Modified:
pve-cluster/trunk/data/ChangeLog
pve-cluster/trunk/data/PVE/Cluster.pm
pve-cluster/trunk/data/PVE/pvecm
Log:
* PVE/pvecm (backup_database): revert pervious change - do not
pass IP to addnode. Instead we run gen_pve_node_files in 'add'
after we get quorum.
Modified: pve-cluster/trunk/data/ChangeLog
===================================================================
--- pve-cluster/trunk/data/ChangeLog 2011-08-08 09:52:23 UTC (rev 6433)
+++ pve-cluster/trunk/data/ChangeLog 2011-08-09 04:24:26 UTC (rev 6434)
@@ -1,5 +1,14 @@
+2011-08-09 Proxmox Support Team <support at proxmox.com>
+
+ * PVE/pvecm (backup_database): revert pervious change - do not
+ pass IP to addnode. Instead we run gen_pve_node_files in 'add'
+ after we get quorum.
+
2011-08-08 Proxmox Support Team <support at proxmox.com>
+ * PVE/Cluster.pm (check_cfs_quorum): check for undefined $st (no
+ such file).
+
* PVE/pvecm: try to create all files/dirs in 'addnode', because that
node has quorum.
(create): Add id_rsa.pub to authorized_keys.
Modified: pve-cluster/trunk/data/PVE/Cluster.pm
===================================================================
--- pve-cluster/trunk/data/PVE/Cluster.pm 2011-08-08 09:52:23 UTC (rev 6433)
+++ pve-cluster/trunk/data/PVE/Cluster.pm 2011-08-09 04:24:26 UTC (rev 6434)
@@ -76,7 +76,7 @@
# note: -w $lockdir always return 1 for root, so wee need
# to use File::stat here
my $st = File::stat::stat($lockdir);
- return (($st->mode & 0200) != 0);
+ return ($st && (($st->mode & 0200) != 0));
}
sub check_cfs_is_mounted {
Modified: pve-cluster/trunk/data/PVE/pvecm
===================================================================
--- pve-cluster/trunk/data/PVE/pvecm 2011-08-08 09:52:23 UTC (rev 6433)
+++ pve-cluster/trunk/data/PVE/pvecm 2011-08-09 04:24:26 UTC (rev 6434)
@@ -283,10 +283,6 @@
minimum => 1,
optional => 1,
},
- ip => {
- description => "Node IP address (only used to generate ssl certs).",
- type => 'string', format => 'ipv4',
- },
votes => {
type => 'integer',
description => "Number of votes for this node",
@@ -351,7 +347,7 @@
$param->{votes} = 1 if !defined($param->{votes});
- PVE::Cluster::gen_pve_node_files($name, $param->{ip});
+ PVE::Cluster::gen_local_dirs($name);
$cmd = ['ccs_tool', 'addnode', '-c', $clusterconf];
@@ -454,7 +450,7 @@
die "unable to copy ssh ID\n";
$cmd = ['ssh', $host, '-o', 'BatchMode=yes',
- 'pvecm', 'addnode', $nodename, $local_ip_address, '--force', 1];
+ 'pvecm', 'addnode', $nodename, '--force', 1];
push @$cmd, '-n', $param->{nodeid} if $param->{nodeid};
@@ -510,7 +506,12 @@
}
sleep(1);
}
- print "OK\n";
+ print "OK\n" if !$printqmsg;
+
+ print "generating node certificates\n";
+ PVE::Cluster::gen_pve_node_files($nodename, $local_ip_address);
+
+ print "restart services\n";
# restart apache (changed certs)
system("/etc/init.d/apache2 restart");
@@ -626,7 +627,7 @@
keygen => [ __PACKAGE__, 'keygen', ['filename']],
create => [ __PACKAGE__, 'create', ['clustername']],
add => [ __PACKAGE__, 'add', ['hostname']],
- addnode => [ __PACKAGE__, 'addnode', ['node', 'ip']],
+ addnode => [ __PACKAGE__, 'addnode', ['node']],
delnode => [ __PACKAGE__, 'delnode', ['node']],
status => [ __PACKAGE__, 'status' ],
nodes => [ __PACKAGE__, 'nodes' ],
More information about the pve-devel
mailing list