cluster: RHEL55 - groupd: handle partition merges
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 23d5cbe5dfcf20040814a09aafa33faf9f6f66e9
Parent: 3234bbd17557cf9cb86d648bb2ad3d43f4c003b7
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Dec 8 15:58:02 2009 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Dec 15 15:15:42 2009 -0600
groupd: handle partition merges
bz 546082
The cman disallowed features means cman does not report
nodes that rejoin and then subsequently leave of fail.
But, the cpg api's do show these disallowed nodes rejoin
and then fail again.
The groupd recovery tries to match up the cpg and cman
node failures, which doesn't work when cman won't report
a disallowed node joining/failing. To fix, just skip
waiting for the cman nodedown event if the node isn't a
member.
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
group/daemon/app.c | 6 ++++++
group/daemon/cman.c | 2 +-
group/daemon/gd_internal.h | 1 +
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/group/daemon/app.c b/group/daemon/app.c
index 03952df..55ba6fd 100644
--- a/group/daemon/app.c
+++ b/group/daemon/app.c
@@ -307,6 +307,12 @@ struct recovery_set *add_recovery_set_cpg(int nodeid, int procdown)
}
}
+ if (!rs->cman_update && !is_cman_member(nodeid)) {
+ log_debug("add_recovery_set_cpg nodeid %d set cman_update",
+ nodeid);
+ rs->cman_update = 1;
+ }
+
return rs;
}
diff --git a/group/daemon/cman.c b/group/daemon/cman.c
index d70bf15..68b4a43 100644
--- a/group/daemon/cman.c
+++ b/group/daemon/cman.c
@@ -60,7 +60,7 @@ static int is_old_member(int nodeid)
return is_member(old_nodes, old_node_count, nodeid);
}
-static int is_cman_member(int nodeid)
+int is_cman_member(int nodeid)
{
return is_member(cman_nodes, cman_node_count, nodeid);
}
diff --git a/group/daemon/gd_internal.h b/group/daemon/gd_internal.h
index d5a0b03..c95d057 100644
--- a/group/daemon/gd_internal.h
+++ b/group/daemon/gd_internal.h
@@ -278,6 +278,7 @@ int client_add(int fd, void (*workfn)(int ci), void (*deadfn)(int ci));
void client_dead(int ci);
/* cman.c */
+int is_cman_member(int nodeid);
int setup_cman(void);
int kill_cman(int nodeid);
int shutdown_cman(void);
14 years, 5 months
cluster: RHEL55 - fenced: fence_tool dumpconfig and readconfig
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 3234bbd17557cf9cb86d648bb2ad3d43f4c003b7
Parent: b5be828615a2ed7bd95a3796d96f5cc536e2adc7
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Dec 15 15:09:21 2009 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Dec 15 15:13:25 2009 -0600
fenced: fence_tool dumpconfig and readconfig
bz 514662
fence_tool dumpconfig to dump the existing fenced config settings.
fence_tool readconfig to tell fenced to reread config settings
from cluster.conf.
Original patch from edamato(a)redhat.com
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
fence/fence_tool/fence_tool.c | 63 ++++++++++++++++++++++++++++++++++++-
fence/fenced/main.c | 69 +++++++++++++++++++++++++++++++++++++++++
fence/man/fence_tool.8 | 5 ++-
3 files changed, 134 insertions(+), 3 deletions(-)
diff --git a/fence/fence_tool/fence_tool.c b/fence/fence_tool/fence_tool.c
index 0b7ea62..4edc4d7 100644
--- a/fence/fence_tool/fence_tool.c
+++ b/fence/fence_tool/fence_tool.c
@@ -47,6 +47,8 @@
#define OP_LEAVE 2
#define OP_WAIT 3
#define OP_DUMP 4
+#define OP_READCONFIG 5
+#define OP_DUMPCONFIG 6
/* needs to match the same in cluster/group/daemon/gd_internal.h and
cluster/group/gfs_controld/lock_dlm.h and cluster/fence/fenced/fd.h */
@@ -432,11 +434,62 @@ static int do_dump(void)
return 0;
}
+static int do_readconfig(void)
+{
+ char buf[MAXLINE];
+ int fd, rv;
+
+ fd = fenced_connect();
+
+ memset(buf, 0, sizeof(buf));
+
+ sprintf(buf, "readconfig");
+
+ rv = do_write(fd, buf, sizeof(buf));
+ if (rv < 0)
+ die("can't communicate with fenced");
+
+ memset(buf, 0, sizeof(buf));
+ rv = do_read(fd, buf, sizeof(buf));
+ if (rv < 0)
+ printf("readconfig: %s\n", strerror(errno));
+
+ close(fd);
+ return 0;
+}
+
+static int do_dumpconfig(void)
+{
+ char inbuf[DUMP_SIZE];
+ char outbuf[MAXLINE];
+ int fd, rv;
+
+ fd = fenced_connect();
+
+ memset(inbuf, 0, sizeof(inbuf));
+ memset(outbuf, 0, sizeof(outbuf));
+
+ sprintf(outbuf, "dumpconfig");
+
+ rv = do_write(fd, outbuf, sizeof(outbuf));
+ if (rv < 0)
+ die("can't communicate with fenced");
+
+ rv = do_read(fd, inbuf, sizeof(inbuf));
+ if (rv < 0)
+ printf("dumpconfig: %s\n", strerror(errno));
+
+ do_write(STDOUT_FILENO, inbuf, strlen(inbuf));
+
+ close(fd);
+ return 0;
+}
+
static void print_usage(void)
{
printf("Usage:\n");
printf("\n");
- printf("%s <join|leave|dump> [options]\n", prog_name);
+ printf("%s <join|leave|dump|dumpconfig|readconfig> [options]\n", prog_name);
printf("\n");
printf("Actions:\n");
printf(" join Join the default fence domain\n");
@@ -515,6 +568,10 @@ static void decode_arguments(int argc, char *argv[])
operation = OP_LEAVE;
} else if (strcmp(argv[optind], "dump") == 0) {
operation = OP_DUMP;
+ } else if (strcmp(argv[optind], "dumpconfig") == 0) {
+ operation = OP_DUMPCONFIG;
+ } else if (strcmp(argv[optind], "readconfig") == 0) {
+ operation = OP_READCONFIG;
} else
die("unknown option %s\n", argv[optind]);
optind++;
@@ -537,6 +594,10 @@ int main(int argc, char *argv[])
return do_leave();
case OP_DUMP:
return do_dump();
+ case OP_READCONFIG:
+ return do_readconfig();
+ case OP_DUMPCONFIG:
+ return do_dumpconfig();
case OP_WAIT:
return -1;
}
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index f2b5d07..3d553b2 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -379,6 +379,71 @@ static int do_dump(int fd)
return 0;
}
+static int do_readconfig(void)
+{
+ char path[256], *str = NULL;
+ int error, cd, i = 0;
+
+ while ((cd = ccs_connect()) < 0) {
+ sleep(1);
+ if (++i > 9) {
+ log_error("ccs_connect error %d, "
+ "check ccsd or cluster status", cd);
+ return -1;
+ }
+ }
+
+ if (comline.post_join_delay_opt == FALSE) {
+ str = NULL;
+ memset(path, 0, 256);
+ sprintf(path, "/cluster/fence_daemon/@post_join_delay");
+
+ error = ccs_get(cd, path, &str);
+ if (!error)
+ comline.post_join_delay = atoi(str);
+ else
+ comline.post_join_delay = DEFAULT_POST_JOIN_DELAY;
+ if (str)
+ free(str);
+ }
+
+ if (comline.post_fail_delay_opt == FALSE) {
+ str = NULL;
+ memset(path, 0, 256);
+ sprintf(path, "/cluster/fence_daemon/@post_fail_delay");
+
+ error = ccs_get(cd, path, &str);
+ if (!error)
+ comline.post_fail_delay = atoi(str);
+ else
+ comline.post_fail_delay = DEFAULT_POST_FAIL_DELAY;
+ if (str)
+ free(str);
+ }
+
+ ccs_disconnect(cd);
+ return 0;
+}
+
+static int do_dumpconfig(int fd)
+{
+ char buf[DUMP_SIZE];
+
+ memset(buf, 0, sizeof(buf));
+ sprintf(buf, "post_fail_delay = %d\n"
+ "post_join_delay = %d\n"
+ "clean_start = %d\n"
+ "skip_undefined = %d\n"
+ "override_path = %s\n",
+ comline.post_fail_delay, comline.post_join_delay,
+ comline.clean_start, comline.skip_undefined,
+ comline.override_path);
+
+ do_write(fd, buf, sizeof(buf));
+
+ return 0;
+}
+
static int client_process(int ci)
{
char buf[MAXLINE], *argv[MAXARGS], *cmd, *name, out[MAXLINE];
@@ -408,6 +473,10 @@ static int client_process(int ci)
rv = do_join(name);
else if (!strcmp(cmd, "leave"))
rv = do_leave(name);
+ else if (!strcmp(cmd, "readconfig"))
+ rv = do_readconfig();
+ else if (!strcmp(cmd, "dumpconfig"))
+ rv = do_dumpconfig(client[ci].fd);
else if (!strcmp(cmd, "dump")) {
do_dump(client[ci].fd);
close(client[ci].fd);
diff --git a/fence/man/fence_tool.8 b/fence/man/fence_tool.8
index 7477f6f..66c378d 100644
--- a/fence/man/fence_tool.8
+++ b/fence/man/fence_tool.8
@@ -13,12 +13,13 @@ fence_tool - A program to join and leave the fence domain
.SH SYNOPSIS
.B
fence_tool
-<\fBjoin | leave | dump\fP>
+<\fBjoin | leave | dump | dumpconfig | readconfig\fP>
[\fIOPTION\fR]...
.SH DESCRIPTION
\fBfence_tool\fP is a program used to join or leave the default fence
-domain. It communicates with the fenced daemon. Before telling fenced
+domain, but also to dump and reread the configuration from CCS.
+It communicates with the fenced daemon. Before telling fenced
to join the domain, fence_tool waits for the cluster to have quorum,
making it easier to cancel the command if the cluster is inquorate.
14 years, 5 months
gfs2-utils: master - gfs2: fix build failure
by Abhijith Das
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: 78c2c90520d9f20ac0c8879dc62e13816aad78d3
Parent: 9340634945ed05fb70d91b4832681238da3404c8
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Dec 15 10:13:56 2009 +0100
Committer: Abhijith Das <adas(a)redhat.com>
CommitterDate: Tue Dec 15 13:09:26 2009 -0600
gfs2: fix build failure
ded81a77973a752c3c4af5a6cca306df4cfb7cc7 doesn't build
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
gfs2/quota/gfs2_quota.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gfs2/quota/gfs2_quota.h b/gfs2/quota/gfs2_quota.h
index 119b083..80c0d3f 100644
--- a/gfs2/quota/gfs2_quota.h
+++ b/gfs2/quota/gfs2_quota.h
@@ -4,6 +4,8 @@
#include "libgfs2.h"
#include <linux/gfs2_ondisk.h>
+#define DIV_RU(x, y) (((x) + (y) - 1) / (y))
+
#define type_zalloc(ptr, type, count) \
do { \
(ptr) = (type *)malloc(sizeof(type) * (count)); \
14 years, 5 months
resource-agents: master - Fix bind mount handling in fs.sh
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git...
Commit: 26e9e538b22554d21ae43c4b379b664daf6f05d3
Parent: 848e522a760d661e674705ebd7a2a1bc4f7e08c9
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Dec 15 11:28:51 2009 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Dec 15 11:35:39 2009 -0500
Fix bind mount handling in fs.sh
Don't log warnings for every bind mount found for a
mount point. Instead, log one warning if and only
if the file system is not mounted in the correct
location.
Resolves: bz526286
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/fs.sh.in | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/rgmanager/src/resources/fs.sh.in b/rgmanager/src/resources/fs.sh.in
index 640e7f3..a6238fd 100644
--- a/rgmanager/src/resources/fs.sh.in
+++ b/rgmanager/src/resources/fs.sh.in
@@ -550,6 +550,8 @@ isMounted () {
typeset mp tmp_mp
typeset dev tmp_dev
typeset ret=$FAIL
+ typeset found=1
+ typeset poss_mp
if [ $# -ne 2 ]; then
ocf_log err "Usage: isMounted device mount_point"
@@ -587,14 +589,21 @@ isMounted () {
# Check to see if its mounted in the right
# place
#
- if [ -n "$tmp_mp" -a "$tmp_mp" != "$mp" ]; then
- ocf_log warn \
-"Device $dev is mounted on $tmp_mp instead of $mp"
+ if [ -n "$tmp_mp" ]; then
+ if [ "$tmp_mp" != "$mp" ]; then
+ poss_mp=$tmp_mp
+ else
+ found=0
+ fi
fi
ret=$YES
fi
done < /proc/mounts
+ if [ $found -ne 0 ]; then
+ ocf_log warn "Device $dev is mounted on $poss_mp instead of $mp"
+ fi
+
return $ret
}
14 years, 5 months
cluster: STABLE3 - rgmanager: Fix bind mount handling in fs.sh
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 32bed24ef00dc5df5474d0287ffbb3e4eceb1226
Parent: 2bd0c588c585f335138d8d5c9eac475135a09d88
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Dec 15 11:28:51 2009 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Dec 15 11:34:20 2009 -0500
rgmanager: Fix bind mount handling in fs.sh
Don't log warnings for every bind mount found for a
mount point. Instead, log one warning if and only
if the file system is not mounted in the correct
location.
Resolves: bz526286
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/fs.sh.in | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/rgmanager/src/resources/fs.sh.in b/rgmanager/src/resources/fs.sh.in
index 640e7f3..a6238fd 100644
--- a/rgmanager/src/resources/fs.sh.in
+++ b/rgmanager/src/resources/fs.sh.in
@@ -550,6 +550,8 @@ isMounted () {
typeset mp tmp_mp
typeset dev tmp_dev
typeset ret=$FAIL
+ typeset found=1
+ typeset poss_mp
if [ $# -ne 2 ]; then
ocf_log err "Usage: isMounted device mount_point"
@@ -587,14 +589,21 @@ isMounted () {
# Check to see if its mounted in the right
# place
#
- if [ -n "$tmp_mp" -a "$tmp_mp" != "$mp" ]; then
- ocf_log warn \
-"Device $dev is mounted on $tmp_mp instead of $mp"
+ if [ -n "$tmp_mp" ]; then
+ if [ "$tmp_mp" != "$mp" ]; then
+ poss_mp=$tmp_mp
+ else
+ found=0
+ fi
fi
ret=$YES
fi
done < /proc/mounts
+ if [ $found -ne 0 ]; then
+ ocf_log warn "Device $dev is mounted on $poss_mp instead of $mp"
+ fi
+
return $ret
}
14 years, 5 months
cluster: RHEL55 - rgmanager: Fix bind mount handling in fs.sh
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: b5be828615a2ed7bd95a3796d96f5cc536e2adc7
Parent: d6d754c65ab82be2cf4817a40b7783f37127ec6b
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Dec 15 11:28:51 2009 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Dec 15 11:32:15 2009 -0500
rgmanager: Fix bind mount handling in fs.sh
Don't log warnings for every bind mount found for a
mount point. Instead, log one warning if and only
if the file system is not mounted in the correct
location.
Resolves: bz526286
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/fs.sh | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh
index ac41cf3..477391c 100755
--- a/rgmanager/src/resources/fs.sh
+++ b/rgmanager/src/resources/fs.sh
@@ -570,6 +570,8 @@ isMounted () {
typeset mp tmp_mp
typeset dev tmp_dev
typeset ret=$FAIL
+ typeset found=1
+ typeset poss_mp
if [ $# -ne 2 ]; then
ocf_log err "Usage: isMounted device mount_point"
@@ -607,14 +609,21 @@ isMounted () {
# Check to see if its mounted in the right
# place
#
- if [ -n "$tmp_mp" -a "$tmp_mp" != "$mp" ]; then
- ocf_log warn \
-"Device $dev is mounted on $tmp_mp instead of $mp"
+ if [ -n "$tmp_mp" ]; then
+ if [ "$tmp_mp" != "$mp" ]; then
+ poss_mp=$tmp_mp
+ else
+ found=0
+ fi
fi
ret=$YES
fi
done < /proc/mounts
+ if [ $found -ne 0 ]; then
+ ocf_log warn "Device $dev is mounted on $poss_mp instead of $mp"
+ fi
+
return $ret
}
14 years, 5 months
cluster: RHEL55 - rgmanager: Fix tree delta output
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: d6d754c65ab82be2cf4817a40b7783f37127ec6b
Parent: 1acb04cb45030aa371c2f2204abbd96c0d7247e0
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Dec 15 09:55:07 2009 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Dec 15 09:55:07 2009 -0500
rgmanager: Fix tree delta output
Resolves: bz512052
Part 2
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/daemons/test.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/rgmanager/src/daemons/test.c b/rgmanager/src/daemons/test.c
index 19e006e..b0df8a1 100644
--- a/rgmanager/src/daemons/test.c
+++ b/rgmanager/src/daemons/test.c
@@ -314,13 +314,10 @@ tree_delta_test(int argc, char **argv)
resource_delta(&reslist, &reslist2);
printf("=== Old Resource List ===\n");
- list_do(&reslist, curres) {
- print_resource(curres);
- } while (!list_done(&reslist, curres));
+ print_resources(&reslist);
+
printf("=== New Resource List ===\n");
- list_do(&reslist2, curres) {
- print_resource(curres);
- } while (!list_done(&reslist2, curres));
+ print_resources(&reslist2);
curres = find_root_by_ref(&reslist, "oracle");
14 years, 5 months
cluster: STABLE3 - rgmanager: Fix build warnings
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 2bd0c588c585f335138d8d5c9eac475135a09d88
Parent: 4de65ae875a1548817cb544d569db7800a3a044f
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Dec 15 09:43:00 2009 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Dec 15 09:43:00 2009 -0500
rgmanager: Fix build warnings
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/include/event.h | 1 +
rgmanager/include/reslist.h | 3 +++
rgmanager/src/daemons/main.c | 31 ++++++++++++++++++++-----------
rgmanager/src/daemons/slang_event.c | 2 +-
rgmanager/src/daemons/test.c | 9 +++------
rgmanager/src/utils/clustat.c | 2 +-
6 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/rgmanager/include/event.h b/rgmanager/include/event.h
index b0b1bee..a9a8235 100644
--- a/rgmanager/include/event.h
+++ b/rgmanager/include/event.h
@@ -124,6 +124,7 @@ void set_transition_throttling(int nsecs);
int service_op_start(char *svcName, int *target_list, int target_list_len,
int *new_owner);
int service_op_stop(char *svcName, int do_disable, int event_type);
+int service_op_migrate(char *svcName, int target_node);
/* Non-central event processing */
diff --git a/rgmanager/include/reslist.h b/rgmanager/include/reslist.h
index 119fbfc..382dfae 100644
--- a/rgmanager/include/reslist.h
+++ b/rgmanager/include/reslist.h
@@ -146,6 +146,7 @@ int resource_tree_delta(resource_node_t **, resource_node_t **);
Load/kill resource rule sets
*/
int load_resource_rules(const char *rpath, resource_rule_t **rules);
+void print_resource_rule(FILE *fp, resource_rule_t *rule);
void print_resource_rules(resource_rule_t **rules);
void dump_resource_rules(FILE *fp, resource_rule_t **rules);
void destroy_resource_rules(resource_rule_t **rules);
@@ -154,6 +155,7 @@ void destroy_resource_rules(resource_rule_t **rules);
Load/kill resource sets
*/
int load_resources(int ccsfd, resource_t **reslist, resource_rule_t **rulelist);
+void print_resource(FILE *fp, resource_t *res);
void print_resources(resource_t **reslist);
void dump_resources(FILE *fp, resource_t **reslist);
void destroy_resources(resource_t **list);
@@ -168,6 +170,7 @@ void dump_resource_tree(FILE *fp, resource_node_t **tree);
void destroy_resource_tree(resource_node_t **tree);
void *act_dup(resource_act_t *acts);
+void dump_resource_info(FILE *fp);
/*
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 5b2ad7b..04d9961 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -946,6 +946,8 @@ main(int argc, char **argv)
}
init_logging(NULL, foreground, (debug? LOG_DEBUG : SYSLOGLEVEL));
+
+ rv = -1;
if (cman_connect(&clu) != 0)
goto out; /* Clean exit if sigint/sigterm here */
@@ -956,6 +958,7 @@ main(int argc, char **argv)
if (clu_lock_init(rgmanager_lsname) != 0) {
printf("Locks not working!\n");
+ cman_finish(clu);
return -1;
}
@@ -965,14 +968,16 @@ main(int argc, char **argv)
if (me.cn_nodeid == 0) {
printf("Unable to determine local node ID\n");
perror("cman_get_node");
- return -1;
+ goto out_ls;
}
set_my_id(me.cn_nodeid);
logt_print(LOG_INFO, "I am node #%d\n", my_id());
- if (wait_for_fencing() != 0)
- goto out;
+ if (wait_for_fencing() != 0) {
+ rv = 0;
+ goto out_ls;
+ }
/*
We know we're quorate. At this point, we need to
@@ -983,24 +988,26 @@ main(int argc, char **argv)
if (init_resource_groups(0, do_init) != 0) {
logt_print(LOG_CRIT, "#8: Couldn't initialize services\n");
- return -1;
+ goto out_ls;
}
- if (shutdown_pending)
- goto out;
+ if (shutdown_pending) {
+ rv = 0;
+ goto out_ls;
+ }
if (msg_listen(MSG_SOCKET, RGMGR_SOCK, me.cn_nodeid, &local_ctx) < 0) {
logt_print(LOG_CRIT,
"#10: Couldn't set up cluster message system: %s\n",
strerror(errno));
- return -1;
+ goto out_ls;
}
if (msg_listen(MSG_CLUSTER, &port, me.cn_nodeid, &cluster_ctx) < 0) {
logt_print(LOG_CRIT,
"#10b: Couldn't set up cluster message system: %s\n",
strerror(errno));
- return -1;
+ goto out_ls;
}
rg_set_quorate();
@@ -1016,14 +1023,14 @@ main(int argc, char **argv)
#ifdef OPENAIS
if (ds_init() < 0) {
logt_print(LOG_CRIT, "#11b: Couldn't initialize SAI AIS CKPT\n");
- return -1;
+ goto out_ls;
}
ds_key_init("rg_lockdown", 32, 10);
#else
if (vf_init(me.cn_nodeid, port, NULL, NULL) != 0) {
logt_print(LOG_CRIT, "#11: Couldn't set up VF listen socket\n");
- return -1;
+ goto out_ls;
}
vf_key_init("rg_lockdown", 10, NULL, lock_commit_cb);
@@ -1048,6 +1055,8 @@ main(int argc, char **argv)
if (rg_initialized())
cleanup(cluster_ctx);
+ rv = 0;
+out_ls:
clu_lock_finished(rgmanager_lsname);
out:
@@ -1058,5 +1067,5 @@ out:
/*malloc_stats();*/
daemon_cleanup();
- exit(0);
+ exit(rv);
}
diff --git a/rgmanager/src/daemons/slang_event.c b/rgmanager/src/daemons/slang_event.c
index 29ae9f2..76663e9 100644
--- a/rgmanager/src/daemons/slang_event.c
+++ b/rgmanager/src/daemons/slang_event.c
@@ -585,7 +585,7 @@ sl_migrate_service(void)
{
char *svcname = NULL;
int target_node = 0;
- int nargs, t, newowner = 0, ret = -1;
+ int nargs, t, ret = -1;
nargs = SLang_Num_Function_Args;
diff --git a/rgmanager/src/daemons/test.c b/rgmanager/src/daemons/test.c
index ad1384d..1c7cae9 100644
--- a/rgmanager/src/daemons/test.c
+++ b/rgmanager/src/daemons/test.c
@@ -304,13 +304,10 @@ tree_delta_test(int argc, char **argv)
resource_delta(&reslist, &reslist2);
printf("=== Old Resource List ===\n");
- list_do(&reslist, curres) {
- print_resource(curres);
- } while (!list_done(&reslist, curres));
+ print_resources(&reslist);
+
printf("=== New Resource List ===\n");
- list_do(&reslist2, curres) {
- print_resource(curres);
- } while (!list_done(&reslist2, curres));
+ print_resources(&reslist2);
resource_tree_delta(&tree, &tree2);
printf("=== Old Resource Tree ===\n");
diff --git a/rgmanager/src/utils/clustat.c b/rgmanager/src/utils/clustat.c
index 164d5b0..f56d3f5 100644
--- a/rgmanager/src/utils/clustat.c
+++ b/rgmanager/src/utils/clustat.c
@@ -788,7 +788,7 @@ xml_member_state(cman_node_t *node)
static void
-print_member_header(nodesize)
+print_member_header(int nodesize)
{
printf(" %-*.*s", nodesize, nodesize, "Member Name");
printf("%-4.4s %s\n", "ID", "Status");
14 years, 5 months
cluster: STABLE3 - config: Fix build warning in rng2ldif
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 4de65ae875a1548817cb544d569db7800a3a044f
Parent: 0076982bb713264accb05b1cb2c40bf417718c46
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Dec 15 09:14:21 2009 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Dec 15 09:14:21 2009 -0500
config: Fix build warning in rng2ldif
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
config/tools/ldap/rng2ldif/tree.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/config/tools/ldap/rng2ldif/tree.c b/config/tools/ldap/rng2ldif/tree.c
index 69fa139..4c6c28f 100644
--- a/config/tools/ldap/rng2ldif/tree.c
+++ b/config/tools/ldap/rng2ldif/tree.c
@@ -161,7 +161,7 @@ find_ref(xmlNodePtr curr_node)
if (strcasecmp((char *)n->name, "define"))
continue;
- tmp_name = (char *)xmlGetProp(n, "name");
+ tmp_name = (char *)xmlGetProp(n, (xmlChar *)"name");
if (!tmp_name)
continue;
if (strcmp(tmp_name, name))
14 years, 5 months
cluster: STABLE3 - gfs2: fix build failure
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 0076982bb713264accb05b1cb2c40bf417718c46
Parent: 42a7a307821a94e1115ed408147517db905d55dd
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Dec 15 10:13:56 2009 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Dec 15 10:13:56 2009 +0100
gfs2: fix build failure
ded81a77973a752c3c4af5a6cca306df4cfb7cc7 doesn't build
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
gfs2/quota/gfs2_quota.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gfs2/quota/gfs2_quota.h b/gfs2/quota/gfs2_quota.h
index 119b083..80c0d3f 100644
--- a/gfs2/quota/gfs2_quota.h
+++ b/gfs2/quota/gfs2_quota.h
@@ -4,6 +4,8 @@
#include "libgfs2.h"
#include <linux/gfs2_ondisk.h>
+#define DIV_RU(x, y) (((x) + (y) - 1) / (y))
+
#define type_zalloc(ptr, type, count) \
do { \
(ptr) = (type *)malloc(sizeof(type) * (count)); \
14 years, 5 months