cluster: RHEL6 - cman: Update cman_tool version section in man page
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
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
13 years, 3 months
cluster: RHEL6 - cman: Make qdiskd exit if removed from configuration
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: be452ae8cb9eb7764b5f07ba08edeb04cd868134
Parent: 3f74b2c7410fbfc3432391b5603d1082fbceb340
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Aug 3 11:28:00 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed Jan 12 10:51:05 2011 -0500
cman: Make qdiskd exit if removed from configuration
If qdiskd was previously configured and a configuration
update removes the device & label fields, qdiskd will
now set its votes to 0, unregister from CMAN, and exit.
Correct logging about device registration and
configuration errors is also required in order for
users to understand what is going on when this happens
since the current logging from CMAN is a bit unclear.
Resolves: rhbz#620679
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/qdisk/main.c | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 78dc3f0..4bb2b16 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1430,13 +1430,36 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
{
char *val = NULL;
char query[256];
- int old_votes = 0;
+ int old_votes = 0, found = 0;
if (ccsfd < 0)
return -1;
logt_print(LOG_DEBUG, "Loading dynamic configuration\n");
+ /* Check label / device presence. If it disappeared, we need to exit */
+ if (ctx->qc_config) {
+ val = NULL;
+ snprintf(query, sizeof(query), "/cluster/quorumd/@device");
+ found = ccs_get(ccsfd, query, &val);
+ if (found != 0) {
+ val = NULL;
+ snprintf(query, sizeof(query), "/cluster/quorumd/@label");
+ found = ccs_get(ccsfd, query, &val);
+ free(val);
+ }
+
+ if (found != 0) {
+ logt_print(LOG_NOTICE,
+ "Quorum device removed from the configuration."
+ " Shutting down.\n");
+ ctx->qc_votes = 0;
+ register_device(ctx);
+ _running = 0;
+ return -1;
+ }
+ }
+
/* Get status file */
snprintf(query, sizeof(query), "/cluster/quorumd/@status_file");
if (ccs_get(ccsfd, query, &val) == 0) {
@@ -1724,6 +1747,12 @@ get_static_config_data(qd_ctx *ctx, int ccsfd)
ctx->qc_label = val;
}
+ if (!ctx->qc_device && !ctx->qc_label) {
+ logt_print(LOG_ERR, "No device or label specified; cannot "
+ "run QDisk services.\n");
+ return -1;
+ }
+
/* Get min score */
snprintf(query, sizeof(query), "/cluster/quorumd/@min_score");
if (ccs_get(ccsfd, query, &val) == 0) {
@@ -1765,7 +1794,6 @@ get_static_config_data(qd_ctx *ctx, int ccsfd)
free(val);
}
-
return 0;
}
@@ -2049,6 +2077,7 @@ main(int argc, char **argv)
if (quorum_loop(&ctx, ni, MAX_NODES_DISK) == 0) {
/* Only clean up if we're exiting w/o error) */
+ logt_print(LOG_NOTICE, "Unregistering quorum device.\n");
cman_unregister_quorum_device(ctx.qc_cman_admin);
quorum_logout(&ctx);
}
13 years, 3 months
cluster: RHEL6 - cman init: add support for "nocluster" kernel cmdline to not start cman at boot
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 3f74b2c7410fbfc3432391b5603d1082fbceb340
Parent: 9a20e576b54a17841c6bb8a4795a253ecb8a4561
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Thu Jan 6 12:00:04 2011 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Jan 12 16:23:05 2011 +0100
cman init: add support for "nocluster" kernel cmdline to not start cman at boot
the init script will continue to work as expected from any console/tty
Resolves: rhbz#563901
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index a6545aa..ea8293c 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -289,6 +289,16 @@ sshd_enabled()
return 1
}
+cluster_disabled_at_boot()
+{
+ if grep -q nocluster /proc/cmdline && \
+ [ "$(tty)" = "/dev/console" ]; then
+ errmsg="not configured to run at boot"
+ return 1
+ fi
+ return 0
+}
+
network_manager_enabled()
{
if status NetworkManager > /dev/null 2>&1 || \
@@ -679,6 +689,10 @@ start()
echo $echoarg "Starting cluster: "
+ runwrap cluster_disabled_at_boot \
+ none \
+ "Checking if cluster has been disabled at boot"
+
runwrap network_manager_enabled \
none \
"Checking Network Manager"
13 years, 3 months
cluster: RHEL6 - Cman: Handle INT and TERM signals correctly
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
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;
}
13 years, 3 months
cluster: RHEL6 - Cman: test that corosync is not already running
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: b6c1fb8865b2b68cec3296ec182598f8c8c89cc8
Parent: 296cc43ca8edc150bcf0961469d6903c9b9136f6
Author: Jan Friesse <jfriesse(a)redhat.com>
AuthorDate: Mon Sep 27 15:23:49 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Jan 12 16:18:46 2011 +0100
Cman: test that corosync is not already running
Patch fixes init file so now before cman start is tested, if corosync is
running. If so, init script will refuse to start.
Resolves: rhbz#617234
---
cman/init.d/cman.in | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index e8eba61..a6545aa 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -461,11 +461,25 @@ stop_configfs()
fi
}
+corosync_running()
+{
+ [ -f /var/run/corosync.pid ] || return 1
+
+ read corosync_pid foo < /var/run/corosync.pid
+ if [ "$(pidof corosync)" == "$corosync_pid" ];then
+ errmsg="Corosync Cluster Engine is already running"
+ return 0
+ fi
+
+ return 1
+}
+
start_cman()
{
check_exec cman_tool || return $?
cman_running && return 0
cman_checkconfig || return 1
+ corosync_running && return 1
tmpfile=$(mktemp -t cmanstartup.XXXXXXXXXX)
if [ -z "$tmpfile" ]; then
13 years, 3 months
cluster: RHEL6 - Cman: Handle "another instance running" error code
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 296cc43ca8edc150bcf0961469d6903c9b9136f6
Parent: cdb8831463fd622a1bc24af5f9760ae0f456b039
Author: Jan Friesse <jfriesse(a)redhat.com>
AuthorDate: Mon Sep 27 15:22:03 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Jan 12 16:18:40 2011 +0100
Cman: Handle "another instance running" error code
Related: rhbz#617247, rhbz#617234
---
cman/cman_tool/join.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/cman/cman_tool/join.c b/cman/cman_tool/join.c
index ed8b535..0d24d99 100644
--- a/cman/cman_tool/join.c
+++ b/cman/cman_tool/join.c
@@ -85,6 +85,12 @@ static const char *corosync_exit_reason(signed char status)
case 16:
return "Required directory not present /var/lib/corosync.";
break;
+ case 17:
+ return "Could not acquire lock";
+ break;
+ case 18:
+ return "Another Corosync instance is already running";
+ break;
default:
sprintf(reason, "Error, reason code is %d", status);
return reason;
13 years, 3 months
cluster: RHEL6 - Cman: Handle corosync exit codes
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
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;
13 years, 3 months
cluster: RHEL6 - Cman: Add support for udpu and rdma transport
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: a8cc8128e3bb815d2d8c7467929ee14b2edd92a6
Parent: 6a4d7838acced508d1a30f1343b79d616b9b4a99
Author: Jan Friesse <jfriesse(a)redhat.com>
AuthorDate: Thu Oct 7 15:30:54 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Jan 12 16:17:42 2011 +0100
Cman: Add support for udpu and rdma transport
Handle corosync transport option, so it's possible to use udpu (UDP
unicast) and rdma (infiniband) transport.
---
cman/daemon/cman-preconfig.c | 120 ++++++++++++++++++++++++++++++++++++---
config/tools/xml/cluster.rng.in | 12 ++++-
2 files changed, 123 insertions(+), 9 deletions(-)
diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index eb793fc..4f98176 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -29,6 +29,13 @@
#define MAX_PATH_LEN PATH_MAX
+enum tx_mech {
+ TX_MECH_UDP,
+ TX_MECH_UDPB,
+ TX_MECH_UDPU,
+ TX_MECH_RDMA,
+};
+
static unsigned int debug;
static int cmanpre_readconfig(struct objdb_iface_ver0 *objdb, const char **error_string);
static int cmanpre_reloadconfig(struct objdb_iface_ver0 *objdb, int flush, const char **error_string);
@@ -232,8 +239,57 @@ static hdb_handle_t find_cman_logger(struct objdb_iface_ver0 *objdb, hdb_handle_
}
+static int add_udpu_members(struct objdb_iface_ver0 *objdb, hdb_handle_t interface_object_handle)
+{
+ char *cur_nodename;
+ hdb_handle_t altname_handle;
+ hdb_handle_t find_handle = 0;
+ hdb_handle_t find_handle2 = 0;
+ hdb_handle_t member_object_handle;
+ hdb_handle_t nodes_handle;
+ int cur_altname_depth;
+
+ nodes_handle = nodeslist_init(objdb, cluster_parent_handle, &find_handle);
+ while (nodes_handle) {
+ if (num_interfaces == 0) {
+ if (objdb_get_string(objdb, nodes_handle, "name", &cur_nodename)) {
+ nodes_handle = nodeslist_next(objdb, find_handle);
+ continue;
+ }
+ } else {
+ objdb->object_find_create(nodes_handle, "altname", strlen("altname"), &find_handle2);
+
+ cur_altname_depth = 0;
+ while (objdb->object_find_next(find_handle2, &altname_handle) == 0 &&
+ cur_altname_depth < num_interfaces)
+ cur_altname_depth++;
-static int add_ifaddr(struct objdb_iface_ver0 *objdb, char *mcast, char *ifaddr, int port, int broadcast)
+ if (cur_altname_depth == num_interfaces) {
+ if (objdb_get_string(objdb, altname_handle, "name", &cur_nodename)) {
+ nodes_handle = nodeslist_next(objdb, find_handle);
+ continue;
+ }
+ } else {
+ nodes_handle = nodeslist_next(objdb, find_handle);
+ continue;
+ }
+ objdb->object_find_destroy(find_handle2);
+ }
+
+ if (objdb->object_create(interface_object_handle, &member_object_handle,
+ "member", strlen("member")) == 0) {
+ objdb->object_key_create_typed(member_object_handle, "memberaddr",
+ cur_nodename, strlen(cur_nodename)+1, OBJDB_VALUETYPE_STRING);
+ }
+
+ nodes_handle = nodeslist_next(objdb, find_handle);
+ }
+ objdb->object_find_destroy(find_handle);
+
+ return 0;
+}
+
+static int add_ifaddr(struct objdb_iface_ver0 *objdb, char *mcast, char *ifaddr, int port, enum tx_mech transport)
{
hdb_handle_t totem_object_handle;
hdb_handle_t find_handle;
@@ -241,6 +297,12 @@ static int add_ifaddr(struct objdb_iface_ver0 *objdb, char *mcast, char *ifaddr,
struct sockaddr_storage if_addr, localhost, mcast_addr;
char tmp[132];
int ret = 0;
+ const char *tx_mech_to_str[] = {
+ [TX_MECH_UDP] = "udp",
+ [TX_MECH_UDPB] = "udp",
+ [TX_MECH_UDPU] = "udpu",
+ [TX_MECH_RDMA] = "iba",
+ };
/* Check the families match */
if (address_family(mcast, &mcast_addr, 0) !=
@@ -258,9 +320,10 @@ static int add_ifaddr(struct objdb_iface_ver0 *objdb, char *mcast, char *ifaddr,
objdb->object_find_create(OBJECT_PARENT_HANDLE, "totem", strlen("totem"), &find_handle);
if (objdb->object_find_next(find_handle, &totem_object_handle)) {
-
objdb->object_create(OBJECT_PARENT_HANDLE, &totem_object_handle,
"totem", strlen("totem"));
+ objdb->object_key_create_typed(totem_object_handle, "transport",
+ tx_mech_to_str[transport], strlen(tx_mech_to_str[transport]) + 1, OBJDB_VALUETYPE_STRING);
}
objdb->object_find_destroy(find_handle);
@@ -282,12 +345,22 @@ static int add_ifaddr(struct objdb_iface_ver0 *objdb, char *mcast, char *ifaddr,
objdb->object_key_create_typed(interface_object_handle, "bindnetaddr",
tmp, strlen(tmp)+1, OBJDB_VALUETYPE_STRING);
- if (broadcast)
+ switch (transport) {
+ case TX_MECH_UDPB:
objdb->object_key_create_typed(interface_object_handle, "broadcast",
"yes", strlen("yes")+1, OBJDB_VALUETYPE_STRING);
- else
+ break;
+ case TX_MECH_UDP:
+ case TX_MECH_RDMA:
objdb->object_key_create_typed(interface_object_handle, "mcastaddr",
mcast, strlen(mcast)+1, OBJDB_VALUETYPE_STRING);
+ break;
+ case TX_MECH_UDPU:
+ objdb->object_key_create_typed(interface_object_handle, "mcastaddr",
+ mcast, strlen(mcast)+1, OBJDB_VALUETYPE_STRING);
+ add_udpu_members(objdb, interface_object_handle);
+ break;
+ }
sprintf(tmp, "%d", port);
objdb->object_key_create_typed(interface_object_handle, "mcastport",
@@ -532,7 +605,7 @@ static int get_nodename(struct objdb_iface_ver0 *objdb)
hdb_handle_t find_handle;
hdb_handle_t node_object_handle;
hdb_handle_t alt_object;
- int broadcast = 0;
+ enum tx_mech transport = TX_MECH_UDP;
char *str;
int error;
@@ -634,12 +707,43 @@ static int get_nodename(struct objdb_iface_ver0 *objdb)
mcast_name = strdup("255.255.255.255");
if (!mcast_name)
return -1;
- broadcast = 1;
+ transport = TX_MECH_UDPB;
}
free(str);
}
- if (add_ifaddr(objdb, mcast_name, nodename, portnum, broadcast)) {
+ /* Check for transport */
+ if (!objdb_get_string(objdb, object_handle, "transport", &str)) {
+ if (strcmp(str, "udp") == 0) {
+ if (transport != TX_MECH_UDPB) {
+ transport = TX_MECH_UDP;
+ }
+ } else if (strcmp(str, "udpb") == 0) {
+ transport = TX_MECH_UDPB;
+ } else if (strcmp(str, "udpu") == 0) {
+ if (transport != TX_MECH_UDPB) {
+ transport = TX_MECH_UDPU;
+ } else {
+ sprintf(error_reason, "Transport and broadcast option are mutually exclusive");
+ write_cman_pipe("Transport and broadcast option are mutually exclusive");
+ return -1;
+ }
+ } else if (strcmp(str, "rdma") == 0) {
+ if (transport != TX_MECH_UDPB) {
+ transport = TX_MECH_RDMA;
+ } else {
+ sprintf(error_reason, "Transport and broadcast option are mutually exclusive");
+ write_cman_pipe("Transport and broadcast option are mutually exclusive");
+ return -1;
+ }
+ } else {
+ sprintf(error_reason, "Transport option value can be one of udp, udpb, udpu, rdma");
+ write_cman_pipe("Transport option value can be one of udp, udpb, udpu, rdma");
+ return -1;
+ }
+ }
+
+ if (add_ifaddr(objdb, mcast_name, nodename, portnum, transport)) {
write_cman_pipe(error_reason);
return -1;
}
@@ -662,7 +766,7 @@ static int get_nodename(struct objdb_iface_ver0 *objdb)
mcast = mcast_name;
}
- if (add_ifaddr(objdb, mcast, node, portnum, broadcast)) {
+ if (add_ifaddr(objdb, mcast, node, portnum, transport)) {
write_cman_pipe(error_reason);
return -1;
}
diff --git a/config/tools/xml/cluster.rng.in b/config/tools/xml/cluster.rng.in
index ba5087b..55c2513 100644
--- a/config/tools/xml/cluster.rng.in
+++ b/config/tools/xml/cluster.rng.in
@@ -124,7 +124,17 @@ To validate your cluster.conf against this schema, run:
</optional>
<optional>
<attribute name="broadcast" rha:description="enable cman broadcast" rha:default="no"/>
- </optional>
+ </optional>
+ <optional>
+ <attribute name="transport" rha:description="Specifies transport mechanism to use. Available values are udp (multicast default), udpb (broadcast), udpu (unicast) and rdma (Infiniband). corosync.conf(5)" rha:sample="">
+ <choice>
+ <value>udp</value>
+ <value>udpb</value>
+ <value>udpu</value>
+ <value>rdma</value>
+ </choice>
+ </attribute>
+ </optional>
<optional>
<attribute name="keyfile" rha:description=""/>
</optional>
13 years, 3 months
cluster: RHEL6 - ccs_tool: completely remove references to update/upgrades
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
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
13 years, 3 months
cluster: STABLE31 - cman init: add support for "nocluster" kernel cmdline to not start cman at boot
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: deb7f90e820250a7bfad9c94abaf1b49ca62bf7d
Parent: 3dc277e676bcc1fdb6be9d1746132594da64638b
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Thu Jan 6 12:00:04 2011 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Thu Jan 6 12:02:12 2011 +0100
cman init: add support for "nocluster" kernel cmdline to not start cman at boot
the init script will continue to work as expected from any console/tty
Resolves: rhbz#563901
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index a5dfa86..45a607e 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -305,6 +305,16 @@ gfs_controld_enabled()
return 1
}
+cluster_disabled_at_boot()
+{
+ if grep -q nocluster /proc/cmdline && \
+ [ "$(tty)" = "/dev/console" ]; then
+ errmsg="not configured to run at boot"
+ return 1
+ fi
+ return 0
+}
+
network_manager_enabled()
{
if status NetworkManager > /dev/null 2>&1 || \
@@ -713,6 +723,10 @@ start()
echo $echoarg "Starting cluster: "
+ runwrap cluster_disabled_at_boot \
+ none \
+ "Checking if cluster has been disabled at boot"
+
runwrap network_manager_enabled \
none \
"Checking Network Manager"
13 years, 3 months