cluster: STABLE3 - qdiskd: Change votes instead of cman-visible status
by Steven Whitehouse
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 669c6adcfae8a71ebb39722d95ed715f94e9c32b
Parent: fdc717eb3ac4c05073708750de1a55ee58247d2e
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Thu May 6 14:04:03 2010 -0400
Committer: Steven Whitehouse <swhiteho(a)redhat.com>
CommitterDate: Fri May 7 14:00:21 2010 +0100
qdiskd: Change votes instead of cman-visible status
With master-wins mode, we were advertising availability
of votes to cman. This caused cman_tool nodes output to
claim the quorum disk was offline. Since the initscript
expects the quorum disk to be reported as 'online', this
caused strange behaviors.
This fix makes us always advertise our votes as available.
Instead of presenting the votes vs. not presenting, we
simply present 0 votes when not master and 1 vote if
master.
Resolves: bz#576871
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/qdisk/main.c | 63 ++++++++++++++++++++++++++++++----------------------
1 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 4d1c411..78dc3f0 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -677,6 +677,30 @@ check_votes(qd_ctx *ctx, node_info_t *ni, int max, disk_msg_t *msg)
return 0;
}
+
+static int
+register_device(qd_ctx *ctx)
+{
+ return cman_register_quorum_device(
+ ctx->qc_cman_admin,
+ (ctx->qc_flags&RF_CMAN_LABEL) ?
+ ctx->qc_cman_label : ctx->qc_device,
+ (!(ctx->qc_flags & RF_MASTER_WINS) ||
+ ctx->qc_status == S_MASTER) ?
+ ctx->qc_votes : 0);
+}
+
+
+static int
+adjust_votes(qd_ctx *ctx)
+{
+ if (!(ctx->qc_flags & RF_MASTER_WINS))
+ return 0;
+
+ return register_device(ctx);
+}
+
+
static void
print_node_info(FILE *fp, node_info_t *ni)
{
@@ -968,6 +992,7 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
"downgrading\n",
score, score_max, score_req);
ctx->qc_status = S_NONE;
+ adjust_votes(ctx);
msg.m_msg = M_NONE;
++msg.m_seq;
bid_pending = 0;
@@ -1006,6 +1031,7 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
/* Handle just like a recent upgrade */
ctx->qc_status = S_RUN;
+ adjust_votes(ctx);
upgrade = ctx->qc_upgrade_wait;
bid_pending = 0;
msg.m_msg = M_NONE;
@@ -1055,6 +1081,7 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
logt_print(LOG_INFO,
"Assuming master role\n");
ctx->qc_status = S_MASTER;
+ adjust_votes(ctx);
case 2:
msg.m_msg = M_NONE;
case 1:
@@ -1107,9 +1134,11 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
"Halting qdisk operations\n");
return -1;
}
- if (!errors &&
- (!(ctx->qc_flags & RF_MASTER_WINS)))
- cman_poll_quorum_device(ctx->qc_cman_admin, 1);
+ if (!errors) {
+ cman_poll_quorum_device(
+ ctx->qc_cman_admin,
+ 1);
+ }
}
}
@@ -1563,18 +1592,13 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
}
/*
- * This is done in main() normally. Here, we are
- * reconfiguring _only_ the votes at this point. The
+ * Here, we are reconfiguring _only_ the votes. The
* label / cman runflags do not change during reconfiguration
*
* This only works after we have already gotten static
* configuration data during initial startup.
*/
- cman_register_quorum_device(ctx->qc_cman_admin,
- (ctx->qc_flags&RF_CMAN_LABEL)?
- ctx->qc_cman_label:
- ctx->qc_device,
- ctx->qc_votes);
+ register_device(ctx);
}
return 0;
@@ -2018,23 +2042,8 @@ main(int argc, char **argv)
if (!_running)
goto out;
- cman_register_quorum_device(ctx.qc_cman_admin,
- (ctx.qc_flags&RF_CMAN_LABEL)?
- ctx.qc_cman_label:
- ctx.qc_device,
- ctx.qc_votes);
- /*
- XXX this always returns -1 / EBUSY even when it works?!!!
-
- if ((rv = cman_register_quorum_device(ctx.qc_cman_admin, ctx.qc_device,
- ctx.qc_votes)) < 0) {
- logt_print(LOG_CRIT,
- "Could not register %s with CMAN; "
- "return = %d; error = %s\n",
- ctx.qc_device, rv, strerror(errno));
- goto out;
- }
- */
+ /* This registers the quorum device */
+ register_device(&ctx);
io_nanny_start(ctx.qc_tko * ctx.qc_interval);
14 years
cluster: RHEL56 - libgfs2: fix build break caused by recent patch
by Abhijith Das
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: febb943bb57ff440578ea7d0aeadf0d281a3158c
Parent: 170291d3fd107e78e5bf9dd106c877e403030f35
Author: Abhijith Das <adas(a)redhat.com>
AuthorDate: Thu May 6 19:53:48 2010 -0500
Committer: Abhijith Das <adas(a)redhat.com>
CommitterDate: Thu May 6 19:53:48 2010 -0500
libgfs2: fix build break caused by recent patch
One of the recent patches to libgfs2 broke another patch
to libgfs2 that correctly handled the removal of the quota
linked list from include/linux/gfs2_ondisk.h. This patch
brings back the relevant portion of the good patch that
was overwritten.
Resolves: rhbz#589815
Signed-off-by: Abhi Das <adas(a)redhat.com>
---
gfs2/libgfs2/ondisk.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index e41d380..d15cd21 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -278,8 +278,7 @@ void gfs2_quota_in(struct gfs2_quota *qu, char *buf)
CPIN_64(qu, str, qu_limit);
CPIN_64(qu, str, qu_warn);
CPIN_64(qu, str, qu_value);
- CPIN_32(qu, str, qu_ll_next);
- CPIN_08(qu, str, qu_reserved, 60);
+ CPIN_08(qu, str, qu_reserved, sizeof(qu->qu_reserved));
}
void gfs2_quota_out(struct gfs2_quota *qu, char *buf)
@@ -289,8 +288,7 @@ void gfs2_quota_out(struct gfs2_quota *qu, char *buf)
CPOUT_64(qu, str, qu_limit);
CPOUT_64(qu, str, qu_warn);
CPOUT_64(qu, str, qu_value);
- CPOUT_32(qu, str, qu_ll_next);
- CPOUT_08(qu, str, qu_reserved, 60);
+ memset(qu->qu_reserved, 0, sizeof(qu->qu_reserved));
}
void gfs2_quota_print(struct gfs2_quota *qu)
14 years
cluster: STABLE3 - qdiskd: Change votes instead of cman-visible status
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 8a615a4c8a57c076f12c4ab560a8dd6e8907d14c
Parent: fdc717eb3ac4c05073708750de1a55ee58247d2e
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Thu May 6 14:04:03 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Thu May 6 14:57:26 2010 -0400
qdiskd: Change votes instead of cman-visible status
With master-wins mode, we were advertising availability
of votes to cman. This caused cman_tool nodes output to
claim the quorum disk was offline. Since the initscript
expects the quorum disk to be reported as 'online', this
caused strange behaviors.
This fix makes us always advertise our votes as available.
Instead of presenting the votes vs. not presenting, we
simply present 0 votes when not master and 1 vote if
master.
Resolves: bz#576871
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/qdisk/main.c | 63 ++++++++++++++++++++++++++++++----------------------
1 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 4d1c411..78dc3f0 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -677,6 +677,30 @@ check_votes(qd_ctx *ctx, node_info_t *ni, int max, disk_msg_t *msg)
return 0;
}
+
+static int
+register_device(qd_ctx *ctx)
+{
+ return cman_register_quorum_device(
+ ctx->qc_cman_admin,
+ (ctx->qc_flags&RF_CMAN_LABEL) ?
+ ctx->qc_cman_label : ctx->qc_device,
+ (!(ctx->qc_flags & RF_MASTER_WINS) ||
+ ctx->qc_status == S_MASTER) ?
+ ctx->qc_votes : 0);
+}
+
+
+static int
+adjust_votes(qd_ctx *ctx)
+{
+ if (!(ctx->qc_flags & RF_MASTER_WINS))
+ return 0;
+
+ return register_device(ctx);
+}
+
+
static void
print_node_info(FILE *fp, node_info_t *ni)
{
@@ -968,6 +992,7 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
"downgrading\n",
score, score_max, score_req);
ctx->qc_status = S_NONE;
+ adjust_votes(ctx);
msg.m_msg = M_NONE;
++msg.m_seq;
bid_pending = 0;
@@ -1006,6 +1031,7 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
/* Handle just like a recent upgrade */
ctx->qc_status = S_RUN;
+ adjust_votes(ctx);
upgrade = ctx->qc_upgrade_wait;
bid_pending = 0;
msg.m_msg = M_NONE;
@@ -1055,6 +1081,7 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
logt_print(LOG_INFO,
"Assuming master role\n");
ctx->qc_status = S_MASTER;
+ adjust_votes(ctx);
case 2:
msg.m_msg = M_NONE;
case 1:
@@ -1107,9 +1134,11 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
"Halting qdisk operations\n");
return -1;
}
- if (!errors &&
- (!(ctx->qc_flags & RF_MASTER_WINS)))
- cman_poll_quorum_device(ctx->qc_cman_admin, 1);
+ if (!errors) {
+ cman_poll_quorum_device(
+ ctx->qc_cman_admin,
+ 1);
+ }
}
}
@@ -1563,18 +1592,13 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
}
/*
- * This is done in main() normally. Here, we are
- * reconfiguring _only_ the votes at this point. The
+ * Here, we are reconfiguring _only_ the votes. The
* label / cman runflags do not change during reconfiguration
*
* This only works after we have already gotten static
* configuration data during initial startup.
*/
- cman_register_quorum_device(ctx->qc_cman_admin,
- (ctx->qc_flags&RF_CMAN_LABEL)?
- ctx->qc_cman_label:
- ctx->qc_device,
- ctx->qc_votes);
+ register_device(ctx);
}
return 0;
@@ -2018,23 +2042,8 @@ main(int argc, char **argv)
if (!_running)
goto out;
- cman_register_quorum_device(ctx.qc_cman_admin,
- (ctx.qc_flags&RF_CMAN_LABEL)?
- ctx.qc_cman_label:
- ctx.qc_device,
- ctx.qc_votes);
- /*
- XXX this always returns -1 / EBUSY even when it works?!!!
-
- if ((rv = cman_register_quorum_device(ctx.qc_cman_admin, ctx.qc_device,
- ctx.qc_votes)) < 0) {
- logt_print(LOG_CRIT,
- "Could not register %s with CMAN; "
- "return = %d; error = %s\n",
- ctx.qc_device, rv, strerror(errno));
- goto out;
- }
- */
+ /* This registers the quorum device */
+ register_device(&ctx);
io_nanny_start(ctx.qc_tko * ctx.qc_interval);
14 years
cluster: STABLE3 - rgmanager: Fix man pages
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: fdc717eb3ac4c05073708750de1a55ee58247d2e
Parent: 82faccc5e341c9e7131d8db5a5e524a8ebfe30dc
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Wed May 5 13:16:17 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed May 5 13:16:17 2010 -0400
rgmanager: Fix man pages
Resolves: bz588010
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/man/Makefile | 2 +-
rgmanager/man/clurgmgrd.8 | 42 +-----------------------------------------
rgmanager/man/clurmtabd.8 | 37 -------------------------------------
rgmanager/man/rgmanager.8 | 43 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 45 insertions(+), 79 deletions(-)
diff --git a/rgmanager/man/Makefile b/rgmanager/man/Makefile
index 791c8a7..0d8f3aa 100644
--- a/rgmanager/man/Makefile
+++ b/rgmanager/man/Makefile
@@ -2,8 +2,8 @@ MANTARGET= \
clubufflush.8 \
clufindhostname.8 \
clulog.8 \
+ rgmanager.8 \
clurgmgrd.8 \
- clurmtabd.8 \
clustat.8 \
clusvcadm.8
diff --git a/rgmanager/man/clurgmgrd.8 b/rgmanager/man/clurgmgrd.8
index 7b43925..7541418 100644
--- a/rgmanager/man/clurgmgrd.8
+++ b/rgmanager/man/clurgmgrd.8
@@ -1,41 +1 @@
-.TH "clusvcmgrd" "8" "Jan 2005" "" "Red Hat Cluster Suite"
-.SH "NAME"
-Clurgmgrd \- Resource Group (Cluster Service) Manager Daemon
-.SH "DESCRIPTION"
-.PP
-.B Clurgmgrd
-handles management of user-defined cluster services (also known as resource
-groups). This includes handling of user requests including service start,
-service disable, service relocate, and service restart. The service
-manager daemon also handles restarting and relocating services in the
-event of failures.
-.SH "HOW IT WORKS"
-.PP
-The service manager is spawned by an init script after the cluster
-infrastructure has been started and ccsd has been spawned, and only
-functions when the cluster is quorate.
-.LP
-During initialization, the service manager runs scripts which ensure that all
-services are clear to be started. After that, it determines which services
-need to be started and starts them.
-.LP
-When an event is received, members which are no longer online have their
-services taken away from them. The event should only occur in the case that
-the member has been fenced whenever fencing is available.
-.LP
-When a cluster member determines that it is no longer in the cluster quorum,
-the service manager stops all services and waits for a new quorum to form.
-
-.SH "COMMAND LINE OPTIONS"
-.IP \-f
-Run in the foreground (do not fork).
-.IP \-d
-Enable debug-level logging.
-.IP \-N
-Do not perform stop-before-start. Combined with the
-.I -Z
-flag to clusvcadm, this can be used to allow rgmanager to be upgraded
-without stopping a given user service or set of services.
-
-.SH "SEE ALSO"
-clusvcadm(8), ccsd(8)
+.so man8/rgmanager.8
diff --git a/rgmanager/man/clurmtabd.8 b/rgmanager/man/clurmtabd.8
deleted file mode 100644
index 3094499..0000000
--- a/rgmanager/man/clurmtabd.8
+++ /dev/null
@@ -1,37 +0,0 @@
-.TH "clurmtabd" "8" "Jan 2005" "" "Red Hat Cluster Suite"
-.SH "NAME"
-clurmtabd \- Cluster NFS Remote Mount Table Daemon
-.SH "DESCRIPTION"
-.PP
-Instances of
-.B clurmtabd
-keep entries relevant to a given mount point in sync cluster-wide. It does
-this by polling /var/lib/nfs/rmtab periodically.
-.SH "HOW IT WORKS"
-.PP
-A single instance of
-.B clurmtabd
-is spawned by the service manager (clusvcmgrd(8)) for each mount point in a
-given user service. Each instance polls /var/lib/nfs/rmtab every few seconds,
-looking for changes. When changes are detected, they are merged in with the
-current in-memory view. The entries are filtered according to the mount point
-being monitored and are subsequently written out synchronously to that
-mount point.
-.LP
-When a user service is relocated (or after a fail-over), clurmtabd reads the
-entries on a given mount point and synchronizes them with the new member's
-/var/lib/nfs/rmtab. This is done prior to running the exportfs(8) command
-so that clients of the given service do not receive "Stale NFS file handle"
-errors.
-.SH "NOTES"
-.PP
-Clurmtabd is not a part of NFS and can not ensure that "Stale NFS file handle"
-errors are never received. It is a best-effort attempt. To fully prevent
-"Stale NFS file handle" errors, it is necessary to modify the Linux kernel
-as well as nfs-utils.
-
-.SH "FILES"
-/var/lib/nfs/rmtab
-
-.SH "SEE ALSO"
-clurgmgrd(8), rpc.mountd(8), exportfs(8)
diff --git a/rgmanager/man/rgmanager.8 b/rgmanager/man/rgmanager.8
new file mode 100644
index 0000000..60ba6f7
--- /dev/null
+++ b/rgmanager/man/rgmanager.8
@@ -0,0 +1,43 @@
+.TH "clusvcmgrd" "8" "Jan 2005" "" "Red Hat Cluster Suite"
+.SH "NAME"
+rgmanager \- Resource Group (Cluster Service) Manager Daemon
+.SH "DESCRIPTION"
+.PP
+.B rgmanager
+handles management of user-defined cluster services (also known as resource
+groups). This includes handling of user requests including service start,
+service disable, service relocate, and service restart. The service
+manager daemon also handles restarting and relocating services in the
+event of failures.
+.SH "HOW IT WORKS"
+.PP
+The service manager is spawned by an init script after the cluster
+infrastructure has been started and only functions when the cluster
+is quorate and locks are working.
+.LP
+During initialization, the service manager runs scripts which ensure that all
+services are clear to be started. After that, it determines which services
+need to be started and starts them.
+.LP
+When an event is received, members which are no longer online have their
+services taken away from them. The event should only occur in the case that
+the member has been fenced whenever fencing is available.
+.LP
+When a cluster member determines that it is no longer in the cluster quorum,
+the service manager stops all services and waits for a new quorum to form.
+
+.SH "COMMAND LINE OPTIONS"
+.IP \-f
+Run in the foreground (do not fork).
+.IP \-d
+Enable debug-level logging.
+.IP \-w
+Disable internal process monitoring (for debugging).
+.IP \-N
+Do not perform stop-before-start. Combined with the
+.I -Z
+flag to clusvcadm, this can be used to allow rgmanager to be upgraded
+without stopping a given user service or set of services.
+
+.SH "SEE ALSO"
+clusvcadm(8)
14 years
cluster: STABLE3 - rgmanager: Do hard shut down if corosync dies
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 82faccc5e341c9e7131d8db5a5e524a8ebfe30dc
Parent: ae3820352e7ca42b46d8f1eb14902ab7f16216ed
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Wed May 5 09:13:08 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed May 5 11:26:23 2010 -0400
rgmanager: Do hard shut down if corosync dies
Resolves: 589131
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/clulib/msg_cluster.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c
index 136b376..005ffc1 100644
--- a/rgmanager/src/clulib/msg_cluster.c
+++ b/rgmanager/src/clulib/msg_cluster.c
@@ -17,6 +17,8 @@
#include <cman-private.h>
#include <logging.h>
+static void process_cman_event(cman_handle_t handle, void *private,
+ int reason, int arg);
/* Ripped from ccsd's setup_local_socket */
int cluster_msg_close(msgctx_t *ctx);
@@ -189,7 +191,10 @@ poll_cluster_messages(int timeout)
return -1;
}
- cman_dispatch(ch, 0);
+ if (cman_dispatch(ch, 0) < 0) {
+ process_cman_event(ch, NULL,
+ CMAN_REASON_TRY_SHUTDOWN, 0);
+ }
ret = 0;
}
cman_unlock(ch);
14 years
cluster: STABLE3 - config: Add fail_recv_const
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: ae3820352e7ca42b46d8f1eb14902ab7f16216ed
Parent: d9e0c4c85659ceb26fd042f6638e2890f40f3406
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue May 4 18:00:13 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed May 5 11:26:12 2010 -0400
config: Add fail_recv_const
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
config/plugins/ldap/99cluster.ldif | 10 ++++++++--
config/plugins/ldap/ldap-base.csv | 3 ++-
config/tools/xml/cluster.rng.in | 3 +++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/config/plugins/ldap/99cluster.ldif b/config/plugins/ldap/99cluster.ldif
index 399fc0e..50ffa9d 100644
--- a/config/plugins/ldap/99cluster.ldif
+++ b/config/plugins/ldap/99cluster.ldif
@@ -1,4 +1,4 @@
-# Auto-generated @ 2010-05-04 17:47:37
+# Auto-generated @ 2010-05-04 17:59:59
dn: cn=schema
attributeTypes: (
1.3.6.1.4.1.2312.8.1.1.1 NAME 'rhcsConfig-version'
@@ -121,6 +121,12 @@ attributeTypes: (
SINGLE-VALUE
)
attributeTypes: (
+ 1.3.6.1.4.1.2312.8.1.1.278 NAME 'rhcsFail-recv-const'
+ EQUALITY caseExactIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
+ SINGLE-VALUE
+ )
+attributeTypes: (
1.3.6.1.4.1.2312.8.1.1.83 NAME 'rhcsToken-retransmits-before-loss-const'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
@@ -1576,7 +1582,7 @@ objectClasses: (
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.4 NAME 'rhcsTotem' SUP top STRUCTURAL
MUST ( cn )
- MAY ( rhcsKeyfile $ rhcsSecauth $ rhcsRrp-mode $ rhcsToken-retransmits-before-loss-const $ rhcsToken $ rhcsJoin $ rhcsConsensus )
+ MAY ( rhcsKeyfile $ rhcsSecauth $ rhcsRrp-mode $ rhcsToken-retransmits-before-loss-const $ rhcsFail-recv-const $ rhcsToken $ rhcsJoin $ rhcsConsensus )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.56 NAME 'rhcsInterface' SUP top STRUCTURAL
diff --git a/config/plugins/ldap/ldap-base.csv b/config/plugins/ldap/ldap-base.csv
index 03cbad2..79dea80 100644
--- a/config/plugins/ldap/ldap-base.csv
+++ b/config/plugins/ldap/ldap-base.csv
@@ -1,4 +1,4 @@
-# Max attribute value: 277
+# Max attribute value: 278
# Max object class value: 59
obj,rhcsCluster,cluster,1
obj,rhcsCman,cman,3
@@ -335,3 +335,4 @@ attr,rhcsHash-cluster-id,hash_cluster_id,274
attr,rhcs--max-failures,__max_failures,275
attr,rhcs--failure-expire-time,__failure_expire_time,276
attr,rhcsStatus-program,status_program,277
+attr,rhcsFail-recv-const,fail_recv_const,278
diff --git a/config/tools/xml/cluster.rng.in b/config/tools/xml/cluster.rng.in
index 37e41d7..aeba2d0 100644
--- a/config/tools/xml/cluster.rng.in
+++ b/config/tools/xml/cluster.rng.in
@@ -176,6 +176,9 @@ To validate your cluster.conf against this schema, run:
timeout." rha:default="5000" rha:sample="5300"/>
</optional>
<optional>
+ <attribute name="fail_recv_const" />
+ </optional>
+ <optional>
<attribute name="token_retransmits_before_loss_const"
rha:description="This value identifies how many token retransmits
should be attempted before forming a new configuration. If
14 years
cluster: STABLE3 - config: Update config schema
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: d9e0c4c85659ceb26fd042f6638e2890f40f3406
Parent: 33e3e8811ce60e4b3f105addde902d8008c25fe3
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue May 4 16:42:11 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed May 5 11:26:07 2010 -0400
config: Update config schema
Resolves: bz583789
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
config/plugins/ldap/99cluster.ldif | 66 +++++++++++------
config/plugins/ldap/ldap-base.csv | 5 +-
config/tools/xml/cluster.rng.in | 141 ++++++++++++++++++++++++++++++++++++
rgmanager/src/resources/ra2rng.xsl | 8 ++-
4 files changed, 194 insertions(+), 26 deletions(-)
diff --git a/config/plugins/ldap/99cluster.ldif b/config/plugins/ldap/99cluster.ldif
index b4d4812..399fc0e 100644
--- a/config/plugins/ldap/99cluster.ldif
+++ b/config/plugins/ldap/99cluster.ldif
@@ -1,4 +1,4 @@
-# Auto-generated @ 2010-03-23 16:45:04
+# Auto-generated @ 2010-05-04 17:47:37
dn: cn=schema
attributeTypes: (
1.3.6.1.4.1.2312.8.1.1.1 NAME 'rhcsConfig-version'
@@ -1027,6 +1027,18 @@ attributeTypes: (
SINGLE-VALUE
)
attributeTypes: (
+ 1.3.6.1.4.1.2312.8.1.1.275 NAME 'rhcs--max-failures'
+ EQUALITY caseExactIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
+ SINGLE-VALUE
+ )
+attributeTypes: (
+ 1.3.6.1.4.1.2312.8.1.1.276 NAME 'rhcs--failure-expire-time'
+ EQUALITY caseExactIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
+ SINGLE-VALUE
+ )
+attributeTypes: (
1.3.6.1.4.1.2312.8.1.1.138 NAME 'rhcsAddress'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
@@ -1285,6 +1297,12 @@ attributeTypes: (
SINGLE-VALUE
)
attributeTypes: (
+ 1.3.6.1.4.1.2312.8.1.1.277 NAME 'rhcsStatus-program'
+ EQUALITY caseExactIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
+ SINGLE-VALUE
+ )
+attributeTypes: (
1.3.6.1.4.1.2312.8.1.1.236 NAME 'rhcsHypervisor'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
@@ -1685,95 +1703,95 @@ objectClasses: (
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.31 NAME 'rhcsService' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsPriority $ rhcsRestart-expire-time $ rhcsMax-restarts $ rhcsDepend-mode $ rhcsDepend $ rhcsRecovery $ rhcsNfs-client-cache $ rhcsNfslock $ rhcsExclusive $ rhcsHardrecovery $ rhcsAutostart $ rhcsDomain $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsPriority $ rhcsRestart-expire-time $ rhcsMax-restarts $ rhcsDepend-mode $ rhcsDepend $ rhcsRecovery $ rhcsNfs-client-cache $ rhcsNfslock $ rhcsExclusive $ rhcsHardrecovery $ rhcsAutostart $ rhcsDomain $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.32 NAME 'rhcsIp' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsSleeptime $ rhcsNfslock $ rhcsMonitor-link $ rhcsFamily $ rhcsAddress $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsSleeptime $ rhcsNfslock $ rhcsMonitor-link $ rhcsFamily $ rhcsAddress $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.33 NAME 'rhcsNfsclient' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsUse-cache $ rhcsService-name $ rhcsAllow-recover $ rhcsOptions $ rhcsFsid $ rhcsSvcname $ rhcsPath $ rhcsTarget $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsUse-cache $ rhcsService-name $ rhcsAllow-recover $ rhcsOptions $ rhcsFsid $ rhcsSvcname $ rhcsPath $ rhcsTarget $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.34 NAME 'rhcsNfsexport' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsFsid $ rhcsPath $ rhcsDevice $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsFsid $ rhcsPath $ rhcsDevice $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.35 NAME 'rhcsScript' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsFile $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsFile $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.36 NAME 'rhcsNetfs' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsOptions $ rhcsForce-unmount $ rhcsNo-unmount $ rhcsFstype $ rhcsExport $ rhcsHost $ rhcsMountpoint $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsOptions $ rhcsForce-unmount $ rhcsNo-unmount $ rhcsFstype $ rhcsExport $ rhcsHost $ rhcsMountpoint $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.37 NAME 'rhcsClusterfs' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsNfslock $ rhcsFsid $ rhcsSelf-fence $ rhcsOptions $ rhcsForce-unmount $ rhcsFstype $ rhcsDevice $ rhcsMountpoint $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsNfslock $ rhcsFsid $ rhcsSelf-fence $ rhcsOptions $ rhcsForce-unmount $ rhcsFstype $ rhcsDevice $ rhcsMountpoint $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.38 NAME 'rhcsSmb' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsWorkgroup $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsWorkgroup $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.39 NAME 'rhcsApache' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsHttpd-options $ rhcsConfig-file $ rhcsServer-root $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsHttpd-options $ rhcsConfig-file $ rhcsServer-root $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.40 NAME 'rhcsOpenldap' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsSlapd-options $ rhcsUrl-list $ rhcsConfig-file $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsSlapd-options $ rhcsUrl-list $ rhcsConfig-file $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.41 NAME 'rhcsSamba' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsNmbd-options $ rhcsSmbd-options $ rhcsConfig-file $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsNmbd-options $ rhcsSmbd-options $ rhcsConfig-file $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.42 NAME 'rhcsMysql' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsStartup-wait $ rhcsMysqld-options $ rhcsListen-address $ rhcsConfig-file $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsStartup-wait $ rhcsMysqld-options $ rhcsListen-address $ rhcsConfig-file $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.43 NAME 'rhcsPostgres-8' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsPostmaster-options $ rhcsPostmaster-user $ rhcsConfig-file $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsPostmaster-options $ rhcsPostmaster-user $ rhcsConfig-file $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.44 NAME 'rhcsTomcat-5' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsCatalina-base $ rhcsCatalina-options $ rhcsTomcat-user $ rhcsConfig-file $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsCatalina-base $ rhcsCatalina-options $ rhcsTomcat-user $ rhcsConfig-file $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.45 NAME 'rhcsLvm' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsNfslock $ rhcsSelf-fence $ rhcsLv-name $ rhcsVg-name $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsNfslock $ rhcsSelf-fence $ rhcsLv-name $ rhcsVg-name $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.46 NAME 'rhcsVm' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsMigration-uri $ rhcsHypervisor-uri $ rhcsHypervisor $ rhcsRestart-expire-time $ rhcsMax-restarts $ rhcsDepend-mode $ rhcsDepend $ rhcsSnapshot $ rhcsPath $ rhcsMigrate $ rhcsXmlfile $ rhcsUse-virsh $ rhcsMigration-mapping $ rhcsRecovery $ rhcsExclusive $ rhcsHardrecovery $ rhcsAutostart $ rhcsDomain $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsMigration-uri $ rhcsHypervisor-uri $ rhcsHypervisor $ rhcsStatus-program $ rhcsRestart-expire-time $ rhcsMax-restarts $ rhcsDepend-mode $ rhcsDepend $ rhcsSnapshot $ rhcsPath $ rhcsMigrate $ rhcsXmlfile $ rhcsUse-virsh $ rhcsMigration-mapping $ rhcsRecovery $ rhcsExclusive $ rhcsHardrecovery $ rhcsAutostart $ rhcsDomain $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.47 NAME 'rhcsSAPInstance' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsPOST-STOP-USEREXIT $ rhcsPRE-STOP-USEREXIT $ rhcsPOST-START-USEREXIT $ rhcsPRE-START-USEREXIT $ rhcsAUTOMATIC-RECOVER $ rhcsSTART-WAITTIME $ rhcsSTART-PROFILE $ rhcsDIR-PROFILE $ rhcsDIR-EXECUTABLE $ rhcsInstanceName $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsPOST-STOP-USEREXIT $ rhcsPRE-STOP-USEREXIT $ rhcsPOST-START-USEREXIT $ rhcsPRE-START-USEREXIT $ rhcsAUTOMATIC-RECOVER $ rhcsSTART-WAITTIME $ rhcsSTART-PROFILE $ rhcsDIR-PROFILE $ rhcsDIR-EXECUTABLE $ rhcsInstanceName $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.48 NAME 'rhcsSAPDatabase' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsPOST-STOP-USEREXIT $ rhcsPRE-STOP-USEREXIT $ rhcsPOST-START-USEREXIT $ rhcsPRE-START-USEREXIT $ rhcsDB-JARS $ rhcsDIR-SECSTORE $ rhcsDIR-BOOTSTRAP $ rhcsAUTOMATIC-RECOVER $ rhcsSTRICT-MONITORING $ rhcsJAVA-HOME $ rhcsDBJ2EE-ONLY $ rhcsNETSERVICENAME $ rhcsDBTYPE $ rhcsDIR-EXECUTABLE $ rhcsSID $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsPOST-STOP-USEREXIT $ rhcsPRE-STOP-USEREXIT $ rhcsPOST-START-USEREXIT $ rhcsPRE-START-USEREXIT $ rhcsDB-JARS $ rhcsDIR-SECSTORE $ rhcsDIR-BOOTSTRAP $ rhcsAUTOMATIC-RECOVER $ rhcsSTRICT-MONITORING $ rhcsJAVA-HOME $ rhcsDBJ2EE-ONLY $ rhcsNETSERVICENAME $ rhcsDBTYPE $ rhcsDIR-EXECUTABLE $ rhcsSID $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.49 NAME 'rhcsNamed' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsNamed-options $ rhcsNamed-working-dir $ rhcsNamed-sdb $ rhcsConfig-file $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsService-name $ rhcsShutdown-wait $ rhcsNamed-options $ rhcsNamed-working-dir $ rhcsNamed-sdb $ rhcsConfig-file $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.50 NAME 'rhcsASEHAagent' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsDeep-probe-timeout $ rhcsStart-timeout $ rhcsShutdown-timeout $ rhcsSybase-user $ rhcsInterfaces-file $ rhcsLogin-file $ rhcsServer-name $ rhcsSybase-ocs $ rhcsSybase-ase $ rhcsSybase-home $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsDeep-probe-timeout $ rhcsStart-timeout $ rhcsShutdown-timeout $ rhcsSybase-user $ rhcsInterfaces-file $ rhcsLogin-file $ rhcsServer-name $ rhcsSybase-ocs $ rhcsSybase-ase $ rhcsSybase-home $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.58 NAME 'rhcsDrbd' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsResource $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsResource $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.51 NAME 'rhcsFs' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsOptions $ rhcsForce-fsck $ rhcsFsid $ rhcsNfslock $ rhcsSelf-fence $ rhcsQuick-status $ rhcsForce-unmount $ rhcsFstype $ rhcsDevice $ rhcsMountpoint $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsOptions $ rhcsForce-fsck $ rhcsFsid $ rhcsNfslock $ rhcsSelf-fence $ rhcsQuick-status $ rhcsForce-unmount $ rhcsFstype $ rhcsDevice $ rhcsMountpoint $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.52 NAME 'rhcsOracledb' SUP top STRUCTURAL
- MAY ( rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsVhost $ rhcsType $ rhcsHome $ rhcsUser $ rhcsListener-name $ name $ rhcsRef )
+ MAY ( rhcs--failure-expire-time $ rhcs--max-failures $ rhcs--enforce-timeouts $ rhcs--independent-subtree $ rhcsVhost $ rhcsType $ rhcsHome $ rhcsUser $ rhcsListener-name $ name $ rhcsRef )
)
objectClasses: (
1.3.6.1.4.1.2312.8.1.2.53 NAME 'rhcsAction' SUP top STRUCTURAL
diff --git a/config/plugins/ldap/ldap-base.csv b/config/plugins/ldap/ldap-base.csv
index faec32b..03cbad2 100644
--- a/config/plugins/ldap/ldap-base.csv
+++ b/config/plugins/ldap/ldap-base.csv
@@ -1,4 +1,4 @@
-# Max attribute value: 274
+# Max attribute value: 277
# Max object class value: 59
obj,rhcsCluster,cluster,1
obj,rhcsCman,cman,3
@@ -332,3 +332,6 @@ attr,rhcsChannel-address,channel_address,272
obj,rhcsClvmd,clvmd,59
attr,rhcsInterface,interface,273
attr,rhcsHash-cluster-id,hash_cluster_id,274
+attr,rhcs--max-failures,__max_failures,275
+attr,rhcs--failure-expire-time,__failure_expire_time,276
+attr,rhcsStatus-program,status_program,277
diff --git a/config/tools/xml/cluster.rng.in b/config/tools/xml/cluster.rng.in
index 891eeea..37e41d7 100644
--- a/config/tools/xml/cluster.rng.in
+++ b/config/tools/xml/cluster.rng.in
@@ -984,6 +984,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1021,6 +1027,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1068,6 +1080,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1102,6 +1120,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1131,6 +1155,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1171,6 +1201,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1216,6 +1252,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1247,6 +1289,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1287,6 +1335,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1327,6 +1381,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1367,6 +1427,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1410,6 +1476,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1450,6 +1522,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1493,6 +1571,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1528,6 +1612,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1590,6 +1680,9 @@ To validate your cluster.conf against this schema, run:
<attribute name="restart_expire_time"/>
</optional>
<optional>
+ <attribute name="status_program"/>
+ </optional>
+ <optional>
<attribute name="hypervisor"/>
</optional>
<optional>
@@ -1607,6 +1700,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1659,6 +1758,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1724,6 +1829,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1767,6 +1878,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1802,6 +1919,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1828,6 +1951,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1879,6 +2008,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
@@ -1915,6 +2050,12 @@ To validate your cluster.conf against this schema, run:
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
diff --git a/rgmanager/src/resources/ra2rng.xsl b/rgmanager/src/resources/ra2rng.xsl
index e3e2815..af65ee9 100644
--- a/rgmanager/src/resources/ra2rng.xsl
+++ b/rgmanager/src/resources/ra2rng.xsl
@@ -34,10 +34,16 @@
<attribute name="__enforce_timeouts"/>
</optional>
<optional>
+ <attribute name="__max_failures"/>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time"/>
+ </optional>
+ <optional>
<ref name="CHILDREN"/>
</optional>
</element>
</define>
</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
14 years
cluster: STABLE3 - resource-agents: Add status_program attribute
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 33e3e8811ce60e4b3f105addde902d8008c25fe3
Parent: a72b410fb79436e46b67a60eb610f797fbadb538
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue May 4 17:54:15 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed May 5 11:24:22 2010 -0400
resource-agents: Add status_program attribute
Resolves: bz583789
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/vm.sh | 33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/resources/vm.sh b/rgmanager/src/resources/vm.sh
index 35de1d8..3501071 100644
--- a/rgmanager/src/resources/vm.sh
+++ b/rgmanager/src/resources/vm.sh
@@ -213,6 +213,20 @@ meta_data()
<content type="string" default="0"/>
</parameter>
+ <parameter name="status_program" reconfig="1">
+ <longdesc lang="en">
+ Ordinarily, only the presence/health of a virtual machine
+ is checked. If specified, the status_program value is
+ executed during a depth 10 check. The intent of this
+ program is to ascertain the status of critical services
+ within a virtual machine.
+ </longdesc>
+ <shortdesc lang="en">
+ Additional status check program
+ </shortdesc>
+ <content type="string" default="0"/>
+ </parameter>
+
<parameter name="hypervisor">
<shortdesc lang="en">
Hypervisor
@@ -255,6 +269,10 @@ meta_data()
<action name="status" timeout="10" interval="30"/>
<action name="monitor" timeout="10" interval="30"/>
+ <!-- depth 10 calls the status_program -->
+ <action name="status" depth="10" timeout="10" interval="300"/>
+ <action name="monitor" depth="10" timeout="10" interval="300"/>
+
<!-- reconfigure - reconfigure with new OCF parameters.
NOT OCF COMPATIBLE AT ALL -->
<action name="reconfig" timeout="10"/>
@@ -543,7 +561,11 @@ virsh_status()
return 0
fi
- return 1
+ if [ "$state" = "shut off" ]; then
+ return $OCF_NOT_RUNNING
+ fi
+
+ return $OCF_ERR_GENERIC
}
@@ -920,6 +942,15 @@ case $1 in
validate_all || exit $OCF_ERR_ARGS
echo -n "Virtual machine $OCF_RESKEY_name is "
do_status
+ rv=$?
+ if [ $rv -ne 0 ]; then
+ exit $rv
+ fi
+ [ -z "$OCF_RESKEY_status_program" ] && exit 0
+ [ -z "$OCF_CHECK_LEVEL" ] && exit 0
+ [ $OCF_CHECK_LEVEL -lt 10 ] && exit 0
+
+ bash -c "$OCF_RESKEY_status_program" &> /dev/null
exit $?
;;
migrate)
14 years
cluster: STABLE3 - rgmanager: Add per-resource status check tolerances
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: a72b410fb79436e46b67a60eb610f797fbadb538
Parent: 2c9f4e1360ee8ce4190e22f20c8b15cc7e33470d
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue May 4 17:51:45 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed May 5 11:23:15 2010 -0400
rgmanager: Add per-resource status check tolerances
Resolves: bz583789
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/include/reslist.h | 1 +
rgmanager/src/daemons/restree.c | 47 +++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/rgmanager/include/reslist.h b/rgmanager/include/reslist.h
index 6f0724b..79cbbb4 100644
--- a/rgmanager/include/reslist.h
+++ b/rgmanager/include/reslist.h
@@ -110,6 +110,7 @@ typedef struct _rg_node {
resource_t *rn_resource;
resource_act_t *rn_actions;
restart_counter_t rn_restart_counter;
+ restart_counter_t rn_failure_counter;
int rn_state; /* State of this instance of rn_resource */
int rn_flags;
int rn_last_status;
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index 56f54c7..85f9ec1 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -510,6 +510,8 @@ do_load_resource(int ccsfd, char *base,
char *ref;
resource_node_t *node;
resource_t *curres;
+ time_t failure_expire = 0;
+ int max_failures = 0;
snprintf(tok, sizeof(tok), "%s/@ref", base);
@@ -604,6 +606,36 @@ do_load_resource(int ccsfd, char *base,
free(ref);
}
+ /* per-resource-node failures / expire times */
+ snprintf(tok, sizeof(tok), "%s/@__max_failures", base);
+#ifndef NO_CCS
+ if (ccs_get(ccsfd, tok, &ref) == 0) {
+#else
+ if (conf_get(tok, &ref) == 0) {
+#endif
+ max_failures = atoi(ref);
+ if (max_failures < 0)
+ max_failures = 0;
+ free(ref);
+ }
+
+ snprintf(tok, sizeof(tok), "%s/@__failure_expire_time", base);
+#ifndef NO_CCS
+ if (ccs_get(ccsfd, tok, &ref) == 0) {
+#else
+ if (conf_get(tok, &ref) == 0) {
+#endif
+ failure_expire = (time_t)expand_time(ref);
+ if ((int64_t)failure_expire < 0)
+ failure_expire = 0;
+ free(ref);
+ }
+
+ if (max_failures && failure_expire) {
+ node->rn_failure_counter = restart_init(failure_expire,
+ max_failures);
+ }
+
curres->r_refs++;
*newnode = node;
@@ -851,6 +883,10 @@ destroy_resource_tree(resource_node_t **tree)
restart_cleanup(node->rn_restart_counter);
}
+ if (node->rn_failure_counter) {
+ restart_cleanup(node->rn_failure_counter);
+ }
+
if(node->rn_actions){
free(node->rn_actions);
}
@@ -1149,6 +1185,15 @@ do_status(resource_node_t *node)
* completed. */
node->rn_actions[idx].ra_last = time(NULL);
+ /* If we have not exceeded our failure count threshold, then fudge
+ * the status check this round */
+ if (x && node->rn_failure_counter) {
+ if (!restart_threshold_exceeded(node->rn_failure_counter)) {
+ x = 0;
+ restart_add(node->rn_failure_counter);
+ }
+ }
+
node->rn_last_status = x;
node->rn_last_depth = node->rn_actions[idx].ra_depth;
node->rn_checked = 1;
@@ -1222,6 +1267,8 @@ clear_checks(resource_node_t *node)
node->rn_actions[x].ra_last = now;
}
+ restart_clear(node->rn_failure_counter);
+
node->rn_checked = 0;
node->rn_last_status = 0;
node->rn_last_depth = 0;
14 years