From 9d8c44af173c5266ea6c5eaf7772a21f8d3fb523 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 19 Jan 2007 03:53:37 +0000 Subject: r20887: allow the registration of multiple cluster backends this is in preparation for ctdb (This used to be commit 489f022175a1022bcca8053116362825daae5e40) --- source4/cluster/cluster_private.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 source4/cluster/cluster_private.h (limited to 'source4/cluster/cluster_private.h') diff --git a/source4/cluster/cluster_private.h b/source4/cluster/cluster_private.h new file mode 100644 index 0000000000..e5df10060f --- /dev/null +++ b/source4/cluster/cluster_private.h @@ -0,0 +1,36 @@ +/* + Unix SMB/CIFS implementation. + + private structures for clustering + + Copyright (C) Andrew Tridgell 2006 + + 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _CLUSTER_PRIVATE_H_ +#define _CLUSTER_PRIVATE_H_ + +struct cluster_ops { + struct server_id (*cluster_id)(struct cluster_ops *ops, uint32_t id); + const char *(*cluster_id_string)(struct cluster_ops *ops, + TALLOC_CTX *, struct server_id ); + void *private; /* backend state */ +}; + +void cluster_set_ops(struct cluster_ops *new_ops); +void cluster_local_init(void); + +#endif -- cgit From efc68d8bf6d5acc009285e8f34b30a3a5b252884 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 20 Jan 2007 00:48:31 +0000 Subject: r20919: add a function cluster_tdb_tmp_open() which can be used in a cluster environment for subsystems that have not yet been converted to use ctdb to get a shared temporary tdb (This used to be commit 0ed91384497aed6817b2220c31344bfcd45fd033) --- source4/cluster/cluster_private.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/cluster/cluster_private.h') diff --git a/source4/cluster/cluster_private.h b/source4/cluster/cluster_private.h index e5df10060f..12d57badd0 100644 --- a/source4/cluster/cluster_private.h +++ b/source4/cluster/cluster_private.h @@ -27,6 +27,8 @@ struct cluster_ops { struct server_id (*cluster_id)(struct cluster_ops *ops, uint32_t id); const char *(*cluster_id_string)(struct cluster_ops *ops, TALLOC_CTX *, struct server_id ); + struct tdb_wrap *(*cluster_tdb_tmp_open)(struct cluster_ops *, + TALLOC_CTX *, const char *, int); void *private; /* backend state */ }; -- cgit From 07478016d7354274cd53ff2b4ec1dda3f0f439d1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 8 Feb 2007 00:58:17 +0000 Subject: r21230: added the hooks needed in the cluster layer and the messaging code for handling messages to remote nodes. Implemented dummy functions in the 'local' cluster backend for the messaging hooks, and modified the messaging layer to check if the destination is remote and redirect messages via the cluster layer (This used to be commit 4474552e8fb73efebef32ad8480d7fe9a1e379ef) --- source4/cluster/cluster_private.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/cluster/cluster_private.h') diff --git a/source4/cluster/cluster_private.h b/source4/cluster/cluster_private.h index 12d57badd0..2dc749d890 100644 --- a/source4/cluster/cluster_private.h +++ b/source4/cluster/cluster_private.h @@ -29,6 +29,13 @@ struct cluster_ops { TALLOC_CTX *, struct server_id ); struct tdb_wrap *(*cluster_tdb_tmp_open)(struct cluster_ops *, TALLOC_CTX *, const char *, int); + void *(*backend_handle)(struct cluster_ops *); + NTSTATUS (*message_init)(struct cluster_ops *ops, + struct messaging_context *msg, struct server_id server, + cluster_message_fn_t handler); + NTSTATUS (*message_send)(struct cluster_ops *ops, + struct server_id server, uint32_t msg_type, + DATA_BLOB *data); void *private; /* backend state */ }; -- cgit From 8de4c33d8f089f2f47817278f8781f194da898d0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 9 Feb 2007 01:52:13 +0000 Subject: r21256: - msg_type is not needed in the cluster messaging API - merge ctdb_get_num_nodes() from bzr tree (This used to be commit 3df7527aedeba7ce2f4a6ca2d3b7167f58c6b68a) --- source4/cluster/cluster_private.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/cluster/cluster_private.h') diff --git a/source4/cluster/cluster_private.h b/source4/cluster/cluster_private.h index 2dc749d890..df8848fe73 100644 --- a/source4/cluster/cluster_private.h +++ b/source4/cluster/cluster_private.h @@ -34,8 +34,7 @@ struct cluster_ops { struct messaging_context *msg, struct server_id server, cluster_message_fn_t handler); NTSTATUS (*message_send)(struct cluster_ops *ops, - struct server_id server, uint32_t msg_type, - DATA_BLOB *data); + struct server_id server, DATA_BLOB *data); void *private; /* backend state */ }; -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/cluster/cluster_private.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/cluster/cluster_private.h') diff --git a/source4/cluster/cluster_private.h b/source4/cluster/cluster_private.h index df8848fe73..6307ba8ae6 100644 --- a/source4/cluster/cluster_private.h +++ b/source4/cluster/cluster_private.h @@ -7,7 +7,7 @@ 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 - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -16,8 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifndef _CLUSTER_PRIVATE_H_ -- cgit From 61873ce94c172c801a4831de5550a8e0fe54c5f5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 13 Dec 2007 22:46:23 +0100 Subject: r26431: Require ndr_push creators to specify a iconv_convenience context. (This used to be commit 7352206f4450fdf881b95bda064cedd9d2477e4c) --- source4/cluster/cluster_private.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/cluster/cluster_private.h') diff --git a/source4/cluster/cluster_private.h b/source4/cluster/cluster_private.h index 6307ba8ae6..1c895b8640 100644 --- a/source4/cluster/cluster_private.h +++ b/source4/cluster/cluster_private.h @@ -27,7 +27,9 @@ struct cluster_ops { const char *(*cluster_id_string)(struct cluster_ops *ops, TALLOC_CTX *, struct server_id ); struct tdb_wrap *(*cluster_tdb_tmp_open)(struct cluster_ops *, - TALLOC_CTX *, const char *, int); + TALLOC_CTX *, + struct loadparm_context *, + const char *, int); void *(*backend_handle)(struct cluster_ops *); NTSTATUS (*message_init)(struct cluster_ops *ops, struct messaging_context *msg, struct server_id server, -- cgit From 77f71c1b65358723771354fd9ff1dc418b227ccc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 4 Feb 2008 17:51:38 +1100 Subject: Rework cluster_id() to take an additional argument, as we need .. to be unique in a prefork process environment. Andrew Bartlett and David Disseldorp (This used to be commit 931994a7f185bbc98924823e9e8cef1011dd0957) --- source4/cluster/cluster_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/cluster/cluster_private.h') diff --git a/source4/cluster/cluster_private.h b/source4/cluster/cluster_private.h index 1c895b8640..79394b46db 100644 --- a/source4/cluster/cluster_private.h +++ b/source4/cluster/cluster_private.h @@ -23,7 +23,7 @@ #define _CLUSTER_PRIVATE_H_ struct cluster_ops { - struct server_id (*cluster_id)(struct cluster_ops *ops, uint32_t id); + struct server_id (*cluster_id)(struct cluster_ops *ops, uint64_t id, uint32_t id2); const char *(*cluster_id_string)(struct cluster_ops *ops, TALLOC_CTX *, struct server_id ); struct tdb_wrap *(*cluster_tdb_tmp_open)(struct cluster_ops *, -- cgit