Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1c…
Commit: 1c812b3cabbe4a8669f7c5d98a4b1a0a1ff91767
Parent: be452ae8cb9eb7764b5f07ba08edeb04cd868134
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Wed Dec 1 14:13:38 2010 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed Jan 12 10:51:05 2011 -0500
cman: Update cman_tool version section in man page
Resolves: rhbz#619874
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/man/cman_tool.8 | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/cman/man/cman_tool.8 b/cman/man/cman_tool.8
index 5d38941..bd710a2 100644
--- a/cman/man/cman_tool.8
+++ b/cman/man/cman_tool.8
@@ -65,15 +65,12 @@ you need to get it running again in a hurry.
.I version
Used alone this will report the major, minor, patch and config versions
used by CMAN (also displayed in 'cman_tool status'). It can also be used
-with -r to tell cluster members to update.
+with -r to tell cluster members to update the cluster configuration.
.br
-The argument to -r is the version number that cman should look for. If
-that version is not currently available then cman will poll for it. If
-a version of 0 is specified then cman will read the configuration file,
-validate it, distribute it around the cluster (if necessary) and
-activate it.
-.br
-The -D flag can disable the validation stage. This is NOT recommended.
+If -r is specified, cman will read the configuration file,
+validate it, distribute it around the cluster (if necessary) an
+activate it. See the VERSION OPTIONS section below for additional
+options to the \fBversion\fP command.
.TP
.I wait
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9a…
Commit: 9a20e576b54a17841c6bb8a4795a253ecb8a4561
Parent: b6c1fb8865b2b68cec3296ec182598f8c8c89cc8
Author: Jan Friesse <jfriesse(a)redhat.com>
AuthorDate: Mon Sep 27 15:27:59 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Jan 12 16:18:52 2011 +0100
Cman: Handle INT and TERM signals correctly
Corosync signal handler (SIGINT and SIGTERM) is replaced by cman one,
and this was settting quit_threads to 1. Regular cman shutdown sequence
(cman_tool leave) tests if quit_threads is set or not. If so, it refuses
continue so it was not possible to cleanly leave cluster.
Now SIGINT and SIGTERM are ignored, and (un)intentional kill of corosync
is no longer problem.
Resolves: rhbz#617234
---
cman/daemon/daemon.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/cman/daemon/daemon.c b/cman/daemon/daemon.c
index 64607cc..92cfd47 100644
--- a/cman/daemon/daemon.c
+++ b/cman/daemon/daemon.c
@@ -489,11 +489,6 @@ int num_listeners(void)
return count;
}
-static void sigint_handler(int ignored)
-{
- quit_threads = 1;
-}
-
int cman_init(struct corosync_api_v1 *api)
{
int fd;
@@ -514,12 +509,10 @@ int cman_init(struct corosync_api_v1 *api)
return -2;
/* Shutdown trap */
- sa.sa_handler = sigint_handler;
- sigaction(SIGINT, &sa, NULL);
- sigaction(SIGTERM, &sa, NULL);
-
sa.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &sa, NULL);
+ sigaction(SIGINT, &sa, NULL);
+ sigaction(SIGTERM, &sa, NULL);
return 0;
}
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=cd…
Commit: cdb8831463fd622a1bc24af5f9760ae0f456b039
Parent: a8cc8128e3bb815d2d8c7467929ee14b2edd92a6
Author: Jan Friesse <jfriesse(a)redhat.com>
AuthorDate: Mon Sep 27 15:20:16 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Jan 12 16:18:12 2011 +0100
Cman: Handle corosync exit codes
Resolves: rhbz#617247
---
cman/cman_tool/join.c | 32 +++++++++++++++++++-------------
1 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/cman/cman_tool/join.c b/cman/cman_tool/join.c
index c6cf4ef..ed8b535 100644
--- a/cman/cman_tool/join.c
+++ b/cman/cman_tool/join.c
@@ -40,45 +40,51 @@ static const char *corosync_exit_reason(signed char status)
{
static char reason[256];
switch (status) {
- case -2:
+ case 1:
return "Could not determine UID to run as";
break;
- case -3:
+ case 2:
return "Could not determine GID to run as";
break;
- case -4:
+ case 3:
return "Error initialising memory pool";
break;
- case -5:
+ case 4:
return "Could not fork";
break;
- case -6:
+ case 5:
return "Could not bind to libais socket";
break;
- case -7:
+ case 6:
return "Could not bind to network socket";
break;
- case -8:
+ case 7:
return "Could not read security key for communications";
break;
- case -9:
+ case 8:
return "Could not read cluster configuration";
break;
- case -10:
+ case 9:
return "Could not set up logging";
break;
- case -11:
+ case 11:
return "Could not dynamically load modules";
break;
- case -12:
+ case 12:
return "Could not load and initialise object database";
break;
- case -13:
+ case 13:
return "Could not initialise all required services";
break;
- case -14:
+ case 14:
return "Out of memory";
break;
+ case 15:
+ return "Fatal error";
+ break;
+ case 16:
+ return "Required directory not present /var/lib/corosync.";
+ break;
default:
sprintf(reason, "Error, reason code is %d", status);
return reason;
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6a…
Commit: 6a4d7838acced508d1a30f1343b79d616b9b4a99
Parent: ca38fb4ad8caaf1f670fb0c7aedf08baae8e3a84
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Thu Jan 6 10:58:23 2011 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Jan 12 16:15:53 2011 +0100
ccs_tool: completely remove references to update/upgrades
Drop parsing of CF options and update man page to better reflect
what ccs_tool is and does.
Resolves: rhbz#577874
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
config/tools/ccs_tool/editconf.c | 8 ++++----
config/tools/man/ccs_tool.8 | 37 ++++++++-----------------------------
2 files changed, 12 insertions(+), 33 deletions(-)
diff --git a/config/tools/ccs_tool/editconf.c b/config/tools/ccs_tool/editconf.c
index a0371b4..7971672 100644
--- a/config/tools/ccs_tool/editconf.c
+++ b/config/tools/ccs_tool/editconf.c
@@ -783,7 +783,7 @@ void add_node(int argc, char **argv)
memset(&ninfo, 0, sizeof(ninfo));
ninfo.votes = "1";
- while ( (opt = getopt_long(argc, argv, "v:n:a:f:o:c:CFh?", addnode_options, NULL)) != EOF)
+ while ( (opt = getopt_long(argc, argv, "v:n:a:f:o:c:h?", addnode_options, NULL)) != EOF)
{
switch(opt)
{
@@ -849,7 +849,7 @@ void del_node(int argc, char **argv)
memset(&ninfo, 0, sizeof(ninfo));
- while ( (opt = getopt_long(argc, argv, "o:c:CFh?", delnode_options, NULL)) != EOF)
+ while ( (opt = getopt_long(argc, argv, "o:c:h?", delnode_options, NULL)) != EOF)
{
switch(opt)
{
@@ -1072,7 +1072,7 @@ void add_fence(int argc, char **argv)
memset(&ninfo, 0, sizeof(ninfo));
- while ( (opt = getopt_long(argc, argv, "c:o:CFh?", list_options, NULL)) != EOF)
+ while ( (opt = getopt_long(argc, argv, "c:o:h?", list_options, NULL)) != EOF)
{
switch(opt)
{
@@ -1134,7 +1134,7 @@ void del_fence(int argc, char **argv)
memset(&ninfo, 0, sizeof(ninfo));
- while ( (opt = getopt_long(argc, argv, "c:o:CFhv?", list_options, NULL)) != EOF)
+ while ( (opt = getopt_long(argc, argv, "c:o:hv?", list_options, NULL)) != EOF)
{
switch(opt)
{
diff --git a/config/tools/man/ccs_tool.8 b/config/tools/man/ccs_tool.8
index dd409e4..0f52f18 100644
--- a/config/tools/man/ccs_tool.8
+++ b/config/tools/man/ccs_tool.8
@@ -1,6 +1,6 @@
.TH "ccs_tool" "8" "" "" ""
.SH "NAME"
-ccs_tool \- The tool used to make online updates of CCS config files.
+ccs_tool \- The tool used to make online queries to the cluster configuration.
.SH "SYNOPSIS"
.B ccs_tool
@@ -8,10 +8,9 @@ ccs_tool \- The tool used to make online updates of CCS config files.
.SH "DESCRIPTION"
-\fBccs_tool\fP is part of the Cluster Configuration System (CCS). It is
-used to make online updates to cluster.conf. It can also be used to
-upgrade old style (GFS <= 6.0) CCS archives to the new xml cluster.conf
-format.
+\fBccs_tool\fP is part of the Cluster Configuration System (CCS). It used
+to peform different kind of queries to the cluster configuration and has support
+for some cluster.conf editing functions.
.SH "OPTIONS"
.TP
@@ -24,6 +23,10 @@ Print the version information.
sub\-commands have their own options, see below for more detail
.SH "COMMANDS"
+.TP
+\fBquery\fP \fI<xpath query>\fP
+Perform an xpath query on running cluster configuration.
+
.TP
\fBaddnode\fP [options] \fI<node> [<fenceoption=value>]...\fP
Adds a new node to the cluster configuration file. Fencing device options
@@ -51,12 +54,6 @@ section must already have been added to the file, probably using the addfence co
\-c <file> Config file to use. Defaults to /etc/cluster/cluster.conf
.br
\-o <file> Output file. Defaults to the same as -c
-.br
-\-C Don't run "ccs_tool update" after changing file. This will
-happen by default if the input file is the same as the output file.
-.br
-\-F Force a "ccs_tool update" even if the input and output files
-are different.
@@ -71,12 +68,6 @@ and add it back in with the new properties.
\-c <file> Config file to use. Defaults to /etc/cluster/cluster.conf
.br
\-o <file> Output file. Defaults to the same as -c
-.br
-\-C Don't run "ccs_tool update" after changing file. This will
-happen by default if the input file is the same as the output file.
-.br
-\-F Force a "ccs_tool update" even if the input and output files
-are different.
@@ -93,12 +84,6 @@ device.
\-c <file> Config file to use. Defaults to /etc/cluster/cluster.conf
.br
\-o <file> Output file. Defaults to the same as -c
-.br
-\-C Don't run "ccs_tool update" after changing file. This will
-happen by default if the input file is the same as the output file.
-.br
-\-F Force a "ccs_tool update" even if the input and output files
-are different.
.TP
\fBdelfence\fP [options] \fI<node>\fP
@@ -112,12 +97,6 @@ invalid configuration file if you don't add it back in again.
\-c <file> Config file to use. Defaults to /etc/cluster/cluster.conf
.br
\-o <file> Output file. Defaults to the same as -c
-.br
-\-C Don't run "ccs_tool update" after changing file. This will
-happen by default if the input file is the same as the output file.
-.br
-\-F Force a "ccs_tool update" even if the input and output files
-are different.
.TP