[Ocfs2-tools-commits] jlbec commits r694 - in trunk: . o2cb_ctl
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Mar 18 19:18:59 CST 2005
Author: jlbec
Date: 2005-03-18 19:18:57 -0600 (Fri, 18 Mar 2005)
New Revision: 694
Modified:
trunk/README.O2CB
trunk/o2cb_ctl/o2cb_ctl.c
Log:
o Change to use /etc/ocfs2/cluster.conf
o Reject duplicate node numbers
Modified: trunk/README.O2CB
===================================================================
--- trunk/README.O2CB 2005-03-19 01:13:19 UTC (rev 693)
+++ trunk/README.O2CB 2005-03-19 01:18:57 UTC (rev 694)
@@ -8,9 +8,9 @@
cluster configuration in a much nicer way. But until then, you have to
hand-edit the file.
-The cluster confguration is stored in /etc/cluster.conf. This is a
-hardcoded name right now (boo!), so you have to put it there. The file
-is in stanza format, with one stanza describing the generic cluster
+The cluster confguration is stored in /etc/ocfs2/cluster.conf. This is
+a hardcoded name right now (boo!), so you have to put it there. The
+file is in stanza format, with one stanza describing the generic cluster
attributes and one stanza for each node.
The stanza for the generic cluster attributes looks like so:
Modified: trunk/o2cb_ctl/o2cb_ctl.c
===================================================================
--- trunk/o2cb_ctl/o2cb_ctl.c 2005-03-19 01:13:19 UTC (rev 693)
+++ trunk/o2cb_ctl/o2cb_ctl.c 2005-03-19 01:18:57 UTC (rev 694)
@@ -41,7 +41,7 @@
#include "o2cb.h"
#define PROGNAME "o2cb_ctl"
-#define O2CB_CONFIG_FILE "/etc/cluster.conf"
+#define O2CB_CONFIG_FILE "/etc/ocfs2/cluster.conf"
typedef enum {
O2CB_OP_NONE = 0,
@@ -847,7 +847,7 @@
{
gint rc;
O2CBCluster *cluster;
- O2CBNode *node;
+ O2CBNode *node, *tmpnode;
errcode_t err;
long num;
gchar *ptr;
@@ -959,6 +959,16 @@
goto out;
}
+ tmpnode = o2cb_cluster_get_node(cluster, num);
+ if (tmpnode)
+ {
+ rc = -EEXIST;
+ fprintf(stderr,
+ PROGNAME ": Node number \"%ld\" already exists\n",
+ num);
+ g_free(number);
+ goto out;
+ }
o2cb_node_set_number(node, num);
}
else
More information about the Ocfs2-tools-commits
mailing list