The branch, master has been updated via 16afe36de52561a62372c14b567683dc898369d5 (commit) via d48eecd748830598f4f080952f2bf05d6f92738c (commit) via 5408c5c4050539e5aa06a5e82ceb63a6cb5cef0c (commit) via 9aa13bcedd83d463c871e3cf1f3a65da3cd83992 (commit) via 9b529189f8456fad7868fc154ae27a6fd87e93b3 (commit) via bb54f3924ff19cd089b0a166fe8368db162ad709 (commit) via 1b0faae9c939a2f8da3cacba715ca62a5830d190 (commit) via 53d34eb2f9e5434dea4e7182b6af566a3a96a368 (commit) via 6fe584d05543eebd24abd19bab502dc4da04e921 (commit) via 7e53fbf92b6dd5211d918ea0e23126b7dfa50c42 (commit) via 145b1966c1b34f1667a175235e1df2741294391c (commit) via b4c06e8ec8b227c1e6c01444038c3b15b5f9e606 (commit) from ef1c4e99ca66e7a990bc557f34abb624c315e6ba (commit)
http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 16afe36de52561a62372c14b567683dc898369d5 Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 17:37:05 2013 +1000 ping_pong: Validate num_locks argument > 0 This fixes the floating point error if num_locks = 0. Signed-off-by: Amitay Isaacs <ami...@gmail.com> commit d48eecd748830598f4f080952f2bf05d6f92738c Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 17:27:00 2013 +1000 tests: If connection to ctdb daemon fails, exit This fixes the segmentation error if any of the test code fails to connect to CTDB daemon. Signed-off-by: Amitay Isaacs <ami...@gmail.com> commit 5408c5c4050539e5aa06a5e82ceb63a6cb5cef0c Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 17:00:23 2013 +1000 build: Fix compiler warnings for uninitialized variables Signed-off-by: Amitay Isaacs <ami...@gmail.com> commit 9aa13bcedd83d463c871e3cf1f3a65da3cd83992 Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 15:36:29 2013 +1000 recoverd: Send the result from child process only once The result has been sent before the child keeps waiting for parent ctdbd process. Signed-off-by: Amitay Isaacs <ami...@gmail.com> commit 9b529189f8456fad7868fc154ae27a6fd87e93b3 Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 15:31:52 2013 +1000 packaging: Enable compiler optimizations This reverts d09570c70551aa40390ce9ceffe7bc234e1afafe. ... hoping the segv has been found in last 6 years. :-) Signed-off-by: Amitay Isaacs <ami...@gmail.com> commit bb54f3924ff19cd089b0a166fe8368db162ad709 Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 15:14:10 2013 +1000 packaging: Allow building RPMs with system tdb/talloc/tevent To build CTDB RPMs with system installed libraries, use following command: ./packaging/RPM/makerpms.sh \ --with system_talloc \ --with system_tdb \ --with system_tevent Signed-off-by: Amitay Isaacs <ami...@gmail.com> commit 1b0faae9c939a2f8da3cacba715ca62a5830d190 Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 14:29:09 2013 +1000 packaging: Do not mark /etc/ctdb/functions as configuration file Signed-off-by: Amitay Isaacs <ami...@gmail.com> commit 53d34eb2f9e5434dea4e7182b6af566a3a96a368 Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 13:19:56 2013 +1000 packaging: Install README.notify.d using %doc directive Signed-off-by: Amitay Isaacs <ami...@gmail.com> Pair-Programmed-With: Martin Schwenke <mar...@meltin.net> commit 6fe584d05543eebd24abd19bab502dc4da04e921 Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 12:45:32 2013 +1000 packaging: Install docs using %doc directive Signed-off-by: Amitay Isaacs <ami...@gmail.com> Pair-Programmed-With: Martin Schwenke <mar...@meltin.net> commit 7e53fbf92b6dd5211d918ea0e23126b7dfa50c42 Author: Amitay Isaacs <ami...@gmail.com> Date: Thu Jul 4 11:33:38 2013 +1000 packaging: Remove ctdb_transaction from docdir It's bundled in ctdb-tests package. Signed-off-by: Amitay Isaacs <ami...@gmail.com> commit 145b1966c1b34f1667a175235e1df2741294391c Author: Martin Schwenke <mar...@meltin.net> Date: Sun Jun 30 17:23:08 2013 +1000 doc: Add a disclaimer for the EnableBans tunable Signed-off-by: Martin Schwenke <mar...@meltin.net> commit b4c06e8ec8b227c1e6c01444038c3b15b5f9e606 Author: Martin Schwenke <mar...@meltin.net> Date: Sun Jun 30 17:22:06 2013 +1000 doc: Add banning bug fixes to NEWS Signed-off-by: Martin Schwenke <mar...@meltin.net> ----------------------------------------------------------------------- Summary of changes: Makefile.in | 11 -------- NEWS | 9 ++++++- common/system_common.c | 2 +- doc/ctdbd.1.xml | 3 +- packaging/RPM/ctdb.spec.in | 40 +++++++++++++---------------- server/ctdb_lock.c | 2 +- server/ctdb_recoverd.c | 1 - server/ctdb_takeover.c | 1 + tests/src/ctdb_bench.c | 3 ++ tests/src/ctdb_fetch_readonly_loop.c | 3 ++ tests/src/ctdb_trackingdb_test.c | 3 ++ tests/src/ctdb_traverse.c | 3 ++ tests/src/ctdb_update_record.c | 3 ++ tests/src/ctdb_update_record_persistent.c | 3 ++ utils/ping_pong/ping_pong.c | 4 +++ 15 files changed, 53 insertions(+), 38 deletions(-) Changeset truncated at 500 lines: diff --git a/Makefile.in b/Makefile.in index 4fdd1af..6030241 100755 --- a/Makefile.in +++ b/Makefile.in @@ -341,7 +341,6 @@ install: all manpages $(PMDA_INSTALL) mkdir -p $(DESTDIR)$(etcdir)/ctdb/nfs-rpc-checks.d mkdir -p $(DESTDIR)$(etcdir)/sudoers.d/ mkdir -p $(DESTDIR)$(etcdir)/ctdb/notify.d - mkdir -p $(DESTDIR)$(docdir)/ctdb ${INSTALLCMD} -m 644 ctdb.pc $(DESTDIR)$(libdir)/pkgconfig ${INSTALLCMD} -m 755 bin/ctdb $(DESTDIR)$(bindir) ${INSTALLCMD} -m 755 bin/ctdbd $(DESTDIR)$(sbindir) @@ -358,10 +357,6 @@ install: all manpages $(PMDA_INSTALL) ${INSTALLCMD} -m 440 config/ctdb.sudoers $(DESTDIR)$(etcdir)/sudoers.d/ctdb ${INSTALLCMD} -m 644 config/functions $(DESTDIR)$(etcdir)/ctdb ${INSTALLCMD} -m 755 config/statd-callout $(DESTDIR)$(etcdir)/ctdb - ${INSTALLCMD} -m 644 README $(DESTDIR)$(docdir)/ctdb/README - ${INSTALLCMD} -m 644 COPYING $(DESTDIR)$(docdir)/ctdb/COPYING - ${INSTALLCMD} -m 644 config/events.d/README $(DESTDIR)$(docdir)/ctdb/README.eventscripts - ${INSTALLCMD} -m 644 doc/recovery-process.txt $(DESTDIR)$(docdir)/ctdb/recovery-process.txt ${INSTALLCMD} -m 755 config/events.d/00.ctdb $(DESTDIR)$(etcdir)/ctdb/events.d ${INSTALLCMD} -m 755 config/events.d/01.reclock $(DESTDIR)$(etcdir)/ctdb/events.d ${INSTALLCMD} -m 755 config/events.d/10.interface $(DESTDIR)$(etcdir)/ctdb/events.d @@ -393,13 +388,7 @@ install: all manpages $(PMDA_INSTALL) if [ -f doc/onnode.1 ];then ${INSTALLCMD} -m 644 doc/onnode.1 $(DESTDIR)$(mandir)/man1; fi if [ -f doc/ltdbtool.1 ]; then ${INSTALLCMD} -m 644 doc/ltdbtool.1 $(DESTDIR)$(mandir)/man1; fi if [ -f doc/ping_pong.1 ];then ${INSTALLCMD} -m 644 doc/ping_pong.1 $(DESTDIR)$(mandir)/man1; fi - if [ -f doc/ctdb.1.html ];then ${INSTALLCMD} -m 644 doc/ctdb.1.html $(DESTDIR)$(docdir)/ctdb; fi - if [ -f doc/ctdbd.1.html ];then ${INSTALLCMD} -m 644 doc/ctdbd.1.html $(DESTDIR)$(docdir)/ctdb; fi - if [ -f doc/onnode.1.html ];then ${INSTALLCMD} -m 644 doc/onnode.1.html $(DESTDIR)$(docdir)/ctdb; fi - if [ -f doc/ltdbtool.1.html ];then ${INSTALLCMD} -m 644 doc/ltdbtool.1.html $(DESTDIR)$(docdir)/ctdb; fi - if [ -f doc/ping_pong.1.html ];then ${INSTALLCMD} -m 644 doc/ping_pong.1.html $(DESTDIR)$(docdir)/ctdb; fi if [ ! -f $(DESTDIR)$(etcdir)/ctdb/notify.sh ];then ${INSTALLCMD} -m 755 config/notify.sh $(DESTDIR)$(etcdir)/ctdb; fi - if [ ! -f $(DESTDIR)$(etcdir)/ctdb/notify.d/README ];then ${INSTALLCMD} -m 755 config/notify.d.README $(DESTDIR)$(etcdir)/ctdb/notify.d/README ; fi ${INSTALLCMD} -m 755 config/debug-hung-script.sh $(DESTDIR)$(etcdir)/ctdb if [ ! -f $(DESTDIR)$(etcdir)/ctdb/ctdb-crash-cleanup.sh ];then ${INSTALLCMD} -m 755 config/ctdb-crash-cleanup.sh $(DESTDIR)$(etcdir)/ctdb; fi if [ ! -f $(DESTDIR)$(etcdir)/ctdb/gcore_trace.sh ];then ${INSTALLCMD} -m 755 config/gcore_trace.sh $(DESTDIR)$(etcdir)/ctdb; fi diff --git a/NEWS b/NEWS index 8056d18..b589e4e 100644 --- a/NEWS +++ b/NEWS @@ -18,10 +18,17 @@ Important bug fixes (e.g. under high load). This simple fix will stop an exit from the retry loop on any error. +* When updating flags on all nodes, use the correct updated flags. This + should avoid wrong flag change messages in the logs. + +* The recovery daemon will not ban other nodes if the current node + is banned. + Important internal changes -------------------------- -* +* The recovery daemon on stopped or banned node will stop participating in any + cluster activity. Changes in CTDB 2.2 diff --git a/common/system_common.c b/common/system_common.c index 6ee615f..01ac2bf 100644 --- a/common/system_common.c +++ b/common/system_common.c @@ -50,7 +50,7 @@ bool ctdb_sys_have_ip(ctdb_sock_addr *_addr) int ret; ctdb_sock_addr __addr = *_addr; ctdb_sock_addr *addr = &__addr; - socklen_t addrlen; + socklen_t addrlen = 0; switch (addr->sa.sa_family) { case AF_INET: diff --git a/doc/ctdbd.1.xml b/doc/ctdbd.1.xml index 5b803b6..dd5e732 100644 --- a/doc/ctdbd.1.xml +++ b/doc/ctdbd.1.xml @@ -777,7 +777,8 @@ <para> When set to 0, this disables BANNING completely in the cluster and thus nodes can not get banned, even it they break. Don't set to 0 unless you - know what you are doing. + know what you are doing. You should set this to the same value on + all nodes to avoid unexpected behaviour. </para> </refsect2> diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in index b8627cd..4d57c03 100644 --- a/packaging/RPM/ctdb.spec.in +++ b/packaging/RPM/ctdb.spec.in @@ -24,13 +24,16 @@ Provides: ctdb = %{version} Prefix: /usr BuildRoot: %{_tmppath}/%{name}-%{version}-root -# Always use the bundled versions of these libraries. -%define with_included_talloc 1 -%define with_included_tdb 1 -%define with_included_tevent 1 +# Allow build with system libraries +# To enable, run rpmbuild with, +# "--with system_talloc" +# "--with system_tdb" +# "--with system_tevent" +%define with_included_talloc %{?_with_system_talloc: 0} %{?!_with_system_talloc: 1} +%define with_included_tdb %{?_with_system_tdb: 0} %{?!_with_system_tdb: 1} +%define with_included_tevent %{?_with_system_tevent: 0} %{?!_with_system_tevent: 1} -# If the above options are changed then mandate minimum system -# versions. +# Required minimum library versions when building with system libraries %define libtalloc_version 2.0.8 %define libtdb_version 1.2.11 %define libtevent_version 0.9.18 @@ -77,7 +80,7 @@ export CC ## always run autogen.sh ./autogen.sh -CFLAGS="$RPM_OPT_FLAGS $EXTRA -O0 -D_GNU_SOURCE" ./configure \ +CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ %if %with_included_talloc --with-included-talloc \ %endif @@ -112,8 +115,8 @@ make DESTDIR=$RPM_BUILD_ROOT docdir=%{_docdir} install install_tests install -m644 config/ctdb.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ctdb install -m755 config/ctdb.init $RPM_BUILD_ROOT%{initdir}/ctdb -mkdir -p $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin -install -m755 tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin +cp config/events.d/README README.eventscripts +cp config/notify.d.README README.notify.d # Remove "*.old" files find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \; @@ -134,20 +137,15 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/ctdb/debug-hung-script.sh %config(noreplace) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh %config(noreplace) %{_sysconfdir}/ctdb/gcore_trace.sh -%config(noreplace) %{_sysconfdir}/ctdb/functions %attr(755,root,root) %{initdir}/ctdb %attr(755,root,root) %{_sysconfdir}/ctdb/notify.d -%{_docdir}/ctdb/README -%{_docdir}/ctdb/COPYING -%{_docdir}/ctdb/README.eventscripts -%{_docdir}/ctdb/recovery-process.txt -%{_docdir}/ctdb/ctdb.1.html -%{_docdir}/ctdb/ctdbd.1.html -%{_docdir}/ctdb/onnode.1.html -%{_docdir}/ctdb/ltdbtool.1.html -%{_docdir}/ctdb/ping_pong.1.html +%doc README COPYING NEWS +%doc README.eventscripts README.notify.d +%doc doc/recovery-process.txt +%doc doc/*.html %{_sysconfdir}/sudoers.d/ctdb +%{_sysconfdir}/ctdb/functions %{_sysconfdir}/ctdb/events.d/00.ctdb %{_sysconfdir}/ctdb/events.d/01.reclock %{_sysconfdir}/ctdb/events.d/10.interface @@ -172,7 +170,6 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/ctdb/nfs-rpc-checks.d/40.mountd.check %config(noreplace) %{_sysconfdir}/ctdb/nfs-rpc-checks.d/50.rquotad.check %{_sysconfdir}/ctdb/statd-callout -%{_sysconfdir}/ctdb/notify.d/README %{_sbindir}/ctdbd %{_bindir}/ctdb %{_bindir}/ctdb_lock_helper @@ -188,7 +185,6 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/ping_pong.1.gz %{_libdir}/pkgconfig/ctdb.pc -%{_docdir}/ctdb/tests/bin/ctdb_transaction %package devel Summary: CTDB development libraries diff --git a/server/ctdb_lock.c b/server/ctdb_lock.c index 77b4da8..d699e85 100644 --- a/server/ctdb_lock.c +++ b/server/ctdb_lock.c @@ -422,7 +422,7 @@ static void ctdb_lock_handler(struct tevent_context *ev, void *private_data) { struct lock_context *lock_ctx; - TALLOC_CTX *tmp_ctx; + TALLOC_CTX *tmp_ctx = NULL; char c; bool locked; double t; diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c index b6b2f6b..310c334 100644 --- a/server/ctdb_recoverd.c +++ b/server/ctdb_recoverd.c @@ -3231,7 +3231,6 @@ static int check_recovery_lock(struct ctdb_context *ctdb) /* make sure we die when our parent dies */ while (ctdb_kill(ctdb, parent, 0) == 0 || errno != ESRCH) { sleep(5); - write(state->fd[1], &cc, 1); } _exit(0); } diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c index 679177e..401a8f3 100644 --- a/server/ctdb_takeover.c +++ b/server/ctdb_takeover.c @@ -1899,6 +1899,7 @@ static bool lcp2_failback_candidate(struct ctdb_context *ctdb, struct ctdb_public_ip_list *tmp_ip; /* Find an IP and destination node that best reduces imbalance. */ + srcimbl = 0; minip = NULL; minsrcimbl = 0; mindstnode = -1; diff --git a/tests/src/ctdb_bench.c b/tests/src/ctdb_bench.c index 8463200..3323589 100644 --- a/tests/src/ctdb_bench.c +++ b/tests/src/ctdb_bench.c @@ -222,6 +222,9 @@ int main(int argc, const char *argv[]) /* initialise ctdb */ ctdb = ctdb_cmdline_client(ev, timeval_current_ofs(3, 0)); + if (ctdb == NULL) { + exit(1); + } /* attach to a specific database */ ctdb_db = ctdb_attach(ctdb, timeval_current_ofs(2, 0), "test.tdb", diff --git a/tests/src/ctdb_fetch_readonly_loop.c b/tests/src/ctdb_fetch_readonly_loop.c index d3cc72c..5944fb7 100644 --- a/tests/src/ctdb_fetch_readonly_loop.c +++ b/tests/src/ctdb_fetch_readonly_loop.c @@ -107,6 +107,9 @@ int main(int argc, const char *argv[]) ev = event_context_init(NULL); ctdb = ctdb_cmdline_client(ev, timeval_current_ofs(5, 0)); + if (ctdb == NULL) { + exit(1); + } key.dptr = discard_const(TESTKEY); key.dsize = strlen(TESTKEY); diff --git a/tests/src/ctdb_trackingdb_test.c b/tests/src/ctdb_trackingdb_test.c index d8525d5..ee473c0 100644 --- a/tests/src/ctdb_trackingdb_test.c +++ b/tests/src/ctdb_trackingdb_test.c @@ -125,6 +125,9 @@ int main(int argc, const char *argv[]) ev = event_context_init(NULL); ctdb = ctdb_cmdline_client(ev, timeval_current_ofs(5, 0)); + if (ctdb == NULL) { + exit(1); + } trackdb_test(ctdb); diff --git a/tests/src/ctdb_traverse.c b/tests/src/ctdb_traverse.c index d5eb304..5b37ed9 100644 --- a/tests/src/ctdb_traverse.c +++ b/tests/src/ctdb_traverse.c @@ -89,6 +89,9 @@ int main(int argc, const char *argv[]) ev = event_context_init(NULL); ctdb = ctdb_cmdline_client(ev, timeval_current_ofs(3, 0)); + if (ctdb == NULL) { + exit(1); + } /* attach to a specific database */ ctdb_db = ctdb_attach(ctdb, timeval_current_ofs(2, 0), dbname, false, 0); diff --git a/tests/src/ctdb_update_record.c b/tests/src/ctdb_update_record.c index 260f86e..6eff1d0 100644 --- a/tests/src/ctdb_update_record.c +++ b/tests/src/ctdb_update_record.c @@ -128,6 +128,9 @@ int main(int argc, const char *argv[]) ev = event_context_init(NULL); ctdb = ctdb_cmdline_client(ev, timeval_current_ofs(5, 0)); + if (ctdb == NULL) { + exit(1); + } /* attach to a specific database */ ctdb_db = ctdb_attach(ctdb, timeval_current_ofs(5, 0), "test.tdb", false, 0); diff --git a/tests/src/ctdb_update_record_persistent.c b/tests/src/ctdb_update_record_persistent.c index 07b2c48..8eb33e9 100644 --- a/tests/src/ctdb_update_record_persistent.c +++ b/tests/src/ctdb_update_record_persistent.c @@ -98,6 +98,9 @@ int main(int argc, const char *argv[]) ev = event_context_init(NULL); ctdb = ctdb_cmdline_client(ev, timeval_current_ofs(5, 0)); + if (ctdb == NULL) { + exit(1); + } if (test_db == NULL) { fprintf(stderr, "You must specify the database\n"); diff --git a/utils/ping_pong/ping_pong.c b/utils/ping_pong/ping_pong.c index 0a49d66..16f58d8 100644 --- a/utils/ping_pong/ping_pong.c +++ b/utils/ping_pong/ping_pong.c @@ -237,6 +237,10 @@ int main(int argc, char *argv[]) fname = argv[0]; num_locks = atoi(argv[1]); + if (num_locks <= 0) { + printf("num_locks should be > 0\n"); + exit(1); + } fd = open(fname, O_CREAT|O_RDWR, 0600); if (fd == -1) exit(1); -- CTDB repository