cluster: STABLE3 - rgmanager: Add debug information to dumps
Lon Hohberger
lon at fedoraproject.org
Mon Dec 14 19:23:04 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=24e8a5d33b40ae6aa57949366497eda119ac81cc
Commit: 24e8a5d33b40ae6aa57949366497eda119ac81cc
Parent: d7330ff7d2e4a68ad0e1e92259d5cb00639938b6
Author: Lon Hohberger <lhh at redhat.com>
AuthorDate: Tue Dec 1 10:35:05 2009 -0500
Committer: Lon Hohberger <lhh at redhat.com>
CommitterDate: Mon Dec 14 14:22:00 2009 -0500
rgmanager: Add debug information to dumps
Resolves: bz512052
Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
rgmanager/include/event.h | 1 +
rgmanager/include/reslist.h | 19 +++++-
rgmanager/src/daemons/event_config.c | 31 ++++++----
rgmanager/src/daemons/fo_domain.c | 41 +++++++++----
rgmanager/src/daemons/groups.c | 24 +++++++
rgmanager/src/daemons/main.c | 3 +
rgmanager/src/daemons/reslist.c | 69 +++++++++++++--------
rgmanager/src/daemons/resrules.c | 97 ++++++++++++++++++------------
rgmanager/src/daemons/restree.c | 57 +++++++++++-------
rgmanager/src/daemons/test.c | 9 +--
rgmanager/src/daemons/tests/test012.conf | 2 +-
11 files changed, 235 insertions(+), 118 deletions(-)
diff --git a/rgmanager/include/event.h b/rgmanager/include/event.h
index 84d384b..b0b1bee 100644
--- a/rgmanager/include/event.h
+++ b/rgmanager/include/event.h
@@ -93,6 +93,7 @@ typedef struct _event_table {
int construct_events(int ccsfd, event_table_t **);
void deconstruct_events(event_table_t **);
void print_events(event_table_t *);
+void dump_events(FILE *fp, event_table_t *);
/* Does the event match a configured event? */
int event_match(event_t *pattern, event_t *actual);
diff --git a/rgmanager/include/reslist.h b/rgmanager/include/reslist.h
index 88e148b..40b8297 100644
--- a/rgmanager/include/reslist.h
+++ b/rgmanager/include/reslist.h
@@ -146,14 +146,16 @@ 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(resource_rule_t *rr);
+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);
/*
Load/kill resource sets
*/
int load_resources(int ccsfd, resource_t **reslist, resource_rule_t **rulelist);
-void print_resource(resource_t *res);
+void print_resources(resource_t **reslist);
+void dump_resources(FILE *fp, resource_t **reslist);
void destroy_resources(resource_t **list);
/*
@@ -162,9 +164,22 @@ void destroy_resources(resource_t **list);
int build_resource_tree(int ccsfd, resource_node_t **tree,
resource_rule_t **rulelist, resource_t **reslist);
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);
+/*
+ Construct/deconstruct failover domains
+ */
+int construct_domains(int ccsfd, fod_t **domains);
+void deconstruct_domains(fod_t **domains);
+void print_domains(fod_t **domains);
+void dump_domains(FILE *fp, fod_t **domains);
+int node_should_start(int nodeid, cluster_member_list_t *membership,
+ char *rg_name, fod_t **domains);
+int node_domain_set(fod_t **domains, char *name, int **ret, int *retlen, int *flags);
+int node_domain_set_safe(char *domainname, int **ret, int *retlen, int *flags);
+
/*
Handy functions
diff --git a/rgmanager/src/daemons/event_config.c b/rgmanager/src/daemons/event_config.c
index 3523a6d..f99a980 100644
--- a/rgmanager/src/daemons/event_config.c
+++ b/rgmanager/src/daemons/event_config.c
@@ -22,7 +22,7 @@
"/cluster/clusternodes/clusternode[@name=\"%s\"]/@nodeid"
void deconstruct_events(event_table_t **);
-void print_event(event_t *ev);
+void print_event(FILE *fp, event_t *ev);
//#define DEBUG
@@ -433,37 +433,37 @@ construct_events(int ccsfd, event_table_t **events)
void
-print_event(event_t *ev)
+print_event(FILE *fp, event_t *ev)
{
- printf(" Name: %s\n", ev->ev_name);
+ fprintf(fp, " Name: %s\n", ev->ev_name);
switch(ev->ev_type) {
case EVENT_NODE:
- printf(" Node %d State %d\n", ev->ev.node.ne_nodeid,
+ fprintf(fp, " Node %d State %d\n", ev->ev.node.ne_nodeid,
ev->ev.node.ne_state);
break;
case EVENT_RG:
- printf(" RG %s State %s\n", ev->ev.group.rg_name,
+ fprintf(fp, " RG %s State %s\n", ev->ev.group.rg_name,
rg_state_str(ev->ev.group.rg_state));
break;
case EVENT_CONFIG:
- printf(" Config change - unsupported\n");
+ fprintf(fp, " Config change - unsupported\n");
break;
default:
- printf(" (Any event)\n");
+ fprintf(fp, " (Any event)\n");
break;
}
if (ev->ev_script) {
- printf(" Inline script.\n");
+ fprintf(fp, " Inline script.\n");
} else {
- printf(" File: %s\n", ev->ev_script_file);
+ fprintf(fp, " File: %s\n", ev->ev_script_file);
}
}
void
-print_events(event_table_t *events)
+dump_events(FILE *fp, event_table_t *events)
{
int x, y;
event_t *ev;
@@ -471,15 +471,22 @@ print_events(event_table_t *events)
for (x = 0; x <= events->max_prio; x++) {
if (!events->entries[x])
continue;
- printf("Event Priority Level %d:\n", x);
+ fprintf(fp, "Event Priority Level %d:\n", x);
list_for(&(events->entries[x]), ev, y) {
- print_event(ev);
+ print_event(fp, ev);
}
}
}
void
+print_events(event_table_t *events)
+{
+ dump_events(stdout, events);
+}
+
+
+void
deconstruct_events(event_table_t **eventsp)
{
int x;
diff --git a/rgmanager/src/daemons/fo_domain.c b/rgmanager/src/daemons/fo_domain.c
index 08590d2..0448e0d 100644
--- a/rgmanager/src/daemons/fo_domain.c
+++ b/rgmanager/src/daemons/fo_domain.c
@@ -227,7 +227,7 @@ deconstruct_domains(fod_t **domains)
void
-print_domains(fod_t **domains)
+dump_domains(FILE *fp, fod_t **domains)
{
fod_t *fod;
fod_node_t *fodn = NULL;
@@ -238,30 +238,47 @@ print_domains(fod_t **domains)
*/
list_do(domains, fod) {
- printf("Failover domain: %s\n", fod->fd_name);
- printf("Flags: ");
+ fprintf(fp, "Failover domain: %s\n", fod->fd_name);
+ fprintf(fp, "Flags: ");
if (!fod->fd_flags) {
- printf("none\n");
+ fprintf(fp, "none\n");
} else {
if (fod->fd_flags & FOD_ORDERED)
- printf("Ordered ");
+ fprintf(fp, "Ordered ");
if (fod->fd_flags & FOD_RESTRICTED)
- printf("Restricted ");
+ fprintf(fp, "Restricted ");
if (fod->fd_flags & FOD_NOFAILBACK)
- printf("No Failback");
- printf("\n");
+ fprintf(fp, "No Failback");
+ fprintf(fp, "\n");
}
- list_do(&fod->fd_nodes, fodn) {
- printf(" Node %s (id %d, priority %d)\n",
+ list_do(&fod->fd_nodes, fodn) {
+ fprintf(fp, " Node %s (id %d, priority %d)\n",
fodn->fdn_name, fodn->fdn_nodeid,
fodn->fdn_prio);
- } while (!list_done(&fod->fd_nodes, fodn));
-
+ } while (!list_done(&fod->fd_nodes, fodn));
+
+ /*
+ node_domain_set(fod, &node_set, &node_set_len);
+ fprintf(fp, " Failover Order = {");
+ for (x = 0; x < node_set_len; x++) {
+ fprintf(fp, " %d ", node_set[x]);
+ }
+ free(node_set);
+ fprintf(fp, "}\n");
+ */
+
} while (!list_done(domains, fod));
}
+void
+print_domains(fod_t **domains)
+{
+ dump_domains(stdout, domains);
+}
+
+
/**
* Check to see if a given node is the current preferred node within a domain
* on which we should start the service...
diff --git a/rgmanager/src/daemons/groups.c b/rgmanager/src/daemons/groups.c
index e0d393e..369e555 100644
--- a/rgmanager/src/daemons/groups.c
+++ b/rgmanager/src/daemons/groups.c
@@ -1572,6 +1572,30 @@ dump_config_version(FILE *fp)
}
+void
+dump_resource_info(FILE *fp)
+{
+ int x = central_events_enabled();
+
+ pthread_rwlock_rdlock(&resource_lock);
+ fprintf(fp, "=== Resource Agent Information ===\n");
+ dump_resource_rules(fp, &_rules);
+ fprintf(fp, "=== Defined Resources ===\n");
+ dump_resources(fp, &_resources);
+ fprintf(fp, "=== Failover Domains ===\n");
+ dump_domains(fp, &_domains);
+
+ if (x) {
+ fprintf(fp, "=== Events ===\n");
+ dump_events(fp, master_event_table);
+ }
+
+ fprintf(fp, "=== Resource Tree ===\n");
+ dump_resource_tree(fp, &_tree);
+ pthread_rwlock_unlock(&resource_lock);
+}
+
+
/**
Copy out the incarnations after doing CONDSTOPs
*/
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 88970f1..5b2ad7b 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -612,6 +612,8 @@ void dump_threads(FILE *fp);
void dump_config_version(FILE *fp);
void dump_vf_states(FILE *fp);
void dump_cluster_ctx(FILE *fp);
+void dump_resource_info(FILE *fp);
+
static void
dump_internal_state(const char *loc)
@@ -625,6 +627,7 @@ dump_internal_state(const char *loc)
dump_thread_states(fp);
#endif
dump_cluster_ctx(fp);
+ dump_resource_info(fp);
fclose(fp);
}
diff --git a/rgmanager/src/daemons/reslist.c b/rgmanager/src/daemons/reslist.c
index 7a2d69a..c908166 100644
--- a/rgmanager/src/daemons/reslist.c
+++ b/rgmanager/src/daemons/reslist.c
@@ -544,64 +544,83 @@ destroy_resources(resource_t **list)
@param res Resource to print.
*/
void
-print_resource(resource_t *res)
+print_resource(FILE *fp, resource_t *res)
{
int x;
- printf("Resource type: %s", res->r_rule->rr_type);
+ fprintf(fp, "Resource type: %s", res->r_rule->rr_type);
if (res->r_flags & RF_INLINE)
- printf(" [INLINE]");
+ fprintf(fp, " [INLINE]");
if (res->r_flags & RF_NEEDSTART)
- printf(" [NEEDSTART]");
+ fprintf(fp, " [NEEDSTART]");
if (res->r_flags & RF_NEEDSTOP)
- printf(" [NEEDSTOP]");
+ fprintf(fp, " [NEEDSTOP]");
if (res->r_flags & RF_COMMON)
- printf(" [COMMON]");
+ fprintf(fp, " [COMMON]");
if (res->r_flags & RF_RECONFIG)
- printf(" [RECONFIG]");
- printf("\n");
+ fprintf(fp, " [RECONFIG]");
+ fprintf(fp, "\n");
if (res->r_rule->rr_maxrefs)
- printf("Instances: %d/%d\n", res->r_refs,
- res->r_rule->rr_maxrefs);
+ fprintf(fp, "Instances: %d/%d\n", res->r_refs,
+ res->r_rule->rr_maxrefs);
if (res->r_rule->rr_agent)
- printf("Agent: %s\n", basename(res->r_rule->rr_agent));
+ fprintf(fp, "Agent: %s\n", basename(res->r_rule->rr_agent));
- printf("Attributes:\n");
+ fprintf(fp, "Attributes:\n");
if (!res->r_attrs) {
- printf(" - None -\n\n");
+ fprintf(fp, " - None -\n\n");
return;
}
for (x = 0; res->r_attrs[x].ra_name; x++) {
if (!(res->r_attrs[x].ra_flags & RA_INHERIT)) {
- printf(" %s = %s", res->r_attrs[x].ra_name,
- res->r_attrs[x].ra_value);
+ fprintf(fp, " %s = %s", res->r_attrs[x].ra_name,
+ res->r_attrs[x].ra_value);
} else {
- printf(" %s", res->r_attrs[x].ra_name);
+ fprintf(fp, " %s", res->r_attrs[x].ra_name);
}
if (!res->r_attrs[x].ra_flags) {
- printf("\n");
+ fprintf(fp, "\n");
continue;
}
- printf(" [");
+ fprintf(fp, " [");
if (res->r_attrs[x].ra_flags & RA_PRIMARY)
- printf(" primary");
+ fprintf(fp, " primary");
if (res->r_attrs[x].ra_flags & RA_UNIQUE)
- printf(" unique");
+ fprintf(fp, " unique");
if (res->r_attrs[x].ra_flags & RA_REQUIRED)
- printf(" required");
+ fprintf(fp, " required");
if (res->r_attrs[x].ra_flags & RA_RECONFIG)
- printf(" reconfig");
+ fprintf(fp, " reconfig");
if (res->r_attrs[x].ra_flags & RA_INHERIT)
- printf(" inherit(\"%s\")", res->r_attrs[x].ra_value);
- printf(" ]\n");
+ fprintf(fp, " inherit(\"%s\")", res->r_attrs[x].ra_value);
+ fprintf(fp, " ]\n");
}
- printf("\n");
+ fprintf(fp, "\n");
+}
+
+
+void
+dump_resources(FILE *fp, resource_t **resources)
+{
+ resource_t *curr;
+ int x;
+
+ list_for(resources, curr, x) {
+ print_resource(fp, curr);
+ }
+}
+
+
+void
+print_resources(resource_t **resources)
+{
+ dump_resources(stdout, resources);
}
diff --git a/rgmanager/src/daemons/resrules.c b/rgmanager/src/daemons/resrules.c
index 7c68ce0..576c349 100644
--- a/rgmanager/src/daemons/resrules.c
+++ b/rgmanager/src/daemons/resrules.c
@@ -556,120 +556,139 @@ store_childtype(resource_child_t **childp, char *name, int start,
@param rr Resource rule to print.
*/
void
-print_resource_rule(resource_rule_t *rr)
+print_resource_rule(FILE *fp, resource_rule_t *rr)
{
int x;
- printf("Resource Rules for \"%s\"\n", rr->rr_type);
+ fprintf(fp, "Resource Rules for \"%s\"\n", rr->rr_type);
if (rr->rr_version)
- printf("OCF API Version: %s\n", rr->rr_version);
+ fprintf(fp, "OCF API Version: %s\n", rr->rr_version);
if (rr->rr_maxrefs)
- printf("Max instances: %d\n", rr->rr_maxrefs);
+ fprintf(fp, "Max instances: %d\n", rr->rr_maxrefs);
if (rr->rr_agent)
- printf("Agent: %s\n", basename(rr->rr_agent));
+ fprintf(fp, "Agent: %s\n", basename(rr->rr_agent));
- printf("Flags: ");
+ fprintf(fp, "Flags: ");
if (rr->rr_flags) {
if (rr->rr_flags & RF_INIT)
- printf("init_on_add ");
+ fprintf(fp, "init_on_add ");
if (rr->rr_flags & RF_DESTROY)
- printf("destroy_on_delete ");
+ fprintf(fp, "destroy_on_delete ");
} else {
- printf("(none)");
+ fprintf(fp, "(none)");
}
- printf("\n");
+ fprintf(fp, "\n");
- printf("Attributes:\n");
+ fprintf(fp, "Attributes:\n");
if (!rr->rr_attrs) {
- printf(" - None -\n");
+ fprintf(fp, " - None -\n");
goto actions;
}
for (x = 0; rr->rr_attrs[x].ra_name; x++) {
- printf(" %s", rr->rr_attrs[x].ra_name);
+ fprintf(fp, " %s", rr->rr_attrs[x].ra_name);
if (!rr->rr_attrs[x].ra_flags && !rr->rr_attrs[x].ra_value) {
- printf("\n");
+ fprintf(fp, "\n");
continue;
}
if (rr->rr_attrs[x].ra_flags) {
- printf(" [");
+ fprintf(fp, " [");
if (rr->rr_attrs[x].ra_flags & RA_PRIMARY)
- printf(" primary");
+ fprintf(fp, " primary");
if (rr->rr_attrs[x].ra_flags & RA_UNIQUE)
- printf(" unique");
+ fprintf(fp, " unique");
if (rr->rr_attrs[x].ra_flags & RA_REQUIRED)
- printf(" required");
+ fprintf(fp, " required");
if (rr->rr_attrs[x].ra_flags & RA_INHERIT)
- printf(" inherit");
+ fprintf(fp, " inherit");
if (rr->rr_attrs[x].ra_flags & RA_RECONFIG)
- printf(" reconfig");
- printf(" ]");
+ fprintf(fp, " reconfig");
+ fprintf(fp, " ]");
}
if (rr->rr_attrs[x].ra_value)
- printf(" default=\"%s\"\n", rr->rr_attrs[x].ra_value);
+ fprintf(fp, " default=\"%s\"\n", rr->rr_attrs[x].ra_value);
else
- printf("\n");
+ fprintf(fp, "\n");
}
actions:
- printf("Actions:\n");
+ fprintf(fp, "Actions:\n");
if (!rr->rr_actions) {
- printf(" - None -\n");
+ fprintf(fp, " - None -\n");
goto children;
}
for (x = 0; rr->rr_actions[x].ra_name; x++) {
- printf(" %s\n", rr->rr_actions[x].ra_name);
+ fprintf(fp, " %s\n", rr->rr_actions[x].ra_name);
if (rr->rr_actions[x].ra_timeout)
- printf(" Timeout (hint): %d seconds\n",
+ fprintf(fp, " Timeout (hint): %d seconds\n",
(int)rr->rr_actions[x].ra_timeout);
if (rr->rr_actions[x].ra_depth)
- printf(" OCF Check Depth (status/monitor): "
+ fprintf(fp, " OCF Check Depth (status/monitor): "
"%d seconds\n",
(int)rr->rr_actions[x].ra_depth);
if (rr->rr_actions[x].ra_interval)
- printf(" Check Interval: %d seconds\n",
+ fprintf(fp, " Check Interval: %d seconds\n",
(int)rr->rr_actions[x].ra_interval);
}
children:
- printf("Explicitly defined child resource types:\n");
+ fprintf(fp, "Explicitly defined child resource types:\n");
if (!rr->rr_childtypes) {
- printf(" - None -\n\n");
+ fprintf(fp, " - None -\n\n");
return;
}
for (x = 0; rr->rr_childtypes[x].rc_name; x++) {
- printf(" %s", rr->rr_childtypes[x].rc_name);
+ fprintf(fp, " %s", rr->rr_childtypes[x].rc_name);
if (rr->rr_childtypes[x].rc_forbid) {
- printf(" (forbidden)\n");
+ fprintf(fp, " (forbidden)\n");
continue;
}
if (rr->rr_childtypes[x].rc_startlevel ||
rr->rr_childtypes[x].rc_stoplevel) {
- printf(" [");
+ fprintf(fp, " [");
if (rr->rr_childtypes[x].rc_startlevel) {
- printf(" startlevel = %d",
+ fprintf(fp, " startlevel = %d",
rr->rr_childtypes[x].rc_startlevel);
}
if (rr->rr_childtypes[x].rc_stoplevel) {
- printf(" stoplevel = %d",
+ fprintf(fp, " stoplevel = %d",
rr->rr_childtypes[x].rc_stoplevel);
}
- printf(" ] ");
+ fprintf(fp, " ] ");
}
- printf("\n");
+ fprintf(fp, "\n");
+ }
+
+ fprintf(fp, "\n");
+}
+
+
+void
+dump_resource_rules(FILE *fp, resource_rule_t **rules)
+{
+ resource_rule_t *curr;
+ int x;
+
+ list_for(rules, curr, x) {
+ print_resource_rule(fp, curr);
}
+}
+
- printf("\n");
+void
+print_resource_rules(resource_rule_t **rules)
+{
+ dump_resource_rules(stdout, rules);
}
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index a4d2926..f0e57d7 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -860,48 +860,56 @@ destroy_resource_tree(resource_node_t **tree)
static void
-_print_resource_tree(resource_node_t **tree, int level)
+_print_resource_tree(FILE *fp, resource_node_t **tree, int level)
{
resource_node_t *node;
int x, y;
list_do(tree, node) {
for (x = 0; x < level; x++)
- printf(" ");
+ fprintf(fp, " ");
- printf("%s", node->rn_resource->r_rule->rr_type);
+ fprintf(fp, "%s", node->rn_resource->r_rule->rr_type);
if (node->rn_flags) {
- printf(" [ ");
+ fprintf(fp, " [ ");
+ if (node->rn_flags & RF_INLINE)
+ fprintf(fp, "INLINE ");
if (node->rn_flags & RF_NEEDSTOP)
- printf("NEEDSTOP ");
+ fprintf(fp, "NEEDSTOP ");
if (node->rn_flags & RF_NEEDSTART)
- printf("NEEDSTART ");
+ fprintf(fp, "NEEDSTART ");
if (node->rn_flags & RF_COMMON)
- printf("COMMON ");
+ fprintf(fp, "COMMON ");
if (node->rn_flags & RF_INDEPENDENT)
- printf("INDEPENDENT ");
+ fprintf(fp, "INDEPENDENT ");
+ if (node->rn_flags & RF_RECONFIG)
+ fprintf(fp, "RECONFIG ");
+ if (node->rn_flags & RF_INIT)
+ fprintf(fp, "INIT ");
+ if (node->rn_flags & RF_DESTROY)
+ fprintf(fp, "DESTROY ");
if (node->rn_flags & RF_ENFORCE_TIMEOUTS)
- printf("ENFORCE-TIMEOUTS ");
- printf("]");
+ fprintf(fp, "ENFORCE-TIMEOUTS ");
+ fprintf(fp, "]");
}
- printf(" {\n");
+ fprintf(fp, " {\n");
for (x = 0; node->rn_resource->r_attrs &&
node->rn_resource->r_attrs[x].ra_value; x++) {
for (y = 0; y < level+1; y++)
- printf(" ");
- printf("%s = \"%s\";\n",
- node->rn_resource->r_attrs[x].ra_name,
- attr_value(node,
- node->rn_resource->r_attrs[x].ra_name)
- );
+ fprintf(fp, " ");
+ fprintf(fp, "%s = \"%s\";\n",
+ node->rn_resource->r_attrs[x].ra_name,
+ attr_value(node,
+ node->rn_resource->r_attrs[x].ra_name)
+ );
}
- _print_resource_tree(&node->rn_child, level + 1);
+ _print_resource_tree(fp, &node->rn_child, level + 1);
for (x = 0; x < level; x++)
- printf(" ");
- printf("}\n");
+ fprintf(fp, " ");
+ fprintf(fp, "}\n");
} while (!list_done(tree, node));
}
@@ -909,7 +917,14 @@ _print_resource_tree(resource_node_t **tree, int level)
void
print_resource_tree(resource_node_t **tree)
{
- _print_resource_tree(tree, 0);
+ _print_resource_tree(stdout, tree, 0);
+}
+
+
+void
+dump_resource_tree(FILE *fp, resource_node_t **tree)
+{
+ _print_resource_tree(fp, tree, 0);
}
diff --git a/rgmanager/src/daemons/test.c b/rgmanager/src/daemons/test.c
index 3c487c9..ad1384d 100644
--- a/rgmanager/src/daemons/test.c
+++ b/rgmanager/src/daemons/test.c
@@ -104,9 +104,8 @@ rules_func(int __attribute__((unused)) argc,
} while (!list_done(&rulelist, currule));
fprintf(stderr, "Loaded %d resource rules\n",
rules);
- list_do(&rulelist, currule) {
- print_resource_rule(currule);
- } while (!list_done(&rulelist, currule));
+
+ print_resource_rules(&rulelist);
destroy_resource_rules(&rulelist);
@@ -156,9 +155,7 @@ test_func(int argc, char **argv)
if (reslist) {
printf("=== Resources List ===\n");
- list_do(&reslist, curres) {
- print_resource(curres);
- } while (!list_done(&reslist, curres));
+ print_resources(&reslist);
}
if (tree) {
diff --git a/rgmanager/src/daemons/tests/test012.conf b/rgmanager/src/daemons/tests/test012.conf
index 939b455..a003ed3 100644
--- a/rgmanager/src/daemons/tests/test012.conf
+++ b/rgmanager/src/daemons/tests/test012.conf
@@ -23,7 +23,7 @@
<script ref="initscript"/>
<fs ref="mount1">
<nfsexport ref="Dummy Export">
- <nfsclient ref="Admin group"/>
+ <nfsclient ref="Admin group" __enforce_timeouts="1" />
<nfsclient ref="User group"/>
<nfsclient ref="red"/>
</nfsexport>
More information about the cluster-commits
mailing list