autobuild: intermittent test failure detected

2013-05-28 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2013-05-28-0934/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2013-05-28-0934/samba3.stderr
   http://git.samba.org/autobuild.flakey/2013-05-28-0934/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2013-05-28-0934/samba.stderr
   http://git.samba.org/autobuild.flakey/2013-05-28-0934/samba.stdout
  
The top commit at the time of the failure was:

commit 4e76a77f622f1fa30a8ae1e011d87fc9754e1b85
Author: David Disseldorp 
Date:   Mon May 27 17:57:01 2013 +0200

waf: build position independent executables

This patch re-instates support for building Position Independent
Executables using the '-fPIE' and '-pie' compiler and linker flags
respectively.

PIE builds are enabled by default, and can be explicitly disabled using
the '--without-pie' configure argument.

Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Tue May 28 02:56:36 CEST 2013 on sn-devel-104


[SCM] CTDB repository - branch master updated - ctdb-2.1-218-g1b5968f

2013-05-28 Thread Amitay Isaacs
The branch, master has been updated
   via  1b5968f6be084590667f4f15ff3bef13ed9a2973 (commit)
   via  25a6fd784cde96f3d20a79f70b5589b5c4aca675 (commit)
   via  80b3cf2c652c6098390cdd0dbb3edc648f7df487 (commit)
   via  85e11b9b13b3add88c1b8957be51793cc1db4f2d (commit)
   via  194f7a0dec26d693a5f3e6734b1c82f61f8e4d19 (commit)
   via  11af486754bb04899e3dc544157bf70530e66cd1 (commit)
   via  f2ef3510407fbad29908195c58e4160d5a81e8a4 (commit)
   via  0ca7a98ffef50cbd06849cfbf65fb4a3d668b7bd (commit)
   via  b2654853ce9b7c18c5874b080bc94d3118078a5d (commit)
   via  b2b572e9049c7138bd223226475bef8fe3e01f10 (commit)
   via  c9e36f596c63c9af7f80d7cb8d7a5c6dcca4860a (commit)
  from  e5a5ab53173d9aa4190ddf68c4ae316d4473eb56 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master


- Log -
commit 1b5968f6be084590667f4f15ff3bef13ed9a2973
Author: Martin Schwenke 
Date:   Tue May 28 12:01:57 2013 +1000

eventscripts: Fix statd-callout update handling

60.nfs and 60.ganesha touch $statd_update_trigger every time they're
run.  This stops the statd-callout updates from ever being called.

Make this logic self-contained and move it to new function
nfs_statd_update() in the functions file.  Call this in 60.nfs and
60.ganesha with the appropriate update period as the only argument.

Signed-off-by: Martin Schwenke 
Reported-by: Poornima Gupte 

commit 25a6fd784cde96f3d20a79f70b5589b5c4aca675
Author: Martin Schwenke 
Date:   Tue May 28 11:26:17 2013 +1000

tests/integration: Improve debug output for unhealthy cluster after restart

Signed-off-by: Martin Schwenke 

commit 80b3cf2c652c6098390cdd0dbb3edc648f7df487
Author: Martin Schwenke 
Date:   Mon May 27 15:16:28 2013 +1000

tests/scripts: Delete unused $rows and $ww variables from run_tests

Signed-off-by: Martin Schwenke 

commit 85e11b9b13b3add88c1b8957be51793cc1db4f2d
Author: Martin Schwenke 
Date:   Tue May 28 14:19:32 2013 +1000

packaging: Create separate package for pcp pmda

To build ctdb-pcp-pmda package, run packaging/RPM/makerpms.sh script with
"--with pmda" option.

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

commit 194f7a0dec26d693a5f3e6734b1c82f61f8e4d19
Author: Martin Schwenke 
Date:   Tue May 28 14:16:02 2013 +1000

build: Separate autoconf macros for pmda

The pmda stuff is no longer built by default even if the headers are
available.  To build, run "configure --enable-pmda".

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

commit 11af486754bb04899e3dc544157bf70530e66cd1
Author: Martin Schwenke 
Date:   Tue May 28 14:16:25 2013 +1000

build: Fix install paths for pcp pmda

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

commit f2ef3510407fbad29908195c58e4160d5a81e8a4
Author: Martin Schwenke 
Date:   Mon May 27 14:43:03 2013 +1000

packaging: makerpms.sh can take multiple arguments for rpmbuild

Signed-off-by: Martin Schwenke 

commit 0ca7a98ffef50cbd06849cfbf65fb4a3d668b7bd
Author: Martin Schwenke 
Date:   Mon May 27 12:56:41 2013 +1000

eventscripts: Stop NAT gateway's delete_all() from polluting the log

Every time a node that wasn't the NAT gateway master gets reconfigured
something like this appears in the log:

  ctdbd: 11.natgw: Failed to del 10.0.1.139 on dev eth1

Since this usually fails it is better to mute the error than to have
it pollute the log.

Signed-off-by: Martin Schwenke 

commit b2654853ce9b7c18c5874b080bc94d3118078a5d
Author: Martin Schwenke 
Date:   Mon May 27 11:29:42 2013 +1000

recoverd: Backward compatibility for nodes without IPREALLOCATED control

Consider the case of upgrading a cluster node by node, where some
nodes are still running older versions of CTDB without the
IPREALLOCATED control.  If a "new" node takes over as recovery master
and a failover occurs, then it will attempt to send IPREALLOCATED
controls to all nodes.  The "old" nodes will fail in a fairly
nondescript way (result == -1).

To try to handle this situation, fall back to the EVENTSCRIPT control
to handle "ipreallocated".  Only do this on the failed nodes.
However, do not do this on nodes that timed out (they've probably
implemented the control and we should call the regular fail_callback
to get those nodes banned) or for stopped nodes (since they can't
actually run the "ipreallocated" event via the EVENTSCRIPT control).

Signed-off-by: Martin Schwenke 

commit b2b572e9049c7138bd223226475bef8fe3e01f10
Author: Martin Schwenke 
Date:   Sat May 25 19:57:24 2013 +1000

scripts: Provide mktemp function for platforms without mktemp command

This is needed for AIX and possibly others.

Also provide a ch

[SCM] Samba Shared Repository - branch master updated

2013-05-28 Thread Andrew Bartlett
The branch, master has been updated
   via  3bd686c tdb: fix logging of offets and lengths.
  from  5a633dd s4-dns: Print/Set minimumTTL value in SOA record

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


- Log -
commit 3bd686c5ad4756af1033ac14ba09a40156cc6d47
Author: Rusty Russell 
Date:   Tue May 28 16:53:56 2013 +0930

tdb: fix logging of offets and lengths.

We can have offsets > 2G, so use unsigned values.  Fixes other prints to be
native types rather than casts, too.

Signed-off-by: Rusty Russell 

Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Tue May 28 11:22:14 CEST 2013 on sn-devel-104

---

Summary of changes:
 lib/tdb/common/check.c   |   22 +++---
 lib/tdb/common/dump.c|9 -
 lib/tdb/common/freelist.c|8 
 lib/tdb/common/io.c  |   36 ++--
 lib/tdb/common/lock.c|8 
 lib/tdb/common/summary.c |2 +-
 lib/tdb/common/transaction.c |8 
 7 files changed, 46 insertions(+), 47 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/check.c b/lib/tdb/common/check.c
index dc38102..9f9d870 100644
--- a/lib/tdb/common/check.c
+++ b/lib/tdb/common/check.c
@@ -76,19 +76,19 @@ static bool tdb_check_record(struct tdb_context *tdb,
/* Check rec->next: 0 or points to record offset, aligned. */
if (rec->next > 0 && rec->next < TDB_DATA_START(tdb->hash_size)){
TDB_LOG((tdb, TDB_DEBUG_ERROR,
-"Record offset %d too small next %d\n",
+"Record offset %u too small next %u\n",
 off, rec->next));
goto corrupt;
}
if (rec->next + sizeof(*rec) < rec->next) {
TDB_LOG((tdb, TDB_DEBUG_ERROR,
-"Record offset %d too large next %d\n",
+"Record offset %u too large next %u\n",
 off, rec->next));
goto corrupt;
}
if ((rec->next % TDB_ALIGNMENT) != 0) {
TDB_LOG((tdb, TDB_DEBUG_ERROR,
-"Record offset %d misaligned next %d\n",
+"Record offset %u misaligned next %u\n",
 off, rec->next));
goto corrupt;
}
@@ -98,14 +98,14 @@ static bool tdb_check_record(struct tdb_context *tdb,
/* Check rec_len: similar to rec->next, implies next record. */
if ((rec->rec_len % TDB_ALIGNMENT) != 0) {
TDB_LOG((tdb, TDB_DEBUG_ERROR,
-"Record offset %d misaligned length %d\n",
+"Record offset %u misaligned length %u\n",
 off, rec->rec_len));
goto corrupt;
}
/* Must fit tailer. */
if (rec->rec_len < sizeof(tailer)) {
TDB_LOG((tdb, TDB_DEBUG_ERROR,
-"Record offset %d too short length %d\n",
+"Record offset %u too short length %u\n",
 off, rec->rec_len));
goto corrupt;
}
@@ -119,7 +119,7 @@ static bool tdb_check_record(struct tdb_context *tdb,
goto corrupt;
if (tailer != sizeof(*rec) + rec->rec_len) {
TDB_LOG((tdb, TDB_DEBUG_ERROR,
-"Record offset %d invalid tailer\n", off));
+"Record offset %u invalid tailer\n", off));
goto corrupt;
}
 
@@ -247,7 +247,7 @@ static bool tdb_check_used_record(struct tdb_context *tdb,
/* key + data + tailer must fit in record */
if (rec->key_len + rec->data_len + sizeof(tdb_off_t) > rec->rec_len) {
TDB_LOG((tdb, TDB_DEBUG_ERROR,
-"Record offset %d too short for contents\n", off));
+"Record offset %u too short for contents\n", off));
return false;
}
 
@@ -257,7 +257,7 @@ static bool tdb_check_used_record(struct tdb_context *tdb,
 
if (tdb->hash_fn(&key) != rec->full_hash) {
TDB_LOG((tdb, TDB_DEBUG_ERROR,
-"Record offset %d has incorrect hash\n", off));
+"Record offset %u has incorrect hash\n", off));
goto fail_put_key;
}
 
@@ -411,14 +411,14 @@ _PUBLIC_ int tdb_check(struct tdb_context *tdb,
goto corrupt;
 
TDB_LOG((tdb, TDB_DEBUG_ERROR,
-"Dead space at %d-%d (of %u)\n",
+"Dead space at %u-%u (of %u)\n",
 off, off + dead, tdb->map_size));
rec.rec_len 

[SCM] Samba Shared Repository - branch master updated

2013-05-28 Thread Stefan Metzmacher
The branch, master has been updated
   via  277831e dsdb-repl_meta_data: Move TODO comment about conflicts and 
missing parents
   via  2d38009 torture: Add tests of rename behaviour to replica_sync.py
   via  6960f8e dsdb-repl_meta_data: Handle renames better, considering 
only the RDN as given, and then the parent as given
   via  54e092b dsdb-linked_attributes: Do not crash if the target GUID can 
not be found
  from  3bd686c tdb: fix logging of offets and lengths.

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


- Log -
commit 277831eaf140c06bb25a3549434bc4acd4f533ec
Author: Andrew Bartlett 
Date:   Thu May 16 17:51:56 2013 +1000

dsdb-repl_meta_data: Move TODO comment about conflicts and missing parents

Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Tue May 28 18:11:00 CEST 2013 on sn-devel-104

commit 2d38009852487ab3572b66817ed0492333b5ec7d
Author: Andrew Bartlett 
Date:   Thu May 16 15:24:25 2013 +1000

torture: Add tests of rename behaviour to replica_sync.py

Reviewed-by: Stefan Metzmacher 

commit 6960f8e4c3d683103580aa91605f951bc227dbed
Author: Andrew Bartlett 
Date:   Thu May 16 15:19:20 2013 +1000

dsdb-repl_meta_data: Handle renames better, considering only the RDN as 
given, and then the parent as given

This ignores the full DN as given, because the parent compents might be out 
of date.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher 

commit 54e092bb31001879f4d7a49e36a226c27b4d9843
Author: Andrew Bartlett 
Date:   Thu May 16 13:52:51 2013 +1000

dsdb-linked_attributes: Do not crash if the target GUID can not be found

Note that we must not give an error when we cannot find the object
that should hold the backlink, there really isn't anything we can do
in this case.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher 

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |   15 ++
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c|  230 ---
 source4/torture/drs/python/replica_sync.py |  104 +
 3 files changed, 264 insertions(+), 85 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c 
b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index a55ec87..eb57f91 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -4,6 +4,7 @@
Copyright (C) Andrew Bartlett  2007
Copyright (C) Simo Sorce  2008
Copyright (C) Matthieu Patou  2011
+   Copyright (C) Andrew Tridgell 2009
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -729,6 +730,20 @@ static int linked_attributes_fix_links(struct ldb_module 
*module,
talloc_free(tmp_ctx);
return ret;
}
+   if (res->count == 0) {
+   /* Forward link without backlink object remaining - 
nothing to do here */
+   continue;
+   }
+   if (res->count != 1) {
+   ldb_asprintf_errstring(ldb, "Linked attribute %s->%s 
between %s and %s - target GUID %s found more than once!",
+  el->name, 
target->lDAPDisplayName,
+  ldb_dn_get_linearized(old_dn),
+  
ldb_dn_get_linearized(dsdb_dn->dn),
+  GUID_string(tmp_ctx, 
&link_guid));
+   talloc_free(tmp_ctx);
+   return LDB_ERR_OPERATIONS_ERROR;
+   }
+
msg = res->msgs[0];
 
if (msg->num_elements == 0) {
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 651cdf1..98e60d7 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -94,6 +94,8 @@ struct replmd_replicated_request {
bool is_urgent;
 };
 
+static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar);
+
 enum urgent_situation {
REPL_URGENT_ON_CREATE = 1,
REPL_URGENT_ON_UPDATE = 2,
@@ -3656,15 +3658,6 @@ static int replmd_replicated_apply_add(struct 
replmd_replicated_request *ar)
int ret;
bool remote_isDeleted = false;
 
-   /*
-* TODO: check if the parent object exist
-*/
-
-   /*
-* TODO: handle the conflict case where an object with the
-*   same name exist
-*/
-
ldb = ldb_module_get_ctx(ar->module);

[SCM] Samba Shared Repository - branch master updated

2013-05-28 Thread Michael Adam
The branch, master has been updated
   via  89edff0 net: use smbconf_create_set_share() in "net conf import"
   via  caf83bc libsmbconf: add smbconf_create_set_share
   via  57634fd libsmbconf: fix documentation of transaction calls.
  from  277831e dsdb-repl_meta_data: Move TODO comment about conflicts and 
missing parents

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


- Log -
commit 89edff08db367417f3032563df3ea1b546553c83
Author: Michael Adam 
Date:   Tue May 21 16:50:49 2013 +0200

net: use smbconf_create_set_share() in "net conf import"

Signed-off-by: Michael Adam 
Reviewed-by: David Disseldorp 

Autobuild-User(master): Michael Adam 
Autobuild-Date(master): Tue May 28 20:01:12 CEST 2013 on sn-devel-104

commit caf83bcb76f52b0628f6d59e95396d16b5e3c66e
Author: David Disseldorp 
Date:   Thu May 16 11:55:04 2013 +0200

libsmbconf: add smbconf_create_set_share

This call creates a new share definition, using the parameters provided
with a smbconf_service structure.
Such an interface allows for simple cloning of services with:
smbconf_get_share(conf_ctx, mem_ctx, base_sharename, &base_service_def);
base_service_def->name = clone_sharename;
smbconf_create_set_share(conf_ctx, base_service_def);

Pair-Programmed-With: Michael Adam 

Signed-off-by: David Disseldorp 
Signed-off-by: Michael Adam 

commit 57634fd87d7176a1f92281ad1b3e9a565b54cfc7
Author: Michael Adam 
Date:   Mon May 20 23:30:14 2013 +0200

libsmbconf: fix documentation of transaction calls.

Signed-off-by: Michael Adam 
Reviewed-by: David Disseldorp 

---

Summary of changes:
 lib/smbconf/smbconf.c|   77 ++
 lib/smbconf/smbconf.h|   22 -
 source3/utils/net_conf.c |   49 +
 3 files changed, 99 insertions(+), 49 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/smbconf/smbconf.c b/lib/smbconf/smbconf.c
index e0441ed..27d36ca 100644
--- a/lib/smbconf/smbconf.c
+++ b/lib/smbconf/smbconf.c
@@ -231,6 +231,83 @@ sbcErr smbconf_create_share(struct smbconf_ctx *ctx,
 }
 
 /**
+ * create and set the definition for a new share (service).
+ */
+sbcErr smbconf_create_set_share(struct smbconf_ctx *ctx,
+   struct smbconf_service *service)
+{
+   sbcErr err, err2;
+   int i;
+   uint32_t num_includes = 0;
+   char **includes = NULL;
+   TALLOC_CTX *tmp_ctx = NULL;
+
+   if ((service->name != NULL) && smbconf_share_exists(ctx, service->name))
+   {
+   return SBC_ERR_FILE_EXISTS;
+   }
+
+   err = smbconf_transaction_start(ctx);
+   if (!SBC_ERROR_IS_OK(err)) {
+   return err;
+   }
+
+   tmp_ctx = talloc_stackframe();
+
+   err = smbconf_create_share(ctx, service->name);
+   if (!SBC_ERROR_IS_OK(err)) {
+   goto cancel;
+   }
+
+   for (i = 0; i < service->num_params; i++) {
+   if (strequal(service->param_names[i], "include")) {
+   includes = talloc_realloc(tmp_ctx, includes, char *,
+ num_includes+1);
+   if (includes == NULL) {
+   err = SBC_ERR_NOMEM;
+   goto cancel;
+   }
+   includes[num_includes] = talloc_strdup(includes,
+   service->param_values[i]);
+   if (includes[num_includes] == NULL) {
+   err = SBC_ERR_NOMEM;
+   goto cancel;
+   }
+   num_includes++;
+   } else {
+   err = smbconf_set_parameter(ctx,
+   service->name,
+   service->param_names[i],
+   service->param_values[i]);
+   if (!SBC_ERROR_IS_OK(err)) {
+   goto cancel;
+   }
+   }
+   }
+
+   err = smbconf_set_includes(ctx, service->name, num_includes,
+  (const char **)includes);
+   if (!SBC_ERROR_IS_OK(err)) {
+   goto cancel;
+   }
+
+   err = smbconf_transaction_commit(ctx);
+
+   goto done;
+
+cancel:
+   err2 = smbconf_transaction_cancel(ctx);
+   if (!SBC_ERROR_IS_OK(err2)) {
+   DEBUG(5, (__location__ ": Error cancelling transaction: %s\n",
+ sbcErrorString(err2)));
+   }
+
+done:
+   talloc_free(tmp_ctx);
+   return err;
+}
+
+/**
  * get a definition of a share (servic