]> git.proxmox.com Git - pve-cluster.git/commitdiff
avoid warning when adding a new node
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 20 Aug 2013 07:02:38 +0000 (09:02 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 2 Sep 2013 08:00:27 +0000 (10:00 +0200)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Makefile
data/PVE/Cluster.pm
data/PVE/pvecm
debian/changelog

index d97bd503f6e52e0f124f9e2c717d492a55c631d3..d8bac5fe728d938e49a15335cf302259446aeb74 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-RELEASE=3.0
+RELEASE=3.1
 
 PACKAGE=pve-cluster
 PKGVER=3.0
-PKGREL=5
+PKGREL=6
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
index 63b06b64e25b91fb4681126c7d128dc61d354b48..605427757fc80a00ce024f408c0ec2aedb7c31e1 100644 (file)
@@ -141,7 +141,7 @@ sub gen_auth_key {
 
     check_cfs_is_mounted();
 
-    mkdir $authdir || die "unable to create dir '$authdir' - $!\n";
+    -d $authdir || mkdir $authdir || die "unable to create dir '$authdir' - $!\n";
 
     my $cmd = "openssl genrsa -out '$authprivkeyfn' 2048";
     run_silent_cmd($cmd);
@@ -1047,6 +1047,12 @@ sub ssh_merge_keys {
 
 sub setup_rootsshconfig {
 
+    # create ssh key if it does not exist
+    if (! -f $ssh_rsa_id) {
+       mkdir '/root/.ssh/';
+       system ("echo|ssh-keygen -t rsa -N '' -b 2048 -f ${ssh_rsa_id_priv}");
+    }
+
     # create ssh config if it does not exist
     if (! -f $rootsshconfig) {
         mkdir '/root/.ssh';
@@ -1060,12 +1066,6 @@ sub setup_rootsshconfig {
 
 sub setup_ssh_keys {
 
-    # create ssh key if it does not exist
-    if (! -f $ssh_rsa_id) {
-       mkdir '/root/.ssh/';
-       system ("echo|ssh-keygen -t rsa -N '' -b 2048 -f ${ssh_rsa_id_priv}");
-    }
-
     mkdir $authdir;
 
     my $import_ok;
index 04bbc87c2b15a9dc49779099f9290adb694340a5..5a7074fda7b5ccb99458922e111ba76dc62ad4db 100755 (executable)
@@ -606,7 +606,6 @@ __PACKAGE__->register_method ({
        my ($param) = @_;
 
        PVE::Cluster::setup_rootsshconfig();
-       PVE::Cluster::setup_ssh_keys();
 
        PVE::Cluster::gen_pve_vzdump_symlink();
 
@@ -615,6 +614,8 @@ __PACKAGE__->register_method ({
            die "no quorum - unable to update files\n";
        }
 
+       PVE::Cluster::setup_ssh_keys();
+
        PVE::Cluster::gen_pve_node_files($nodename, $local_ip_address, $param->{force});
        PVE::Cluster::ssh_merge_keys();
        PVE::Cluster::ssh_merge_known_hosts($nodename, $local_ip_address);
index 75abf94b5841cda987c3efdf3868b3499c7e5feb..42c7b39f333481e88b01f5671e62a088c39e08b4 100644 (file)
@@ -1,3 +1,11 @@
+pve-cluster (3.0-6) unstable; urgency=low
+
+  * avoid warning when adding a new node (can't create shared ssh key database...)
+  
+  * avoid warning if /etc/pve/priv/ already exists
+
+ -- Proxmox Support Team <support@proxmox.com>  Tue, 20 Aug 2013 08:58:17 +0200
+
 pve-cluster (3.0-5) unstable; urgency=low
 
   * add migration_unsecure param to datacenter.cfg