From d415d4d32f2e8e61de21abfdfce02e1b1ea1e1d3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 3 Nov 2009 05:41:02 +0100 Subject: s3: Add parameter "ctdb timeout" When something in the cluster blocks, it can happen that we wait indefinitely long for ctdb, just adding to the blocking condition. In theory, nothing should block, but as someone said "In practice the difference between theory and practice is larger than in theory". This adds a timeout parameter in seconds, after which we stop waiting for ctdb and panic. --- source3/include/packet.h | 3 ++- source3/include/proto.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/packet.h b/source3/include/packet.h index 03331da750..45a9bc2ef1 100644 --- a/source3/include/packet.h +++ b/source3/include/packet.h @@ -38,7 +38,8 @@ NTSTATUS packet_fd_read(struct packet_context *ctx); /* * Sync read, wait for the next chunk */ -NTSTATUS packet_fd_read_sync(struct packet_context *ctx); +NTSTATUS packet_fd_read_sync(struct packet_context *ctx, + struct timeval *timeout); /* * Handle an incoming packet: diff --git a/source3/include/proto.h b/source3/include/proto.h index 6a90c87f84..d08ed79050 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4130,6 +4130,7 @@ int lp_cups_connection_timeout(void); const char *lp_ctdbd_socket(void); const char **lp_cluster_addresses(void); bool lp_clustering(void); +int lp_ctdb_timeout(void); char *lp_printcommand(int ); char *lp_lpqcommand(int ); char *lp_lprmcommand(int ); -- cgit