[SCM] Samba Shared Repository - branch master updated

Martin Schwenke martins at samba.org
Tue Sep 19 03:33:02 UTC 2017


The branch, master has been updated
       via  68c3ea7 selftest: Avoid a build started just before midnight failing
       via  b0244d4 Revert "ctdb-daemon: Don't explicitly stop monitoring during shutdown"
       via  d0d8059 Revert "ctdb-daemon: Remove unused function ctdb_stop_monitoring()"
      from  1541c50 selftest: Add some tests for linked attribute conflicts

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 68c3ea773bb22e811139900e425e01a3df8cb375
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Sep 19 08:33:11 2017 +1000

    selftest: Avoid a build started just before midnight failing
    
    It looks like commit 070f24bc9d2 was incomplete because it doesn't
    match on the trailing fullstop and newline.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Martin Schwenke <martins at samba.org>
    Autobuild-Date(master): Tue Sep 19 05:32:22 CEST 2017 on sn-devel-144

commit b0244d46b58231c5c89131bddd2f967596f1238e
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 18 16:36:32 2017 +1000

    Revert "ctdb-daemon: Don't explicitly stop monitoring during shutdown"
    
    This reverts commit 19318d28354190a9cfafa1696e41c90351f85af9.
    
    With this commit, a shutdown that occurs while the startup event is
    running can cause an abort because the startup callback will try to
    decrease the run state from SHUTDOWN to RUNNING.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit d0d805977f3734a80ed09f81343e9b1d81ee819d
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 18 16:36:08 2017 +1000

    Revert "ctdb-daemon: Remove unused function ctdb_stop_monitoring()"
    
    This reverts commit b119104267635d96b1f99a2e98d35438841585bf.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/include/ctdb_private.h                       |  2 ++
 ctdb/server/ctdb_daemon.c                         |  1 +
 ctdb/server/ctdb_monitor.c                        | 12 ++++++++++++
 python/samba/tests/pam_winbind_warn_pwd_expire.py |  2 +-
 4 files changed, 16 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index b38e225..9be81ff 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -747,6 +747,8 @@ int32_t ctdb_control_get_db_statistics(struct ctdb_context *ctdb,
 int ctdb_set_notification_script(struct ctdb_context *ctdb, const char *script);
 void ctdb_run_notification_script(struct ctdb_context *ctdb, const char *event);
 
+void ctdb_stop_monitoring(struct ctdb_context *ctdb);
+
 void ctdb_wait_for_first_recovery(struct ctdb_context *ctdb);
 
 int32_t ctdb_control_modflags(struct ctdb_context *ctdb, TDB_DATA indata);
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 6a95470..8ae4351 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1800,6 +1800,7 @@ void ctdb_shutdown_sequence(struct ctdb_context *ctdb, int exit_code)
 	ctdb_set_runstate(ctdb, CTDB_RUNSTATE_SHUTDOWN);
 	ctdb_stop_recoverd(ctdb);
 	ctdb_stop_keepalive(ctdb);
+	ctdb_stop_monitoring(ctdb);
 	ctdb_release_all_ips(ctdb);
 	ctdb_event_script(ctdb, CTDB_EVENT_SHUTDOWN);
 	ctdb_stop_eventd(ctdb);
diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c
index 1455d82..2ecbbb3 100644
--- a/ctdb/server/ctdb_monitor.c
+++ b/ctdb/server/ctdb_monitor.c
@@ -415,6 +415,18 @@ static void ctdb_check_health(struct tevent_context *ev,
 	}
 }
 
+/* stop any monitoring 
+   this should only be done when shutting down the daemon
+*/
+void ctdb_stop_monitoring(struct ctdb_context *ctdb)
+{
+	talloc_free(ctdb->monitor->monitor_context);
+	ctdb->monitor->monitor_context = NULL;
+
+	ctdb->monitor->next_interval = 5;
+	DEBUG(DEBUG_NOTICE,("Monitoring has been stopped\n"));
+}
+
 /*
   start watching for nodes that might be dead
  */
diff --git a/python/samba/tests/pam_winbind_warn_pwd_expire.py b/python/samba/tests/pam_winbind_warn_pwd_expire.py
index 2567f98..b3d2a9f 100644
--- a/python/samba/tests/pam_winbind_warn_pwd_expire.py
+++ b/python/samba/tests/pam_winbind_warn_pwd_expire.py
@@ -38,7 +38,7 @@ class PasswordExpirePamTests(samba.tests.TestCase):
         elif warn_pwd_expire == 50:
             # This is needed as otherwise a build started just before
             # midnight can fail
-            if (res.info[0] != u"Your password will expire in 41 days"):
+            if (res.info[0] != u"Your password will expire in 41 days.\n"):
                 self.assertEqual(res.info[0], u"Your password will expire in 42 days.\n")
         else:
             self.assertEqual(warn_pwd_expire, 0)


-- 
Samba Shared Repository



More information about the samba-cvs mailing list