[SCM] CTDB repository - branch 2.5 updated - ctdb-2.5.4-103-g46069f5

2015-03-05 Thread Amitay Isaacs
The branch, 2.5 has been updated
   via  46069f56c93d986e173e0e0fba7e5162c7271609 (commit)
   via  730b06ea1f6eb1066bb6b8ac17a348c8570a9d2e (commit)
   via  505fda403fc1c1e440ae0edb1cf3e67ad8ed3a50 (commit)
   via  1d1711e940397d21e6803bce627f2b57c22c6b92 (commit)
   via  e5d543ad2576b3a0a7848e92082ac46f57012082 (commit)
   via  315df0148bb90a9641e4f55ec63c26cee9d062e7 (commit)
   via  46d5a7dcbb64e2055d8c427d646f12a878c89c07 (commit)
   via  86409b0888a6770478cb716e0aef187d6c559c3e (commit)
   via  5224e55f64f904cd1923d935251c6d74b7da6413 (commit)
   via  d2fcd86c64e3e74453784a2a203c8ea2449ce85b (commit)
   via  d46a2f8b371720a6b0c2afed27b0cb333c58c132 (commit)
   via  2234f7cf47018c3bb241e051d20617ffbfc6a198 (commit)
   via  e9dd5b649a25691a0771ed094650a945fecd4f54 (commit)
   via  d444570bfa7720c6413dee03556230f19fbf4623 (commit)
   via  67afd68f025852e5da5a60c25e09be8233ecba73 (commit)
  from  ccddcec6258f511511abe6861fe8347360d8a066 (commit)

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


- Log -
commit 46069f56c93d986e173e0e0fba7e5162c7271609
Author: Martin Schwenke 
Date:   Mon Feb 9 12:04:41 2015 +1100

Change default debug level to NOTICE (2)

This was true for the daemon until commit
b4589b954e1090a934fafd3f8e3c2cf1ed785c61.

Defaulting to ERR in the ctdb CLI tool encourages logging notices at
ERR level, so default to NOTICE instead.

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

(Imported from commit 664d62b61108657d3011cf0bcbe260533c97676f)

commit 730b06ea1f6eb1066bb6b8ac17a348c8570a9d2e
Author: Martin Schwenke 
Date:   Fri Mar 6 11:36:18 2015 +1100

tests: Check for readable, not executable, script

Scripts in eventscript unit tests are run under an explicitly
specified shell so they do not need to be executable.  Checking that
the script is executable breaks on scripts that are installed without
the execute bit set, such as disabled eventscripts.

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

Autobuild-User(master): Amitay Isaacs 
Autobuild-Date(master): Fri Mar  6 04:40:07 CET 2015 on sn-devel-104

(Imported from commit f6efe0c5c2378f477e528ac9c6571a732aa2c49b)

commit 505fda403fc1c1e440ae0edb1cf3e67ad8ed3a50
Author: Amitay Isaacs 
Date:   Wed Mar 4 15:36:05 2015 +1100

locking: Back-off from logging every 10 seconds

If ctdb_lock_helper cannot get a lock within 10 seconds, ctdb daemon
logs a message and invokes an external debug script.  This is repeated
every 10 seconds.

In case of a contention or on a loaded system, there can be multiple
ctdb_lock_helper processes waiting to get lock on record(s).  For each
lock request taking longer, ctdb daemon will flood the log every
10 seconds.  Instead of logging aggressively every 10 seconds, relax
logging to every 100s and 1000s if the elapsed time has exceeded 100s
and 1000s respectively.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Michael Adam 

Autobuild-User(master): Michael Adam 
Autobuild-Date(master): Thu Mar  5 12:06:44 CET 2015 on sn-devel-104

(Imported from commit 3f97be6d0fc166ccc3c97b7f71a01a4f9adb5ddd)

commit 1d1711e940397d21e6803bce627f2b57c22c6b92
Author: Amitay Isaacs 
Date:   Thu Mar 5 13:11:46 2015 +1100

tests: Correctly cascade test failures from the end of pipes

Some eventscript unit test failures get lost because _passed=false is
set in the tail of a pipe.  Add a new function test_fail() and call it
when necessary to ensure the value of _passed is set correctly.

Signed-off-by: Amitay Isaacs 
Pair-programmed-by: Martin Schwenke 
Reviewed-by: Martin Schwenke 

Autobuild-User(master): Martin Schwenke 
Autobuild-Date(master): Thu Mar  5 07:16:54 CET 2015 on sn-devel-104

(Imported from commit 956d1dbfd91615032de337b0d84b40c16657b8c1)

commit e5d543ad2576b3a0a7848e92082ac46f57012082
Author: Amitay Isaacs 
Date:   Thu Mar 5 13:10:32 2015 +1100

scripts: Add a 'rm' stub so statd-callout tests work correctly

statd-callout tries to remove global files from /var/lib/nfs/statd and
this causes errors in tests.  Add an rm stub that ignores attempts to
remove these files but invokes /bin/rm for anything else.

Signed-off-by: Amitay Isaacs 
Pair-programmed-by: Martin Schwenke 
Reviewed-by: Martin Schwenke 

(Imported from commit 956e51707d7ddcff060352f54d11ff42bdcc51ef)

commit 315df0148bb90a9641e4f55ec63c26cee9d062e7
Author: Martin Schwenke 
Date:   Fri Feb 13 15:42:20 2015 +1100

scripts: Remove unused function nfs_statd_update()

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

(Imported from commit 50ddc2c35643389c2f249c6ad4496ab73a1bfc99)

commit 46d5a7d

[SCM] Samba Shared Repository - branch master updated

2015-03-05 Thread Andrew Bartlett
The branch, master has been updated
   via  7004ccc Implement TestCase.assertIsNotNone for python < 2.7.
   via  a6b2110 Implement TestCase.assertIn for older versions of Python.
   via  d459096 Implement assertIsNone for Python < 2.7.
   via  1988e11 Handle skips when running on python2.6.
   via  02da1b3 Remove another call to addUnexpectedSuccess with too many 
arguments.
   via  b53a6df Run cleanup after tearDown, for consistency with Python >= 
2.7.
   via  5d4a938 TestCase.addUnexpectedSuccess doesn't take an error.
   via  0acb1d4 Use samba TestCase so we get all compatibility functions on 
Python < 2.7.
   via  fe231be Provide TestCase.assertIsInstance for python < 2.7.
   via  cef4861 Use Samba TestCase class, as the python 2.6 one doesn't 
have assertIs, assertIsInstance or addCleanup.
   via  9a4a7b9 Add replacement addCleanup.
   via  e3a9feb Add custom implementations of TestCase.assertIs and 
TestCase.assertIsNot, for Python2.6.
   via  85c1dc9 Fix use of TestCase.skipTest on python2.6 now that we no 
longer use testtools.
   via  bd13405 Build python-ntdb bindings if ntdb was found but 
python-ntdb was not.
   via  b0cba79 Drop support for failfast mode, rather than adding support 
for it everywhere.
   via  495e980 Fix use of iso8601.Utc.
   via  b2af53d Set failfast property for test reporters that need it.
   via  2e2c05c Remove 'external' python module support code - use the 
third_party directory instead.
   via  889d0ad Remove bundled but unused mimeparse.
   via  f1d7443 Remove unused bundled python-extras module.
   via  8918481 Remove bundled testtools.
   via  da04eb9 Remove bundled subunit.
   via  e59f260 Remove unnecessary python path updates for bundled 
subunit/testtools.
   via  850b393 Support using third party iso8601 module if system doesn't 
provide one.
   via  13bd83a Bundle pyiso8601 for iso8601 time/date manipulation.
   via  039fa93 Import UTC definition from utc8601 module.
   via  8c6d85b subunithelper: Fix progress support.
   via  940c277 Rename TestSkipped to Skiptest, consistent with Python 2.7.
   via  7cb7d4b Avoid importing TestCase and TestSkipped from testtools.
   via  80e387a Use iso8601 from the system, rather than the one bundled 
with subunit.
   via  6363a2d format-subunit: Remove import of unnecessary third party 
modules testtools and subunit.
   via  77e7024 filter-subunit: Remove import of unnecessary third party 
modules testtools and subunit.
   via  f52e895 tests/sam: Remove unnecessary calls for third party module 
imports.
   via  f980efee show_test_time: Use system subunit.
   via  6ea461f test_samba3dump: Use Samba subunit emitter.
   via  ef2c6d0 test_duplicate_symbol: Use Samba subunit emitter.
   via  8bbc343 Set default testRunner rather than requiring the user pass 
it in.
   via  cc4f537 Add basic tap2subunit converter, rather than relying on the 
one from subunit-tools.
   via  1341e64 Inline outputting of subunit in libtorture.
   via  ee0b548 Fix handling of unexpected failures in subunithelper.
   via  3f88e97 Use samba.subunit in selftest.subunithelper, except for 
iso8601.
   via  8492285 Add RemoteTestCase and RemoteError to samba.subunit.
   via  ed65e04 Use samba.subunit in selftest/selftest.py.
   via  8487f4a Use Samba-only subunit module in selftest/tests/.
   via  9a1a344 Fix copyright headers for python/samba/subunit.
   via  de60dfd Use samba.subunit.run to run subunit tests.
   via  4dae2d6 subunitrun: Update instructions for running subunit tests.
   via  44a561f subunitrun: Use new samba.subunit.run module.
   via  3f1ecfd selftest/tests/*.py: remove use of testtools.
   via  daf63fe Add simple subunit runner outputting subunit v1.
  from  f6efe0c ctdb-tests: Check for readable, not executable, script

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


- Log -
commit 7004ccc441f700692b95dba89f8d3c4f30f2ca18
Author: Jelmer Vernooij 
Date:   Thu Feb 5 22:04:44 2015 +0100

Implement TestCase.assertIsNotNone for python < 2.7.

Change-Id: Ieaefdc77495e27bad791075d985a70908e9be1ad
Signed-off-by: Jelmer Vernooij 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Fri Mar  6 07:11:43 CET 2015 on sn-devel-104

commit a6b2110abd061b0e03d8b684e5a2edd12fbc1c64
Author: Jelmer Vernooij 
Date:   Thu Feb 5 19:57:26 2015 +0100

Implement TestCase.assertIn for older versions of Python.

Change-Id: I17d855166b439c0bd9344a17a454ea5bc6e057aa
Signed-off-by: Jelmer Vernooij 
Reviewed-by: Andrew Bartlett 

commit d459096e7c35f7bc7a83fd69cf0f70fc5ae4e15f
Author: Jelmer Vernooij 
Date:   Thu Feb 5 10:25:53 2015 +0100

Implement assertIsNone for Python < 2.7.

Change

[SCM] Samba Shared Repository - branch master updated

2015-03-05 Thread Amitay Isaacs
The branch, master has been updated
   via  f6efe0c ctdb-tests: Check for readable, not executable, script
  from  bccf5c9 perfcount: Fix CID 1035494 Out-of-bounds read

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


- Log -
commit f6efe0c5c2378f477e528ac9c6571a732aa2c49b
Author: Martin Schwenke 
Date:   Fri Mar 6 11:36:18 2015 +1100

ctdb-tests: Check for readable, not executable, script

Scripts in eventscript unit tests are run under an explicitly
specified shell so they do not need to be executable.  Checking that
the script is executable breaks on scripts that are installed without
the execute bit set, such as disabled eventscripts.

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

Autobuild-User(master): Amitay Isaacs 
Autobuild-Date(master): Fri Mar  6 04:40:07 CET 2015 on sn-devel-104

---

Summary of changes:
 ctdb/tests/eventscripts/scripts/local.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/tests/eventscripts/scripts/local.sh 
b/ctdb/tests/eventscripts/scripts/local.sh
index ed99985..219bbee 100644
--- a/ctdb/tests/eventscripts/scripts/local.sh
+++ b/ctdb/tests/eventscripts/scripts/local.sh
@@ -1099,7 +1099,7 @@ define_test ()
script_dir="${CTDB_BASE}"
 esac
 
-[ -x "${script_dir}/${script}" ] || \
+[ -r "${script_dir}/${script}" ] || \
die "Internal error - unable to find script \"${script_dir}/${script}\""
 
 printf "%-17s %-10s %-4s - %s\n\n" "$script" "$event" "$_num" "$desc"


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-03-05 Thread Ira Cooper
The branch, master has been updated
   via  bccf5c9 perfcount: Fix CID 1035494 Out-of-bounds read
   via  819d4b4 perfcount: Fix CID 1035493 Out-of-bounds read
   via  bd3b2c3 perfcount: Fix CID 1035492 Out-of-bounds read
   via  5968310 perfcount: Fix CID 1274043 Division or modulo by zero
  from  fb86aa8 printing: increse log level for unreachable cups servers

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


- Log -
commit bccf5c9a7bc18b859f262307ab6a2b6edaca0588
Author: Volker Lendecke 
Date:   Thu Mar 5 11:12:38 2015 +0100

perfcount: Fix CID 1035494 Out-of-bounds read

Signed-off-by: Volker Lendecke 
Reviewed-by: Ira Cooper 

Autobuild-User(master): Ira Cooper 
Autobuild-Date(master): Thu Mar  5 18:28:44 CET 2015 on sn-devel-104

commit 819d4b4bcd71ea82930365df33cc4b76a4835130
Author: Volker Lendecke 
Date:   Thu Mar 5 11:11:59 2015 +0100

perfcount: Fix CID 1035493 Out-of-bounds read

Signed-off-by: Volker Lendecke 
Reviewed-by: Ira Cooper 

commit bd3b2c3d9b09f385a74ee80b1d87b1a71428c162
Author: Volker Lendecke 
Date:   Thu Mar 5 11:10:35 2015 +0100

perfcount: Fix CID 1035492 Out-of-bounds read

Signed-off-by: Volker Lendecke 
Reviewed-by: Ira Cooper 

commit 5968310060ddc298835a8ee720ae7fe68aece1b9
Author: Volker Lendecke 
Date:   Thu Mar 5 11:07:56 2015 +0100

perfcount: Fix CID 1274043 Division or modulo by zero

Signed-off-by: Volker Lendecke 
Reviewed-by: Ira Cooper 

---

Summary of changes:
 source3/modules/perfcount_test.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/perfcount_test.c b/source3/modules/perfcount_test.c
index c0b5336..0dc073c 100644
--- a/source3/modules/perfcount_test.c
+++ b/source3/modules/perfcount_test.c
@@ -69,7 +69,7 @@ static void perfcount_test_add_counters(struct 
perfcount_test_context *ctxt)
 
found = false;
 
-   if (ptc->op > MAX_OP)
+   if (ptc->op >= MAX_OP)
continue;
 
for (head = g_list[ptc->op]; head != NULL; head = head->next) {
@@ -132,13 +132,13 @@ static const char *smb_subop_name(int op, int subop)
 {
/* trans */
if (op == 0x25) {
-   if (subop > sizeof(trans_subop_table) /
+   if (subop >= sizeof(trans_subop_table) /
sizeof(trans_subop_table[0])) {
return "unknown";
}
return trans_subop_table[subop];
} else if (op == 0x32) {
-   if (subop > sizeof(trans2_subop_table) /
+   if (subop >= sizeof(trans2_subop_table) /
sizeof(trans2_subop_table[0])) {
return "unknown";
}
@@ -172,6 +172,10 @@ static void perfcount_test_dump_counters(void)
count_mod = lp_parm_int(0, PARM_PC_TEST_TYPE, PARM_DUMPON_COUNT,
PARM_DUMPON_COUNT_DEFAULT);
 
+   if (count_mod == 0) {
+   return;
+   }
+
if ((count++ % count_mod) != 0)
return;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-03-05 Thread Björn Jacke
The branch, master has been updated
   via  fb86aa8 printing: increse log level for unreachable cups servers
  from  3f97be6 ctdb-locking: Back-off from logging every 10 seconds

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


- Log -
commit fb86aa86ae040dfa8009d4c13f7712fede8bd063
Author: Björn Jacke 
Date:   Wed Mar 4 10:15:10 2015 +0100

printing: increse log level for unreachable cups servers

this annoying messages hitting the logs very often on non-cups servers by
default in log level 0 otherwise.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11133

Signed-off-by: Bjoern Jacke 
Reviewed-by: David Disseldorp 

Autobuild-User(master): Björn Jacke 
Autobuild-Date(master): Thu Mar  5 14:38:42 CET 2015 on sn-devel-104

---

Summary of changes:
 source3/printing/print_cups.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index 561e07d..fd78a7f 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -148,7 +148,7 @@ static http_t *cups_connect(TALLOC_CTX *frame)
 alarm(0);
 
if (http == NULL) {
-   DEBUG(0,("Unable to connect to CUPS server %s:%d - %s\n",
+   DEBUG(3,("Unable to connect to CUPS server %s:%d - %s\n",
 server, port, strerror(errno)));
}
 
@@ -526,7 +526,7 @@ static void cups_async_callback(struct tevent_context 
*event_ctx,
}
 
if (!NT_STATUS_IS_OK(pcap_data.status)) {
-   DEBUG(0,("failed to retrieve printer list: %s\n",
+   DEBUG(3,("failed to retrieve printer list: %s\n",
 nt_errstr(pcap_data.status)));
goto err_out;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-03-05 Thread Michael Adam
The branch, master has been updated
   via  3f97be6 ctdb-locking: Back-off from logging every 10 seconds
  from  956d1db ctdb-tests: Correctly cascade test failures from the end of 
pipes

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


- Log -
commit 3f97be6d0fc166ccc3c97b7f71a01a4f9adb5ddd
Author: Amitay Isaacs 
Date:   Wed Mar 4 15:36:05 2015 +1100

ctdb-locking: Back-off from logging every 10 seconds

If ctdb_lock_helper cannot get a lock within 10 seconds, ctdb daemon
logs a message and invokes an external debug script.  This is repeated
every 10 seconds.

In case of a contention or on a loaded system, there can be multiple
ctdb_lock_helper processes waiting to get lock on record(s).  For each
lock request taking longer, ctdb daemon will flood the log every
10 seconds.  Instead of logging aggressively every 10 seconds, relax
logging to every 100s and 1000s if the elapsed time has exceeded 100s
and 1000s respectively.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Michael Adam 

Autobuild-User(master): Michael Adam 
Autobuild-Date(master): Thu Mar  5 12:06:44 CET 2015 on sn-devel-104

---

Summary of changes:
 ctdb/server/ctdb_lock.c | 20 
 1 file changed, 16 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index 7959d40..c5a2b98 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -486,6 +486,8 @@ static void ctdb_lock_timeout_handler(struct tevent_context 
*ev,
struct lock_context *lock_ctx;
struct ctdb_context *ctdb;
pid_t pid;
+   double elapsed_time;
+   int new_timer;
 
lock_ctx = talloc_get_type_abort(private_data, struct lock_context);
ctdb = lock_ctx->ctdb;
@@ -495,16 +497,17 @@ static void ctdb_lock_timeout_handler(struct 
tevent_context *ev,
lock_ctx->ttimer = NULL;
return;
}
+
+   elapsed_time = timeval_elapsed(&lock_ctx->start_time);
if (lock_ctx->ctdb_db) {
DEBUG(DEBUG_WARNING,
  ("Unable to get %s lock on database %s for %.0lf 
seconds\n",
   (lock_ctx->type == LOCK_RECORD ? "RECORD" : "DB"),
-  lock_ctx->ctdb_db->db_name,
-  timeval_elapsed(&lock_ctx->start_time)));
+  lock_ctx->ctdb_db->db_name, elapsed_time));
} else {
DEBUG(DEBUG_WARNING,
  ("Unable to get ALLDB locks for %.0lf seconds\n",
-  timeval_elapsed(&lock_ctx->start_time)));
+  elapsed_time));
}
 
/* Fire a child process to find the blocking process. */
@@ -529,11 +532,20 @@ static void ctdb_lock_timeout_handler(struct 
tevent_context *ev,
   " Unable to setup lock debugging - no memory?\n"));
}
 
+   /* Back-off logging if lock is not obtained for a long time */
+   if (elapsed_time < 100.0) {
+   new_timer = 10;
+   } else if (elapsed_time < 1000.0) {
+   new_timer = 100;
+   } else {
+   new_timer = 1000;
+   }
+
/* reset the timeout timer */
// talloc_free(lock_ctx->ttimer);
lock_ctx->ttimer = tevent_add_timer(ctdb->ev,
lock_ctx,
-   timeval_current_ofs(10, 0),
+   timeval_current_ofs(new_timer, 0),
ctdb_lock_timeout_handler,
(void *)lock_ctx);
 }


-- 
Samba Shared Repository