vlendec/samba-autobuild/.git
3 years agoWHATSNEW: Clear release notes for Samba 4.5.0pre1.
Stefan Metzmacher [Wed, 17 Feb 2016 09:00:57 +0000 (10:00 +0100)]
WHATSNEW: Clear release notes for Samba 4.5.0pre1.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
3 years agosmbd:close: only remove kernel share modes if they had been taken at open
Michael Adam [Sun, 15 May 2016 21:24:08 +0000 (23:24 +0200)]
smbd:close: only remove kernel share modes if they had been taken at open

This avoids errors due to 'not implemented' for SMB_VFS_KERNEL_FLOCK
on some file systems like glusterfs (with the vfs module). The only
other code path where SMB_VFS_KERNEL_FLOCK is called, is already protected.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Thu May 19 02:34:36 CEST 2016 on sn-devel-144

3 years agos3:vfs: add 'kernel_share_modes_taken' to files_struct
Michael Adam [Sun, 15 May 2016 23:39:09 +0000 (01:39 +0200)]
s3:vfs: add 'kernel_share_modes_taken' to files_struct

This will allow to track whether kernel share modes have been
taken at open and correclty remove them again on close.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos3-net: Cleanup the code of printing migration
Andreas Schneider [Wed, 18 May 2016 15:04:38 +0000 (17:04 +0200)]
s3-net: Cleanup the code of printing migration

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed May 18 23:00:35 CEST 2016 on sn-devel-144

3 years agos3-net: Convert the key_name to UTF8 during migration
Andreas Schneider [Wed, 18 May 2016 14:51:45 +0000 (16:51 +0200)]
s3-net: Convert the key_name to UTF8 during migration

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

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
3 years agopackaging: Set default limit for core file size in service files
Anoop C S [Tue, 10 May 2016 09:38:07 +0000 (15:08 +0530)]
packaging: Set default limit for core file size in service files

This change adds the missing LimitCORE variable setting in nmb and
winbind service files to have no limit for coredumps by default.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed May 18 19:26:49 CEST 2016 on sn-devel-144

3 years agopackaging: Set default limit for core file size in init scripts
Anoop C S [Tue, 10 May 2016 15:37:01 +0000 (21:07 +0530)]
packaging: Set default limit for core file size in init scripts

SysV init scripts used for initiating smb and winbind services
determines the value for default limit of coredump from variable
named DAEMON_COREFILE_LIMIT within a bash env. Therefore this
patch explicitly sets this variable to 'unlimited' so as to have
no limit for core file size by default.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
3 years agopackaging: Remove ulimit usage for setting core file size limit
Anoop C S [Tue, 10 May 2016 09:20:14 +0000 (14:50 +0530)]
packaging: Remove ulimit usage for setting core file size limit

Recent commit ebd139c4db7e51a2d7843a773991f15cadf504dd modified smb.init
to set core file size to 'unlimited' by default using the ulimit command.
But when smb and winbind services are initiated via sysv init scripts,
another variable named DAEMON_COREFILE_LIMIT takes higher priority in
deciding the core file size. Therefore setting default value using ulimit
command is useless.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
3 years agos3:smbd: fix anonymous authentication if signing is mandatory
Stefan Metzmacher [Wed, 18 May 2016 07:56:02 +0000 (09:56 +0200)]
s3:smbd: fix anonymous authentication if signing is mandatory

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed May 18 15:49:46 CEST 2016 on sn-devel-144

3 years agos3:ntlm_auth: make ntlm_auth_generate_session_info() more complete
Stefan Metzmacher [Wed, 11 May 2016 15:59:32 +0000 (17:59 +0200)]
s3:ntlm_auth: make ntlm_auth_generate_session_info() more complete

The generate_session_info() function maybe called more than once
per session.

Some may try to look/dereference session_info->security_token,
so we provide simplified token.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
3 years agoctdb: Fix CID 1327222 Copy into fixed size buffer
Volker Lendecke [Tue, 17 May 2016 09:39:38 +0000 (11:39 +0200)]
ctdb: Fix CID 1327222 Copy into fixed size buffer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Tue May 17 21:21:30 CEST 2016 on sn-devel-144

3 years agoctdb: Fix CID 1361817 Dereference after null check
Volker Lendecke [Tue, 17 May 2016 09:36:44 +0000 (11:36 +0200)]
ctdb: Fix CID 1361817 Dereference after null check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
3 years agodbwrap_ctdb: Remove get_my_vnn dependency
Volker Lendecke [Mon, 11 Apr 2016 14:31:25 +0000 (16:31 +0200)]
dbwrap_ctdb: Remove get_my_vnn dependency

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue May 17 16:54:36 CEST 2016 on sn-devel-144

3 years agodbwrap_ctdb: Fix some 32-bit hickups
Volker Lendecke [Mon, 11 Apr 2016 14:07:12 +0000 (16:07 +0200)]
dbwrap_ctdb: Fix some 32-bit hickups

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoctdbd_conn: Remove messages.h dependency
Volker Lendecke [Sun, 24 Apr 2016 15:39:44 +0000 (17:39 +0200)]
ctdbd_conn: Remove messages.h dependency

This removes a circular dependency

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agodbwrap: Add "msg_ctx" to db_open_ctdb
Volker Lendecke [Sun, 24 Apr 2016 15:37:07 +0000 (17:37 +0200)]
dbwrap: Add "msg_ctx" to db_open_ctdb

Another step towards making ctdbd_conn.c independent of messages.c. No call to
ctdb_conn_msg_ctx() anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agodbwrap_ctdb: Pass in ctdbd_connection
Volker Lendecke [Mon, 11 Apr 2016 14:20:32 +0000 (16:20 +0200)]
dbwrap_ctdb: Pass in ctdbd_connection

This removes one circular dependency of dbwrap_ctdb to messages.c: No call to
messaging_ctdbd_connection() anymore from dbwrap_ctdb.c.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agodbwrap_ctdb: Add "conn" to db_ctdb_ctx
Volker Lendecke [Mon, 11 Apr 2016 14:01:07 +0000 (16:01 +0200)]
dbwrap_ctdb: Add "conn" to db_ctdb_ctx

This minimizes the use of messaging_ctdbd_connection() to
db_open_ctx(). Next step will move this into db_open().

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agodbwrap_ctdb: Align loop index with terminator
Volker Lendecke [Mon, 11 Apr 2016 13:45:49 +0000 (15:45 +0200)]
dbwrap_ctdb: Align loop index with terminator

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agolib: Move async message handling out of ctdbd_conn
Volker Lendecke [Sun, 24 Apr 2016 15:37:33 +0000 (17:37 +0200)]
lib: Move async message handling out of ctdbd_conn

messages_ctdbd.c is the code that is genuinely interested in
async messages from ctdb, so let it take care of them.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoctdbd_conn: Expose ctdb socket readability handler
Volker Lendecke [Sun, 24 Apr 2016 15:36:00 +0000 (17:36 +0200)]
ctdbd_conn: Expose ctdb socket readability handler

This will obsolete ctdbd_register_msg_ctx soon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoctdbd_conn: "sockname" is not needed anymore
Volker Lendecke [Tue, 19 Apr 2016 19:40:40 +0000 (21:40 +0200)]
ctdbd_conn: "sockname" is not needed anymore

Previously it was used in ctdb_traverse(), but with ff72a8a this is no longer
the case

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoctdbd_conn: Simplify two DEBUGs
Volker Lendecke [Tue, 19 Apr 2016 14:02:49 +0000 (16:02 +0200)]
ctdbd_conn: Simplify two DEBUGs

msg->hdr.length is a uint32 and we have PRIu32

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoctdbd_conn: remove ctdb_processes_exist
Volker Lendecke [Mon, 11 Apr 2016 15:15:29 +0000 (17:15 +0200)]
ctdbd_conn: remove ctdb_processes_exist

The singular call was the only user. Remove the complex plural one. We can
always dig it up from git history if we need it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agopython/tests/dns_forwarder: fix for python 2.6
Douglas Bagnall [Fri, 13 May 2016 00:52:18 +0000 (12:52 +1200)]
python/tests/dns_forwarder: fix for python 2.6

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Tue May 17 07:39:03 CEST 2016 on sn-devel-144

3 years agogitignore: ignore library bin directories
Douglas Bagnall [Thu, 12 May 2016 22:06:10 +0000 (10:06 +1200)]
gitignore: ignore library bin directories

The Ubuntu 10.04 autobuilds on sn-devel build the lib/* libraries into
their own bin subdirectories; for example lib/ldb uses lib/ldb/bin. A
recent commit broke these autobuilds by un-hiding these directories
from git.

Fixes c2649352e0917c3c2bcf1b7ad74d73d21e73be9c (".gitignore: don;t
accidentally ignore some files").

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
3 years agotorture: Remove a use of get_my_vnn()
Volker Lendecke [Wed, 14 Oct 2015 09:52:24 +0000 (11:52 +0200)]
torture: Remove a use of get_my_vnn()

Reduce the use of globals

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon May 16 23:23:53 CEST 2016 on sn-devel-144

3 years agolib: Fix some whitespace
Volker Lendecke [Sun, 1 May 2016 15:30:11 +0000 (17:30 +0200)]
lib: Fix some whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Fix a signed/unsigned mixup
Volker Lendecke [Sun, 1 May 2016 15:28:56 +0000 (17:28 +0200)]
lib: Fix a signed/unsigned mixup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoctdb: Fix the O3 developer build
Volker Lendecke [Mon, 16 May 2016 14:42:18 +0000 (16:42 +0200)]
ctdb: Fix the O3 developer build

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoctdb: Improve debug in case of set_runstate failure
Volker Lendecke [Sun, 24 Apr 2016 14:07:43 +0000 (16:07 +0200)]
ctdb: Improve debug in case of set_runstate failure

If this fails, we want to know which states it wanted to move to. Don't do the
return before the debug.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agosmbd: Fix an assert
Volker Lendecke [Wed, 20 Apr 2016 11:13:38 +0000 (13:13 +0200)]
smbd: Fix an assert

This might stumble over stale entries

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11844
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoctdb-scripts: Add GlusterFS support to nfs-ganesha-callout
Jose A. Rivera [Fri, 29 Apr 2016 02:24:16 +0000 (21:24 -0500)]
ctdb-scripts: Add GlusterFS support to nfs-ganesha-callout

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sat May 14 03:06:05 CEST 2016 on sn-devel-144

3 years agoctdb-scripts: Section off GPFS-specific functionality in nfs-ganesha-callout
Jose A. Rivera [Tue, 3 May 2016 06:53:07 +0000 (01:53 -0500)]
ctdb-scripts: Section off GPFS-specific functionality in nfs-ganesha-callout

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
3 years agoctdb-scripts: Add config options for use by clustered NFS
Jose A. Rivera [Fri, 29 Apr 2016 02:18:05 +0000 (21:18 -0500)]
ctdb-scripts: Add config options for use by clustered NFS

Add CTDB_NFS_STATE_FS_TYPE and CTDB_NFS_STATE_MNT config options, show use in
nfs-ganesha-callout. Since the callout script is only an example, we
officially don't have default values for these.

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
3 years agoctdb-scripts: Parametize symlink checking in nfs-ganesha-callout
Jose A. Rivera [Wed, 4 May 2016 19:16:27 +0000 (14:16 -0500)]
ctdb-scripts: Parametize symlink checking in nfs-ganesha-callout

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
3 years agoctdb-scripts: Cleanup service_check() in nfs-ganesha-callout
Jose A. Rivera [Tue, 10 May 2016 14:27:43 +0000 (16:27 +0200)]
ctdb-scripts: Cleanup service_check() in nfs-ganesha-callout

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
3 years agoctdb-scripts: Use D-Bus messages to trigger grace in nfs-ganesha-callout
Jose A. Rivera [Wed, 4 May 2016 18:03:29 +0000 (13:03 -0500)]
ctdb-scripts: Use D-Bus messages to trigger grace in nfs-ganesha-callout

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
3 years agoctdb-scripts: Add register action to nfs-ganesha-callout
Jose A. Rivera [Fri, 29 Apr 2016 02:12:33 +0000 (21:12 -0500)]
ctdb-scripts: Add register action to nfs-ganesha-callout

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
3 years agoctdb-scripts: Organize global variables in nfs_ganesha_callout
Jose A. Rivera [Tue, 10 May 2016 14:50:10 +0000 (16:50 +0200)]
ctdb-scripts: Organize global variables in nfs_ganesha_callout

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
3 years agoctdb-scripts: Various small fixes to example nfs-ganesha-callout
Jose A. Rivera [Fri, 29 Apr 2016 01:58:30 +0000 (20:58 -0500)]
ctdb-scripts: Various small fixes to example nfs-ganesha-callout

Comment typos and clarifications, erroneous variable names, corrected
pathnames, reorganizing variables, and squashing a few non-fatal
scripting errors.

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
3 years agoctdb-recoverd: Unify takeover run triggering code in main loop
Martin Schwenke [Tue, 3 May 2016 06:07:34 +0000 (16:07 +1000)]
ctdb-recoverd: Unify takeover run triggering code in main loop

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri May 13 17:15:57 CEST 2016 on sn-devel-144

3 years agoctdb-recoverd: Add early return in srvid_requests_reply()
Martin Schwenke [Tue, 3 May 2016 05:56:09 +0000 (15:56 +1000)]
ctdb-recoverd: Add early return in srvid_requests_reply()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-recoverd: Drop an unnecessary log message
Martin Schwenke [Tue, 3 May 2016 06:02:38 +0000 (16:02 +1000)]
ctdb-recoverd: Drop an unnecessary log message

do_takeover_run() will logs something at NOTICE level anyway.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-recoverd: Move takeover run checks after recover checks
Martin Schwenke [Tue, 3 May 2016 06:00:02 +0000 (16:00 +1000)]
ctdb-recoverd: Move takeover run checks after recover checks

If a recovery is going to be done then this will be followed by a
takeover run anyway.  So, there's no use doing the takeover run
checks, potentially doing a takeover run and then doing a recovery.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-recoverd: Drop explicit check to flag takeover run needed
Martin Schwenke [Tue, 3 May 2016 01:52:48 +0000 (11:52 +1000)]
ctdb-recoverd: Drop explicit check to flag takeover run needed

The recovery daemon should be less involved in the service monitoring
logic.

The cases handled here are already handled elsewhere:

* When a node becomes unhealthy/healthy the monitoring code will
  trigger a takeover run

* When a node is disabled/enabled the ctdb CLI tool will trigger a
  takeover run

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: Do not set node unhealthy when "takeip" fails
Martin Schwenke [Tue, 3 May 2016 04:18:02 +0000 (14:18 +1000)]
ctdb-takeover: Do not set node unhealthy when "takeip" fails

It will just become healthy again in the next monitor cycle.

Instead, let the recovery master ban it if the problem persists.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: Recovery daemon no longer passes fail callback
Martin Schwenke [Tue, 3 May 2016 05:35:08 +0000 (15:35 +1000)]
ctdb-takeover: Recovery daemon no longer passes fail callback

Banning is now handled by the takeover code sending banning credit
messages.

This commit makes a change in behaviour quite obvious.  Takeover runs
were initiated from several locations in the code but banning was only
done from one of these locations.  Now banning can be done from any
failed takeover run.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: Only apply banning credits to the worst offender
Martin Schwenke [Thu, 5 May 2016 05:53:48 +0000 (15:53 +1000)]
ctdb-takeover: Only apply banning credits to the worst offender

Post-process failues and only send banning credits to the node with
the most failures.

If there is a widespread problem or a problem on the recovery master
node then this should help avoid banning all the nodes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: Count takeover run failures
Martin Schwenke [Thu, 5 May 2016 05:36:12 +0000 (15:36 +1000)]
ctdb-takeover: Count takeover run failures

This will allow banning credits assignments to be limited according to
some criteria.

Note that this only matters when multiple controls are sent to each
node: RELEASE_IP and TAKEOVER_IP.  This doesn't change the behaviour
for IPREALLOCATED.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: Send banning credit messages from fail callback
Martin Schwenke [Tue, 3 May 2016 05:09:25 +0000 (15:09 +1000)]
ctdb-takeover: Send banning credit messages from fail callback

Banning credits are now assigned by takeover runs called from all
locations in the recovery daemon.  Previously this only happened from
one of the callers.  When separating out the takeover run code the
behaviour should be consistent.

The callback (and corresponding data) passed to ctdb_takeover_run() is
now ignored.  Dropping this will allow the interface between the
recovery daemon and IP takeover to be simplified.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: Have the takeover fail callback log a message
Martin Schwenke [Tue, 3 May 2016 02:54:10 +0000 (12:54 +1000)]
ctdb-takeover: Have the takeover fail callback log a message

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: Use the takeover_run_fail_callback() in more cases
Martin Schwenke [Tue, 3 May 2016 02:52:36 +0000 (12:52 +1000)]
ctdb-takeover: Use the takeover_run_fail_callback() in more cases

Probably due to oversight, this is currently only used for the
"takeip" step.

This does consistent error handling and provides a layer of
indirection to the passed callback, so use it for "releaseip" and
"ipreallocated" steps too.

The callback data now needs to be initialised before the first
possible jump to "ipreallocated".

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: New function takeover_callback_data_init()
Martin Schwenke [Sat, 7 May 2016 06:10:48 +0000 (16:10 +1000)]
ctdb-takeover: New function takeover_callback_data_init()

Abstract out the initialisation of the callback data.  Later, we'll
need to do it multiple times or move it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: Takeover callback data doesn't need a node map
Martin Schwenke [Tue, 3 May 2016 05:29:18 +0000 (15:29 +1000)]
ctdb-takeover: Takeover callback data doesn't need a node map

It just needs to know the number of nodes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: PNN can be used to index into node map
Martin Schwenke [Tue, 3 May 2016 02:46:16 +0000 (12:46 +1000)]
ctdb-takeover: PNN can be used to index into node map

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-takeover: Drop ipreallocated fallback code
Martin Schwenke [Tue, 3 May 2016 04:14:53 +0000 (14:14 +1000)]
ctdb-takeover: Drop ipreallocated fallback code

The ipreallocated control has been in CTDB for a long time.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agotravis: run the samba-o3 target
Michael Adam [Thu, 12 May 2016 22:00:48 +0000 (00:00 +0200)]
travis: run the samba-o3 target

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri May 13 13:46:12 CEST 2016 on sn-devel-144

3 years agoautobuild: run the samba-o3 target by default
Michael Adam [Mon, 11 Apr 2016 08:23:00 +0000 (10:23 +0200)]
autobuild: run the samba-o3 target by default

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoautobuild: add a target samba-o3 that is built with -O3
Michael Adam [Tue, 22 Mar 2016 17:14:17 +0000 (18:14 +0100)]
autobuild: add a target samba-o3 that is built with -O3

Only run quicktest against the ad_dc env.
This currently just takes some 6 odd minutes.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:repl_meta_data: squelch compile warning with -O3
Christian Ambach [Thu, 12 May 2016 15:10:51 +0000 (17:10 +0200)]
s4:repl_meta_data: squelch compile warning with -O3

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri May 13 03:50:10 CEST 2016 on sn-devel-144

3 years agos3:modules/vfs_snapper squelch -O3 compile warning
Christian Ambach [Sat, 2 Apr 2016 00:08:05 +0000 (02:08 +0200)]
s3:modules/vfs_snapper squelch -O3 compile warning

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
3 years agoexamples:smbclient:write: fix O3 error unused result of fgets
Michael Adam [Tue, 5 Apr 2016 21:07:11 +0000 (23:07 +0200)]
examples:smbclient:write: fix O3 error unused result of fgets

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agoexamples:smbclient:read: fix O3 error unused result of fgets
Michael Adam [Tue, 5 Apr 2016 20:57:51 +0000 (22:57 +0200)]
examples:smbclient:read: fix O3 error unused result of fgets

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agoexamples:smbclient:fstatvfs: fix O3 error unused result of fgets
Michael Adam [Tue, 5 Apr 2016 20:55:01 +0000 (22:55 +0200)]
examples:smbclient:fstatvfs: fix O3 error unused result of fgets

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agoexamples:smbclient:statvfs: fix O3 error unused result of fgets
Michael Adam [Tue, 5 Apr 2016 20:50:52 +0000 (22:50 +0200)]
examples:smbclient:statvfs: fix O3 error unused result of fgets

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agoexamples:smbclient:notify: fix O3 error unused result from fgets
Michael Adam [Tue, 5 Apr 2016 20:36:34 +0000 (22:36 +0200)]
examples:smbclient:notify: fix O3 error unused result from fgets

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agoexamples:smbclient:testacl3: fix O3 error unused result from fgets
Michael Adam [Tue, 5 Apr 2016 20:34:32 +0000 (22:34 +0200)]
examples:smbclient:testacl3: fix O3 error unused result from fgets

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos3:vfs:preopen: fix O3 error unused result of write
Michael Adam [Tue, 5 Apr 2016 20:22:47 +0000 (22:22 +0200)]
s3:vfs:preopen: fix O3 error unused result of write

(void) cast is not enough.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos3:vfs:aio_fork: fix O3 error unused result of write
Michael Adam [Tue, 5 Apr 2016 20:21:19 +0000 (22:21 +0200)]
s3:vfs:aio_fork: fix O3 error unused result of write

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos3:smbfilter: fix O3 error unused result of system()
Michael Adam [Tue, 5 Apr 2016 18:01:32 +0000 (20:01 +0200)]
s3:smbfilter: fix O3 error unused result of system()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos3:utils:log2pcaphex: fix O3 error uninitialized variable
Michael Adam [Tue, 5 Apr 2016 17:57:42 +0000 (19:57 +0200)]
s3:utils:log2pcaphex: fix O3 error uninitialized variable

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos3:utils:log2pcaphex: fix O3 error unused result of fgets
Michael Adam [Tue, 5 Apr 2016 17:56:25 +0000 (19:56 +0200)]
s3:utils:log2pcaphex: fix O3 error unused result of fgets

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos3:samlogon_cache: fix O3 error unused result of truncate
Michael Adam [Tue, 5 Apr 2016 14:47:39 +0000 (16:47 +0200)]
s3:samlogon_cache: fix O3 error unused result of truncate

in netsamlogon_cache_init()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:client: fix O3 error unused result of of chdir and system
Michael Adam [Tue, 5 Apr 2016 17:26:41 +0000 (19:26 +0200)]
s4:client: fix O3 error unused result of of chdir and system

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:torture:nbench: fix O3 error unused result of asprintf
Michael Adam [Tue, 5 Apr 2016 16:52:29 +0000 (18:52 +0200)]
s4:torture:nbench: fix O3 error unused result of asprintf

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:torture:rpc:samlogon: fix O3 error unused result of asprintf
Michael Adam [Tue, 5 Apr 2016 16:33:59 +0000 (18:33 +0200)]
s4:torture:rpc:samlogon: fix O3 error unused result of asprintf

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:torture:basic:delete: fix O3 error unused result of asprintf
Michael Adam [Tue, 5 Apr 2016 16:21:17 +0000 (18:21 +0200)]
s4:torture:basic:delete: fix O3 error unused result of asprintf

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:torture:basic:dir: fix O3 error unused result of asprintf
Michael Adam [Tue, 5 Apr 2016 16:19:30 +0000 (18:19 +0200)]
s4:torture:basic:dir: fix O3 error unused result of asprintf

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:torture:basic: fix O3 error unused result of write
Michael Adam [Tue, 5 Apr 2016 16:16:46 +0000 (18:16 +0200)]
s4:torture:basic: fix O3 error unused result of write

in test_utable

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:torture:basic:misc: fix O3 error unused result of asprintf
Michael Adam [Tue, 5 Apr 2016 16:14:19 +0000 (18:14 +0200)]
s4:torture:basic:misc: fix O3 error unused result of asprintf

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:torture:basic: fix O3 error unused result of asprintf
Michael Adam [Tue, 5 Apr 2016 15:15:29 +0000 (17:15 +0200)]
s4:torture:basic: fix O3 error unused result of asprintf

in run_opentest()

While fixing this, also convert to using talloc_asprintf instead.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:regshell: fix O3 error unused result of asprintf in reg_complete_key()
Michael Adam [Tue, 5 Apr 2016 13:43:52 +0000 (15:43 +0200)]
s4:regshell: fix O3 error unused result of asprintf in reg_complete_key()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:ntvfs: fix O3 error unused result of write error in nbench_log()
Michael Adam [Tue, 5 Apr 2016 10:36:57 +0000 (12:36 +0200)]
s4:ntvfs: fix O3 error unused result of write error in nbench_log()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:ntvfs: fix O3 error unused result of asprintf in cifspsx_file_utime()
Michael Adam [Tue, 5 Apr 2016 10:18:17 +0000 (12:18 +0200)]
s4:ntvfs: fix O3 error unused result of asprintf in cifspsx_file_utime()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:ntvfs: fix O3 error unused result of asprintf in cifspsx_list_unix
Michael Adam [Sat, 26 Mar 2016 01:46:54 +0000 (02:46 +0100)]
s4:ntvfs: fix O3 error unused result of asprintf in cifspsx_list_unix

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:ntvfs: fix O3 error unused result of asprintf in cifspsx_map_fileinfo
Michael Adam [Sat, 26 Mar 2016 01:24:08 +0000 (02:24 +0100)]
s4:ntvfs: fix O3 error unused result of asprintf in cifspsx_map_fileinfo

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:ntvfs: fix O3 error unused result of asprintf in svfs_file_utime
Michael Adam [Sat, 26 Mar 2016 01:08:41 +0000 (02:08 +0100)]
s4:ntvfs: fix O3 error unused result of asprintf in svfs_file_utime

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:ntvfs: fix O3 error unused result of asprintf
Michael Adam [Sat, 26 Mar 2016 00:53:00 +0000 (01:53 +0100)]
s4:ntvfs: fix O3 error unused result of asprintf

in svfs_map_fileinfo

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:registry:patchfile: fix O3 error unused result of write
Michael Adam [Fri, 25 Mar 2016 01:04:58 +0000 (02:04 +0100)]
s4:registry:patchfile: fix O3 error unused result of write

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agos4:libcli:resolve: fix O3 error unused result of write
Michael Adam [Fri, 25 Mar 2016 00:29:40 +0000 (01:29 +0100)]
s4:libcli:resolve: fix O3 error unused result of write

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agolib: add sys_write_v - void variant of sys_write
Michael Adam [Fri, 25 Mar 2016 00:28:56 +0000 (01:28 +0100)]
lib: add sys_write_v - void variant of sys_write

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agolib: add sys_read_v - void variant of sys_read
Michael Adam [Fri, 25 Mar 2016 00:28:27 +0000 (01:28 +0100)]
lib: add sys_read_v - void variant of sys_read

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agodebug: fix -O3 warning - unused return code of write()
Michael Adam [Tue, 22 Mar 2016 22:01:10 +0000 (23:01 +0100)]
debug: fix -O3 warning - unused return code of write()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agotdb:torture: fix -O3 error unused result of write
Michael Adam [Wed, 23 Mar 2016 01:47:13 +0000 (02:47 +0100)]
tdb:torture: fix -O3 error unused result of write

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agotdb:torture: fix -O3 error unused result code of read
Michael Adam [Wed, 23 Mar 2016 01:36:04 +0000 (02:36 +0100)]
tdb:torture: fix -O3 error unused result code of read

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agotevent:testsuite: fix O3 errors unused result of write
Michael Adam [Tue, 5 Apr 2016 16:51:13 +0000 (18:51 +0200)]
tevent:testsuite: fix O3 errors unused result of write

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agotevent:testsuite: fix O3 errors unused result for read
Michael Adam [Tue, 5 Apr 2016 16:40:37 +0000 (18:40 +0200)]
tevent:testsuite: fix O3 errors unused result for read

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agotevent:signal: fix -O3 error unused result of read
Michael Adam [Wed, 23 Mar 2016 01:23:35 +0000 (02:23 +0100)]
tevent:signal: fix -O3 error unused result of read

some compilers don't tolerate void-casting for warn_unused_result

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
3 years agotevent:signal: fix -O3 error unused result of write
Michael Adam [Wed, 23 Mar 2016 00:41:29 +0000 (01:41 +0100)]
tevent:signal: fix -O3 error unused result of write

some compilers don't tolerate void-casting for warn_unused_result

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>