[28844] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: In kpropd, poll after finishing resync

daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Apr 13 17:59:58 2015

Date: Mon, 13 Apr 2015 17:59:48 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201504132159.t3DLxm10026547@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/c19fee0a748dd26ba6ac62118cf4b9ebec36ba2f
commit c19fee0a748dd26ba6ac62118cf4b9ebec36ba2f
Author: Greg Hudson <ghudson@mit.edu>
Date:   Wed Apr 8 17:23:25 2015 -0400

    In kpropd, poll after finishing resync
    
    When kpropd operates in iprop mode, full resyncs are handled by a
    child process.  After a full resync, we want to poll for incremental
    updates, as the dump we received may have come from a pre-existing
    dump file which was not current.  To make this polling happen
    promptly, signal the parent process from the child process after a
    dump is received.
    
    With this change, t_iprop.py no longer has to prod kpropd after a full
    resync occurs, so remove that logic.
    
    ticket: 8161

 src/slave/kpropd.c   |    6 +++++-
 src/tests/t_iprop.py |    8 +-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/slave/kpropd.c b/src/slave/kpropd.c
index 18a8e1d..1bac58e 100644
--- a/src/slave/kpropd.c
+++ b/src/slave/kpropd.c
@@ -298,7 +298,7 @@ main(int argc, char **argv)
     /*
      * This is the iprop case.  We'll fork a child to run do_standalone().  The
      * parent will run do_iprop().  We try to kill the child if we get killed.
-     * Catch SIGUSR1 so tests can use it to interrupt the sleep timer and force
+     * Catch SIGUSR1, which can be used to interrupt the sleep timer and force
      * an iprop request.
      */
     signal_wrapper(SIGHUP, kill_do_standalone);
@@ -440,6 +440,10 @@ do_standalone()
 
             close(s);
 
+            /* If we are the fullprop child in iprop mode, notify the parent
+             * process that it should poll for incremental updates. */
+            if (fullprop_child == 0)
+                kill(getppid(), SIGUSR1);
             if (runonce)
                 exit(0);
         }
diff --git a/src/tests/t_iprop.py b/src/tests/t_iprop.py
index aece8c2..78938fc 100755
--- a/src/tests/t_iprop.py
+++ b/src/tests/t_iprop.py
@@ -10,7 +10,7 @@ from k5test import *
 # versa.
 def wait_for_prop(kpropd, full_expected, expected_old, expected_new):
     output('*** Waiting for sync from kpropd\n')
-    full_seen = sleep_seen = prodded_after_dump = False
+    full_seen = sleep_seen = False
     old_sno = new_sno = -1
     while True:
         line = kpropd.stdout.readline()
@@ -39,12 +39,6 @@ def wait_for_prop(kpropd, full_expected, expected_old, expected_new):
             sleep_seen = True
         if 'load process for full propagation completed' in line:
             full_seen = True
-        if sleep_seen and full_seen and not prodded_after_dump:
-            # Prod the kpropd parent into getting incrementals after
-            # it finishes a DB load.  This will be unnecessary if
-            # kpropd is simplified to use a single process.
-            kpropd.send_signal(signal.SIGUSR1)
-            prodded_after_dump = True
 
         # Detect some failure conditions.
         if 'Still waiting for full resync' in line:
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post