cluster: RHEL6 - qdisk: Fix man page example (take 2)
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 854cf3464251cdb132b9768cefb849d49ec1d4a9
Parent: 7a97ab473e6c2c82fe5bfd964e545895aea81d8e
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue May 8 06:02:13 2012 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue May 8 15:25:38 2012 +0200
qdisk: Fix man page example (take 2)
Resolves: rhbz#745538
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/man/qdisk.5 | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cman/man/qdisk.5 b/cman/man/qdisk.5
index e0b0ff6..ca974fa 100644
--- a/cman/man/qdisk.5
+++ b/cman/man/qdisk.5
@@ -479,11 +479,11 @@ by the qdiskd timeout.
.br
<quorumd interval="1" tko="10" votes="3" label="testing">
.in 12
-<heuristic program="ping A -c1 -t1" score="1" interval="2" tko="3"/>
+<heuristic program="ping A -c1 -w1" score="1" interval="2" tko="3"/>
.br
-<heuristic program="ping B -c1 -t1" score="1" interval="2" tko="3"/>
+<heuristic program="ping B -c1 -w1" score="1" interval="2" tko="3"/>
.br
-<heuristic program="ping C -c1 -t1" score="1" interval="2" tko="3"/>
+<heuristic program="ping C -c1 -w1" score="1" interval="2" tko="3"/>
.br
.in 8
</quorumd>
12 years
cluster: STABLE32 - cmannotifyd: deliver cluster status at startup and fix daemon init
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 6329b3688fca66f5821dedb3f98268c06d2ef122
Parent: dcdb07c5d999d5f4b567a253268c71a14c5475cb
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue May 8 14:22:25 2012 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue May 8 14:22:25 2012 +0200
cmannotifyd: deliver cluster status at startup and fix daemon init
cmannotifyd is very often (if not always) started _after_ cman is
completely settled. That means cmannotifyd does not receive/dispatch
any notifications on the current cluster status at startup.
change cman connection loop to generate a fake notification that
config and membership have changed (we can't poll if they did)
and use those information internally too, to reinit logging with
new cman connection.
Resolves: rhbz#819787
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/notifyd/main.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/cman/notifyd/main.c b/cman/notifyd/main.c
index 3091d2f..4a9f868 100644
--- a/cman/notifyd/main.c
+++ b/cman/notifyd/main.c
@@ -189,6 +189,10 @@ static void init_logging(int reconf)
ccs_read_logging(ccs_handle, "cmannotifyd", &debug, &mode,
&syslog_facility, &syslog_priority, &logfile_priority, logfile);
ccs_disconnect(ccs_handle);
+ } else {
+ if (debug) {
+ logfile_priority = LOG_DEBUG;
+ }
}
if (!daemonize)
@@ -311,6 +315,8 @@ static void byebye_cman(void)
static void setup_cman(int forever)
{
int init = 0, active = 0;
+ int quorate;
+ const char *str = NULL;
retry_init:
cman_handle = cman_init(NULL);
@@ -346,6 +352,14 @@ retry_active:
exit(EXIT_FAILURE);
}
+ logt_print(LOG_DEBUG, "Dispatching first cluster status\n");
+ init_logging(1);
+ str = "CMAN_REASON_CONFIG_UPDATE";
+ dispatch_notification(str, 0);
+ str = "CMAN_REASON_STATECHANGE";
+ quorate = cman_is_quorate(cman_handle);
+ dispatch_notification(str, &quorate);
+
return;
out:
12 years
cluster: STABLE32 - qdisk: Fix man page example (take 2)
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: dcdb07c5d999d5f4b567a253268c71a14c5475cb
Parent: c97149047acc1ba3ee502887877d1cfefbb94ea2
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue May 8 06:02:13 2012 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue May 8 06:02:13 2012 +0200
qdisk: Fix man page example (take 2)
Resolves: rhbz#745538
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/man/qdisk.5 | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cman/man/qdisk.5 b/cman/man/qdisk.5
index e0b0ff6..ca974fa 100644
--- a/cman/man/qdisk.5
+++ b/cman/man/qdisk.5
@@ -479,11 +479,11 @@ by the qdiskd timeout.
.br
<quorumd interval="1" tko="10" votes="3" label="testing">
.in 12
-<heuristic program="ping A -c1 -t1" score="1" interval="2" tko="3"/>
+<heuristic program="ping A -c1 -w1" score="1" interval="2" tko="3"/>
.br
-<heuristic program="ping B -c1 -t1" score="1" interval="2" tko="3"/>
+<heuristic program="ping B -c1 -w1" score="1" interval="2" tko="3"/>
.br
-<heuristic program="ping C -c1 -t1" score="1" interval="2" tko="3"/>
+<heuristic program="ping C -c1 -w1" score="1" interval="2" tko="3"/>
.br
.in 8
</quorumd>
12 years
cluster: RHEL6 - rgmanager: Fix dependent service handling during recovery
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 7a97ab473e6c2c82fe5bfd964e545895aea81d8e
Parent: 9743f3742d4fab72320c9ce726c15b4c9b0abd80
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Fri May 4 15:59:15 2012 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri May 4 16:10:09 2012 -0400
rgmanager: Fix dependent service handling during recovery
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
Acked-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/default_event_script.sl | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index c54c068..c9cde4b 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -500,8 +500,6 @@ define default_service_event_handler()
}
()=move_or_start(service_name, nodes);
-
- return;
}
%
@@ -556,6 +554,10 @@ define default_service_event_handler()
}
}
+ if (service_state == "recovering") {
+ return;
+ }
+
%
% Try to restart exclusive service which might have been recently
% stopped in order to make room for other exclusive services.
12 years
cluster: STABLE32 - rgmanager: Fix dependent service handling during recovery
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: c97149047acc1ba3ee502887877d1cfefbb94ea2
Parent: 9ee68d33726c9d5b7d5dd5daf16bdef23047cee5
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Fri May 4 15:59:15 2012 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri May 4 15:59:15 2012 -0400
rgmanager: Fix dependent service handling during recovery
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
Acked-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/default_event_script.sl | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index c54c068..c9cde4b 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -500,8 +500,6 @@ define default_service_event_handler()
}
()=move_or_start(service_name, nodes);
-
- return;
}
%
@@ -556,6 +554,10 @@ define default_service_event_handler()
}
}
+ if (service_state == "recovering") {
+ return;
+ }
+
%
% Try to restart exclusive service which might have been recently
% stopped in order to make room for other exclusive services.
12 years
cluster: STABLE32 - rgmanager: Fix return with lock held
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 9ee68d33726c9d5b7d5dd5daf16bdef23047cee5
Parent: 7ec6da281db5c9ad521147c4ed5203d3bb1101dc
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Wed May 2 13:02:41 2012 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Wed May 2 13:02:41 2012 -0400
rgmanager: Fix return with lock held
Fix a return on an error path in rg_state.c where we could
return without unlocking exclusive_mutex.
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/rg_state.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
index 5b7991d..5d16af4 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -2107,6 +2107,8 @@ handle_start_req(char *svcName, int req, int *new_owner)
_svc_stop_finish(svcName, 0, RG_STATE_STOPPED);
}
+ if (need_check)
+ pthread_mutex_unlock(&exclusive_mutex);
return RG_EDEPEND;
}
12 years
cluster: STABLE32 - rgmanager: Clean up lock handling in groups.c
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 7ec6da281db5c9ad521147c4ed5203d3bb1101dc
Parent: 23cbaf1816760187fef869da88cad417a4e5f535
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Wed May 2 12:51:06 2012 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Wed May 2 12:51:06 2012 -0400
rgmanager: Clean up lock handling in groups.c
Fix two error paths where we returned without releasing locks we have
taken.
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/groups.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/rgmanager/src/daemons/groups.c b/rgmanager/src/daemons/groups.c
index ff80caa..4a72cb7 100644
--- a/rgmanager/src/daemons/groups.c
+++ b/rgmanager/src/daemons/groups.c
@@ -399,12 +399,14 @@ check_depend_safe(const char *rg_name)
pthread_rwlock_rdlock(&resource_lock);
res = find_root_by_ref(&_resources, rg_name);
- if (!res)
- return -1;
+ if (!res) {
+ ret = -1;
+ goto out_unlock;
+ }
ret = check_depend(res);
+out_unlock:
pthread_rwlock_unlock(&resource_lock);
-
return ret;
}
@@ -933,7 +935,7 @@ group_migratory(const char *groupname, int lock)
res = find_root_by_ref(&_resources, groupname);
if (!res) {
/* Nonexistent or non-TL RG cannot be migrated */
- return 0;
+ goto out_unlock;
}
for (x = 0; res->r_rule->rr_actions[x].ra_name; x++) {
12 years
cluster: STABLE32 - rgmanager: Fix the function prototypes for act_dup() which were broken by commit 5b7c605ceb1b2d6686f63fe3f10e56d5ce4bd439
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 23cbaf1816760187fef869da88cad417a4e5f535
Parent: 87b2cb784db02fad1c54e76af93ea264ea52d1de
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Wed May 2 12:50:29 2012 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Wed May 2 12:50:29 2012 -0400
rgmanager: Fix the function prototypes for act_dup() which were broken by commit 5b7c605ceb1b2d6686f63fe3f10e56d5ce4bd439
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/include/reslist.h | 2 +-
rgmanager/src/daemons/restree.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rgmanager/include/reslist.h b/rgmanager/include/reslist.h
index 68ea032..e254ecc 100644
--- a/rgmanager/include/reslist.h
+++ b/rgmanager/include/reslist.h
@@ -175,7 +175,7 @@ void print_resource_tree(resource_node_t **tree);
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);
+resource_act_t *act_dup(resource_act_t *acts);
void dump_resource_info(FILE *fp);
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index cfa1893..9b70334 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -27,7 +27,7 @@ static inline int _res_op_internal(resource_node_t **tree, resource_t *first,
resource_node_t *node);
/* XXX from reslist.c */
-void * act_dup(resource_act_t *acts);
+resource_act_t *act_dup(resource_act_t *acts);
time_t get_time(char *action, int depth, resource_node_t *node);
12 years
dlm: master - dlm_controld: poll lockspace recovery while waiting for quorum
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 995ead49d7aeab6c3e65a55119976ae85a4d3767
Parent: 77565cca9f99167e1aa04b7608afd9b8f60f1bee
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 1 15:40:26 2012 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue May 1 15:40:26 2012 -0500
dlm_controld: poll lockspace recovery while waiting for quorum
Was getting stuck when quorum was regained.
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
dlm_controld/cpg.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dlm_controld/cpg.c b/dlm_controld/cpg.c
index 6e508d2..0318b98 100644
--- a/dlm_controld/cpg.c
+++ b/dlm_controld/cpg.c
@@ -598,6 +598,7 @@ static int wait_conditions_done(struct lockspace *ls)
if (opt(enable_quorum_lockspace_ind) && !cluster_quorate) {
log_group(ls, "wait for quorum");
ls->wait_debug = DLMC_LS_WAIT_QUORUM;
+ poll_lockspaces++;
return 0;
}
12 years
dlm: master - libdlm/dlm_tool: remove NODIR flag
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 77565cca9f99167e1aa04b7608afd9b8f60f1bee
Parent: 9832cc8a622c195701ca28127c261aec8832c7e6
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 1 11:16:32 2012 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue May 1 11:16:32 2012 -0500
libdlm/dlm_tool: remove NODIR flag
NODIR is no longer configured with an api flag,
but is configured by dlm_controld through sysfs.
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
dlm_tool/main.c | 14 +-------------
libdlm/libdlm.h | 1 -
libdlm/man/dlm_create_lockspace.3 | 1 -
3 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/dlm_tool/main.c b/dlm_tool/main.c
index 1ffd788..36f8bf8 100644
--- a/dlm_tool/main.c
+++ b/dlm_tool/main.c
@@ -47,7 +47,6 @@ static char *lsname;
static int operation;
static int opt_ind;
static int ls_all_nodes = 0;
-static int opt_dir = 0;
static int opt_excl = 0;
static int opt_fs = 0;
static int dump_mstcpy = 0;
@@ -192,7 +191,6 @@ static void print_usage(void)
printf("\n");
printf("Options:\n");
printf(" -n Show all node information in ls\n");
- printf(" -d 0|1 Resource directory off/on in join, default 0\n");
printf(" -e 0|1 Exclusive create off/on in join, default 0\n");
printf(" -f 0|1 FS (filesystem) flag off/on in join, default 0\n");
printf(" -m <mode> Permission mode for lockspace device (octal), default 0600\n");
@@ -204,7 +202,7 @@ static void print_usage(void)
printf("\n");
}
-#define OPTION_STRING "MhVnd:m:e:f:vws"
+#define OPTION_STRING "MhVnm:e:f:vws"
static void decode_arguments(int argc, char **argv)
{
@@ -217,10 +215,6 @@ static void decode_arguments(int argc, char **argv)
optchar = getopt(argc, argv, OPTION_STRING);
switch (optchar) {
- case 'd':
- opt_dir = atoi(optarg);
- break;
-
case 'e':
opt_excl = atoi(optarg);
break;
@@ -418,9 +412,6 @@ static char *flag_str(uint32_t flags)
strcat(join_flags, "flags ");
- if (flags & DLM_LSFL_NODIR)
- strcat(join_flags, "NODIR ");
-
if (flags & DLM_LSFL_NEWEXCL)
strcat(join_flags, "NEWEXCL ");
@@ -435,9 +426,6 @@ static void do_join(char *name)
dlm_lshandle_t *dh;
uint32_t flags = 0;
- if (!opt_dir)
- flags |= DLM_LSFL_NODIR;
-
if (opt_excl)
flags |= DLM_LSFL_NEWEXCL;
diff --git a/libdlm/libdlm.h b/libdlm/libdlm.h
index 7b6e681..d025ef8 100644
--- a/libdlm/libdlm.h
+++ b/libdlm/libdlm.h
@@ -42,7 +42,6 @@ struct dlm_lksb {
#define DLM_SBF_ALTMODE 0x04
/* dlm_new_lockspace flags */
-#define DLM_LSFL_NODIR 0x00000001
#define DLM_LSFL_TIMEWARN 0x00000002
#define DLM_LSFL_FS 0x00000004
#define DLM_LSFL_NEWEXCL 0x00000008
diff --git a/libdlm/man/dlm_create_lockspace.3 b/libdlm/man/dlm_create_lockspace.3
index 3879e85..93ffc54 100644
--- a/libdlm/man/dlm_create_lockspace.3
+++ b/libdlm/man/dlm_create_lockspace.3
@@ -45,7 +45,6 @@ Performs the same function as
.B dlm_create_lockspace()
above, but passes some creation flags to the call that affect the lockspace being created. Currently supported flags are:
.nf
-DLM_LSFL_NODIR the lockspace should not use a resource directory
DLM_LSFL_TIMEWARN the dlm should emit warnings over netlink when locks
have been waiting too long; required for deadlock
detection
12 years