[pve-devel] r6509 - in pve-cluster/trunk/data: . PVE src

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Aug 22 06:43:18 CEST 2011


Author: dietmar
Date: 2011-08-22 06:43:17 +0200 (Mon, 22 Aug 2011)
New Revision: 6509

Modified:
   pve-cluster/trunk/data/ChangeLog
   pve-cluster/trunk/data/PVE/pvecm
   pve-cluster/trunk/data/src/cfs-plug-link.c
Log:
	* src/cfs-plug-link.c (cfs_plug_link_getattr): set read-only if we
	do not have quorum.



Modified: pve-cluster/trunk/data/ChangeLog
===================================================================
--- pve-cluster/trunk/data/ChangeLog	2011-08-19 10:35:51 UTC (rev 6508)
+++ pve-cluster/trunk/data/ChangeLog	2011-08-22 04:43:17 UTC (rev 6509)
@@ -1,3 +1,8 @@
+2011-08-22  Proxmox Support Team  <support at proxmox.com>
+
+	* src/cfs-plug-link.c (cfs_plug_link_getattr): set read-only if we
+	do not have quorum.
+
 2011-08-19  Proxmox Support Team  <support at proxmox.com>
 
 	* PVE/pvecm (create): removed section (rm) from cluster.conf (do

Modified: pve-cluster/trunk/data/PVE/pvecm
===================================================================
--- pve-cluster/trunk/data/PVE/pvecm	2011-08-19 10:35:51 UTC (rev 6508)
+++ pve-cluster/trunk/data/PVE/pvecm	2011-08-22 04:43:17 UTC (rev 6509)
@@ -247,9 +247,6 @@
 	die "cluster not ready - no quorum?\n"
 	    if !PVE::Cluster::check_cfs_quorum();
 
-	eval { 	PVE::Cluster::ssh_merge_keys(); };
-	warn $@ if $@;
-
 	my $lst = lsnode();
 
 	my $name = $param->{node};
@@ -289,6 +286,9 @@
 
 	PVE::Cluster::gen_local_dirs($name);
 
+	eval { 	PVE::Cluster::ssh_merge_keys(); };
+	warn $@ if $@;
+
 	my $cmd = ['ccs_tool', 'addnode', '-c', $clusterconf];
 
 	# NOTE: cman does not like votes="0"

Modified: pve-cluster/trunk/data/src/cfs-plug-link.c
===================================================================
--- pve-cluster/trunk/data/src/cfs-plug-link.c	2011-08-19 10:35:51 UTC (rev 6508)
+++ pve-cluster/trunk/data/src/cfs-plug-link.c	2011-08-22 04:43:17 UTC (rev 6509)
@@ -36,6 +36,7 @@
 
 #include "cfs-utils.h"
 #include "cfs-plug.h"
+#include "status.h"
 
 static struct cfs_operations cfs_ops;
 
@@ -58,7 +59,12 @@
 
 	memset(stbuf, 0, sizeof(struct stat));
 
-	stbuf->st_mode = S_IFLNK | 0777;
+	if (cfs_is_quorate()) {
+		stbuf->st_mode = S_IFLNK | 0777;
+	} else {
+		stbuf->st_mode = S_IFLNK | 0555;
+	}
+
 	stbuf->st_nlink = 1;
 
 	return 0;



More information about the pve-devel mailing list