VERSION.sh | 4 ++--
ldap/admin/src/scripts/ds-logpipe.py | 35 ++++++++++++++++++++++++++++-------
2 files changed, 30 insertions(+), 9 deletions(-)
New commits:
commit 428efffb9232d3c3f4e4ea84d07e1fcd98f2cce3
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Mar 29 14:52:27 2011 -0600
bump version to 1.2.8.rc4 - bump ds console version to 1.2.5
diff --git a/VERSION.sh b/VERSION.sh
index 834f560..f1c5c1b 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -14,7 +14,7 @@ VERSION_MAINT=8
# if this is a PRERELEASE, set VERSION_PREREL
# otherwise, comment it out
# be sure to include the dot prefix in the prerel
-VERSION_PREREL=.rc3
+VERSION_PREREL=.rc4
# NOTES on VERSION_PREREL
# use aN for an alpha release e.g. a1, a2, etc.
# use rcN for a release candidate e.g. rc1, rc2, etc.
@@ -50,4 +50,4 @@
PACKAGE_BUGREPORT="${PACKAGE_BUGREPORT}enter_bug.cgi?product=$brand"
PACKAGE_STRING="$PACKAGE_TARNAME $PACKAGE_VERSION"
# the version of the ds console package that this directory server
# is compatible with
-CONSOLE_VERSION=$VERSION_MAJOR.$VERSION_MINOR.4
+CONSOLE_VERSION=$VERSION_MAJOR.$VERSION_MINOR.5
commit 51788359843fb9da1b5572c31b25822164462aa4
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Mar 29 14:09:02 2011 -0600
Bug 668385 - DS pipe log script is executed as many times as the dirsrv service is
restarted
https://bugzilla.redhat.com/show_bug.cgi?id=668385
Resolves: bug 668385
Bug Description: DS pipe log script is executed as many times as the dirsrv service is
restarted
Reviewed by: nkinder (Thanks!)
Branch: master
Fix Description: When running the ds-logpipe "standalone", when not tracking
a server
pid, the ds-logpipe script should run forever until explicitly killed.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit bb02e98ee264fe37f4ab6495872a470170277b12)
diff --git a/ldap/admin/src/scripts/ds-logpipe.py b/ldap/admin/src/scripts/ds-logpipe.py
index 11546d3..04cef6a 100644
--- a/ldap/admin/src/scripts/ds-logpipe.py
+++ b/ldap/admin/src/scripts/ds-logpipe.py
@@ -311,9 +311,19 @@ signal.signal(signal.SIGINT, sighandler)
signal.signal(signal.SIGTERM, sighandler)
signal.signal(signal.SIGALRM, sighandler)
+timerisset = False
+neverdone = False
if options.serverpidfile:
# start the timer to wait for the pid file to be available
signal.setitimer(signal.ITIMER_REAL, options.servertimeout)
+ timerisset = True
+
+# if we are tracking a server, we will be done
+# when the server exits
+# if not tracking a server, we will only be done
+# when we are killed
+if not serverpid and not options.serverpidfile:
+ neverdone = True
done = False
while not done:
@@ -325,9 +335,12 @@ while not done:
if debug:
print "opened pipe", logf
- if options.serverpidfile:
+ if timerisset:
# cancel the timer - the open succeeded
+ timerisset = False
signal.setitimer(signal.ITIMER_REAL, 0)
+ if debug:
+ print "cancelled startup timer"
lines = 0
# read and process the next line in the pipe
@@ -338,13 +351,14 @@ while not done:
lines += 1
# the other end of the pipe closed - we close our end too
+ if debug:
+ print "read", lines, "lines"
logf.close()
logf = None
+ if debug:
+ print "closed log pipe", logfname
- if not serverpid and not options.serverpidfile:
- # no server to deal with - we're done
- done = True;
- elif not serverpid and options.serverpidfile:
+ if not serverpid and options.serverpidfile:
# see if the server has written its server pid file yet
# it may take a "long time" for the server to actually
# write its pid file
@@ -353,8 +367,12 @@ while not done:
# if the server is no longer running, just finish
if serverpid and not is_proc_alive(serverpid):
done = True
-
- if not done:
+ if debug:
+ print "server pid", serverpid, "exited - script exiting"
+
+ if neverdone:
+ done = False
+ elif not done:
if not lines:
# at startup the server will close the log and reopen it
# when it does this lines will be 0 - this means we need
@@ -367,6 +385,9 @@ while not done:
# timeout so we don't wait a long time if the server
# really is exiting
signal.setitimer(signal.ITIMER_REAL, 0.25)
+ timerisset = True
+ if debug:
+ print "set startup timer - see if server is really shut down"
else: # we read something
# pipe closed - usually when server shuts down
done = True
commit c2a13d04173c02575e538c3548a0fb33227a71eb
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Mon Mar 28 17:13:41 2011 -0600
bump version to 1.2.8.rc3
diff --git a/VERSION.sh b/VERSION.sh
index e820920..834f560 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -14,7 +14,7 @@ VERSION_MAINT=8
# if this is a PRERELEASE, set VERSION_PREREL
# otherwise, comment it out
# be sure to include the dot prefix in the prerel
-VERSION_PREREL=.rc2
+VERSION_PREREL=.rc3
# NOTES on VERSION_PREREL
# use aN for an alpha release e.g. a1, a2, etc.
# use rcN for a release candidate e.g. rc1, rc2, etc.