From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga ./conga.spec.in.in ricci/init.d/ricci ri ...
Date: 25 Nov 2008 16:37:21 -0000 [thread overview]
Message-ID: <20081125163721.28188.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2008-11-25 16:37:20
Modified files:
. : conga.spec.in.in
ricci/init.d : ricci
ricci/modules/cluster/clumon/init.d: modclusterd
ricci/modules/cluster/clumon/src/daemon: Monitor.cpp
Log message:
- Backport bug fixes from RHEL5
- Update changelog for build.
- Bump version
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.67.2.33&r2=1.67.2.34
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/init.d/ricci.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.10.2.2&r2=1.10.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/init.d/modclusterd.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.4.2&r2=1.2.4.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/daemon/Monitor.cpp.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.13.2.4&r2=1.13.2.5
--- conga/conga.spec.in.in 2008/06/13 18:39:14 1.67.2.33
+++ conga/conga.spec.in.in 2008/11/25 16:37:18 1.67.2.34
@@ -301,6 +301,11 @@
%changelog
+* Mon Nov 25 2008 Ryan McCabe <rmccabe@redhat.com> 0.11.2-1
+- Fix bz458298 (Cannot create new cluster in luci, python syntax error)
+- Fix bz441583 (Don't allow both label and device for qdisk config if only one can be specified)
+- Fix bz369131 (RFE: should only have to enter a system's password once)
+
* Mon May 12 2008 Ryan McCabe <rmccabe@redhat.com> 0.11.1-5
- Fix bz446082 (Adding multiple fence devices at the same time causes duplicate entries)
- Fix bz442729 (Add UI support for ssh for fence agents that now support it)
--- conga/ricci/init.d/ricci 2008/03/25 01:27:15 1.10.2.2
+++ conga/ricci/init.d/ricci 2008/11/25 16:37:18 1.10.2.3
@@ -53,103 +53,159 @@
{
rm -f "$SSL_PUBKEY" "$SSL_PRIVKEY"
echo -n "generating SSL certificates... "
- /usr/bin/openssl genrsa -out "$SSL_PRIVKEY" 2048 >&/dev/null
- /usr/bin/openssl req -new -x509 -key "$SSL_PRIVKEY" -out "$SSL_PUBKEY" -days 1825 -config /var/lib/ricci/certs/cacert.config
- /bin/chown $RUNASUSER:$RUNASUSER "$SSL_PRIVKEY" "$SSL_PUBKEY"
+ /usr/bin/openssl genrsa -out "$SSL_PRIVKEY" 2048 >&/dev/null &&
+ /usr/bin/openssl req -new -x509 -key "$SSL_PRIVKEY" -out "$SSL_PUBKEY" -days 1825 -config /var/lib/ricci/certs/cacert.config &&
+ /bin/chown $RUNASUSER:$RUNASUSER "$SSL_PRIVKEY" "$SSL_PUBKEY" &&
+ /bin/chmod 600 "$SSL_PRIVKEY" &&
/bin/chmod 644 "$SSL_PUBKEY"
- /bin/chmod 600 "$SSL_PRIVKEY"
ret=$?
echo "done"
return $ret
}
+check_ricci_lockfiles() {
+ ricci_status >& /dev/null
+ ret=$?
+ if [ "$ret" -eq 1 ] || [ "$ret" -eq 2 ]; then
+ # stale pid and/or lockfile
+ rm -f -- "$PIDFILE" "$LOCKFILE"
+ fi
+}
+
+ricci_status() {
+ if [ -f "$PIDFILE" ]; then
+ status -p "$PIDFILE" "$RICCID"
+ ricci_up=$?
+ else
+ status "$RICCID"
+ ricci_up=$?
+ fi
+ return $ricci_up
+}
+
+ricci_stop() {
+ ricci_status >& /dev/null
+ ret=$?
+
+ if [ "$ret" -ne 0 ]; then
+ # already stopped - no error
+ check_ricci_lockfiles
+ return 0
+ fi
+
+ killproc "$RICCID" SIGTERM
+
+ ricci_status >& /dev/null
+ ret=$?
+
+ max_wait=10
+ cur_wait=0
+ while [ "$ret" -eq 0 ] && [ $cur_wait -lt $max_wait ]; do
+ sleep 1
+ cur_wait=`expr $cur_wait + 1`
+ ricci_status >& /dev/null
+ ret=$?
+ done
+
+ ricci_status >& /dev/null
+ ret=$?
+
+ if [ "$ret" -ne 0 ]; then
+ rm -f -- "$PIDFILE" "$LOCKFILE"
+ return 0
+ fi
+
+ return 1
+}
case $1 in
start)
service messagebus status >&/dev/null
- if [ $? -ne 0 ]; then
+ if [ "$?" -ne 0 ]; then
service messagebus start
service messagebus status >&/dev/null
- if [ $? -ne 0 ]; then
- echo "not starting ricci..."
- /usr/bin/logger -t $RICCID "startup failed"
+ if [ "$?" -ne 0 ]; then
+ /usr/bin/logger -t "$RICCID" -- "messagebus startup failed"
+ failure "not starting $RICCID"
exit 1
fi
fi
+
service oddjobd status >&/dev/null
- if [ $? -ne 0 ]; then
+ if [ "$?" -ne 0 ]; then
service oddjobd start
service oddjobd status >&/dev/null
- if [ $? -ne 0 ]; then
- echo "not starting ricci..."
- /usr/bin/logger -t $RICCID "startup failed"
+ if [ "$?" -ne 0 ]; then
+ /usr/bin/logger -t "$RICCID" -- "oddjob startup failed"
+ failure "not starting $RICCID"
exit 1
fi
fi
service saslauthd start >&/dev/null
+
ssl_certs_ok
- if [ "1$?" != "10" ] ; then
+ if [ "$?" -ne 0 ] ; then
generate_ssl_certs
fi
- NewUID=`grep "^$RUNASUSER:" /etc/passwd | sed -e 's/^[^:]*:[^:]*://' -e 's/:.*//'`
+ check_ricci_lockfiles
+ NewUID=`grep "^$RUNASUSER:" /etc/passwd | cut -d: -f3`
echo -n $"Starting $ID: "
- daemon $RICCID -u $NewUID
- rtrn=$?
+ daemon "$RICCID" -u "$NewUID"
echo
+ ret=$?
- if [ $rtrn -eq 0 ]; then
- touch "$LOCKFILE"
- /usr/bin/logger -t $RICCID "startup succeeded"
+ if [ "$ret" -eq 0 ]; then
+ touch -- "$LOCKFILE"
+ /usr/bin/logger -t $RICCID -- "startup succeeded"
else
- /usr/bin/logger -t $RICCID "startup failed"
+ /usr/bin/logger -t $RICCID -- "startup failed"
fi
;;
restart)
$0 stop
$0 start
- rtrn=$?
+ ret=$?
;;
status)
- status $RICCID
- rtrn=$?
+ ricci_status
+ ret=$?
;;
stop)
echo -n "Shutting down $ID: "
- killproc $RICCID SIGTERM
- rtrn=$?
- if [ $rtrn -eq 0 ]; then
- sleep 8
- rm -f $PIDFILE
- rm -f $LOCKFILE
- /usr/bin/logger -t $RICCID "shutdown succeeded"
- rtrn=0
+ ricci_stop
+ ret=$?
+ if [ "$ret" -eq 0 ]; then
+ /usr/bin/logger -t "$RICCID" -- "shutdown succeeded"
else
- /usr/bin/logger -t $RICCID "shutdown failed"
- rtrn=1
+ /usr/bin/logger -t "$RICCID" -- "shutdown failed"
fi
echo
;;
condrestart)
- if [ -f ${PIDFILE} ] ; then
+ if [ -f "$PIDFILE" ]; then
$0 restart
- rtrn=$?
+ ret=$?
fi
;;
+ try-restart)
+ ret=3
+ ;;
+
reload)
- rtrn=3
+ ret=3
;;
*)
echo "Usage: $0 {start|stop|status|restart|condrestart|reload}"
- rtrn=3
+ ret=3
;;
esac
-exit $rtrn
+exit $ret
--- conga/ricci/modules/cluster/clumon/init.d/modclusterd 2008/03/25 01:27:16 1.2.4.2
+++ conga/ricci/modules/cluster/clumon/init.d/modclusterd 2008/11/25 16:37:19 1.2.4.3
@@ -37,66 +37,122 @@
# If we're not configured, then don't start anything.
#
[ "${NETWORKING}" = "yes" ] || exit 1
-#[ -f "$CFG_FILE" ] || exit 0
+modclusterd_status() {
+ if [ -f "$PIDFILE" ]; then
+ status -p "$PIDFILE" "$MODCLUSTERD"
+ ret=$?
+ else
+ status "$MODCLUSTERD"
+ ret=$?
+ fi
+ return $ret
+}
+
+check_modclusterd_lockfiles() {
+ modclusterd_status >& /dev/null
+ ret=$?
+ if [ "$ret" -eq 1 ] || [ "$ret" -eq 2 ]; then
+ # stale pid and/or lockfile
+ rm -f -- "$PIDFILE" "$LOCKFILE"
+ fi
+ return 0
+}
+
+modclusterd_stop() {
+ modclusterd_status >& /dev/null
+ ret=$?
+
+ if [ "$ret" -ne 0 ]; then
+ # already stopped - no error
+ check_modclusterd_lockfiles
+ return 0
+ fi
+
+ killproc "$MODCLUSTERD" SIGTERM
+
+ modclusterd_status >& /dev/null
+ ret=$?
+
+ max_wait=10
+ cur_wait=0
+ while [ "$ret" -eq 0 ] && [ $cur_wait -lt $max_wait ]; do
+ sleep 1
+ cur_wait=`expr $cur_wait + 1`
+ modclusterd_status >& /dev/null
+ ret=$?
+ done
+
+ modclusterd_status >& /dev/null
+ ret=$?
+
+ if [ "$ret" -ne 0 ]; then
+ rm -f -- "$PIDFILE" "$LOCKFILE"
+ return 0
+ fi
+
+ return 1
+}
case $1 in
start)
echo -n $"Starting $ID: "
- daemon $MODCLUSTERD
- rtrn=$?
- if [ $rtrn -eq 0 ]; then
- touch $LOCKFILE
- /usr/bin/logger -t $MODCLUSTERD "startup succeeded"
+ check_modclusterd_lockfiles
+ daemon "$MODCLUSTERD"
+ ret=$?
+ if [ "$ret" -eq 0 ]; then
+ touch -- "$LOCKFILE"
+ /usr/bin/logger -t "$MODCLUSTERD" -- "startup succeeded"
else
- /usr/bin/logger -t $MODCLUSTERD "startup failed"
- rtrn=1
+ /usr/bin/logger -t "$MODCLUSTERD" -- "startup failed"
+ ret=1
fi
echo
;;
restart)
$0 stop
- sleep 8
$0 start
- rtrn=$?
+ ret=$?
;;
status)
- status $MODCLUSTERD
- rtrn=$?
+ modclusterd_status
+ ret=$?
;;
stop)
echo -n "Shutting down $ID: "
- killproc $MODCLUSTERD SIGTERM
- rtrn=$?
- if [ $rtrn -eq 0 ]; then
- rm -f $PIDFILE
- rm -f $LOCKFILE
- /usr/bin/logger -t $MODCLUSTERD "shutdown succeeded"
+ modclusterd_stop
+ ret=$?
+ if [ "$ret" -eq 0 ]; then
+ /usr/bin/logger -t "$MODCLUSTERD" -- "shutdown succeeded"
else
- /usr/bin/logger -t $MODCLUSTERD "shutdown failed"
- rtrn=1
+ /usr/bin/logger -t "$MODCLUSTERD" -- "shutdown failed"
+ ret=1
fi
echo
;;
condrestart)
- if [ -f ${PIDFILE} ] ; then
+ if [ -f "$PIDFILE" ]; then
$0 restart
- rtrn=$?
+ ret=$?
fi
;;
+ try-restart)
+ ret=3
+ ;;
+
reload)
- rtrn=3
+ ret=3
;;
*)
echo $"Usage: $0 {start|stop|reload|restart|status}"
- rtrn=3
+ ret=3
;;
esac
-exit $rtrn
+exit $ret
--- conga/ricci/modules/cluster/clumon/src/daemon/Monitor.cpp 2008/03/25 01:27:18 1.13.2.4
+++ conga/ricci/modules/cluster/clumon/src/daemon/Monitor.cpp 2008/11/25 16:37:20 1.13.2.5
@@ -841,11 +841,11 @@
cluster_version()
{
cman_handle_t ch = cman_init(NULL);
+ String clu_version = "";
if (ch != NULL) {
int ret;
cman_version_t cman_version;
- char *clu_version = "";
ret = cman_get_version(ch, &cman_version);
if (ret >= 0) {
@@ -891,11 +891,13 @@
}
if (version[0] == '1')
- return "4";
+ clu_version = "4";
else if (version[0] == '2')
- return "5";
+ clu_version = "5";
else
throw String(CCS_TOOL_PATH) + ": unsupported version: " + version[0];
+
+ return (clu_version);
}
XMLObject
reply other threads:[~2008-11-25 16:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081125163721.28188.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.