summaryrefslogtreecommitdiffstats
path: root/ctdb/tcp/tcp_init.c
Commit message (Collapse)AuthorAgeFilesLines
* build: Fix tdb.h path to enable building with system TDB libraryMathieu Parent2013-06-141-1/+1
| | | | (This used to be ctdb commit f8bf99de3a5f56be67aaa67ed836458b1cf73e86)
* Remove explicit include of lib/tevent/tevent.h.Amitay Isaacs2012-04-131-1/+0
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0681014ca5ed2a9b56f63fdace7f894beccf8a9a)
* event: Update events to latest Samba version 0.9.8Rusty Russell2010-08-181-1/+1
| | | | | | | | | | | | | In Samba this is now called "tevent", and while we use the backwards compatibility wrappers they don't offer EVENT_FD_AUTOCLOSE: that is now a separate tevent_fd_set_auto_close() function. This is based on Samba version 7f29f817fa939ef1bbb740584f09e76e2ecd5b06. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 85e5e760cc91eb3157d3a88996ce474491646726)
* Report client for queue errors.Rusty Russell2010-07-011-1/+1
| | | | | | | | | | We've been seeing "Invalid packet of length 0" errors, but we don't know what is sending them. Add a name for each queue, and print nread. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit e6cf0e8f14f4263fbd8b995418909199924827e9)
* add a new node state : DELETED.Ronnie Sahlberg2009-06-011-2/+8
| | | | | | | | | | | | | | | | | | | | This is used to mark nodes as being DELETED internally in ctdb so that nodes are not renumbered if / when they are removed from the nodes file. This is used to be able to do "ctdb reloadnodes" at runtime without causing nodes to be renumbered. To do this, instead of deleting a node from the nodes file, just comment it out like 1.0.0.1 #1.0.0.2 1.0.0.3 After removing 1.0.0.2 from the cluster, the remaining nodes retain their pnn's from prior to the deletion, namely 0 and 2 Any line in the nodes file that is commented out represents a DELETED pnn (This used to be ctdb commit 6a5e4fd7fa391206b463bb4e976502f3ac5bd343)
* we need to set the port properly in the parse_ip helperRonnie Sahlberg2009-03-241-1/+1
| | | | (This used to be ctdb commit 43fe18d86995744ba61c7a6405b70edcb265930a)
* redesign how reloadnodes is implemented.Ronnie Sahlberg2008-12-021-12/+36
| | | | | | | | | | | | | | modify the transport methods to allow to restart individual connections and set up destructors properly. only tear down/set-up tcp connections to nodes removed from the cluster or nodes added to the cluster. Leave tcp connections to unchanged nodes connected. make "ctdb reloadnodes" explicitely cause a recovery of the cluster once the files have been realoaded (This used to be ctdb commit d1057ed6de7de9f2a64d8fa012c52647e89b515b)
* When we reload the nodes fileRonnie Sahlberg2008-10-071-4/+2
| | | | | | | instead of shutting down/restarting the entire tcp layer just bounce all outgoing connections and reconnect (This used to be ctdb commit e701a531868149f16561011e65794a4a46ee6596)
* listen_fd is auto-closedroot2008-05-081-3/+0
| | | | | | | Closing it here just causes an epoll error, and may close a fd in use by another structure to be closed. This caused a infinite recovery loop (This used to be ctdb commit bc251ac7029c2689776a8c31b28ac1d233d52d4f)
* to make it easier/less disruptive to add nodes to a running clusterRonnie Sahlberg2008-02-191-1/+19
| | | | | | | | | | | | | | add a new control that causes the node to drop the current nodes list and reread it from the nodes file. During this operation, the node will also drop the tcp layer and restart it. When we drop the tcp layer, by talloc_free()ing the ctcp structure add a destructor to ctcp so that we also can clean up and remove the references in the ctdb structure to the transport layer add two new commands for the ctdb tool. one to list all nodes in the nodesfile and the second a command to trigger a node to drop the transport and reinitialize it with the nde nodes file (This used to be ctdb commit 4bc20ac73e9fa94ffd43cccb6eeb438eeff9963c)
* merge from ronnieAndrew Tridgell2008-02-041-2/+2
| | | | (This used to be ctdb commit e7b57d38cf7255be823a223cf15b7526285b4f1c)
* fixed a double close of a socket, leading to an EPOLL errorAndrew Tridgell2007-10-221-6/+6
| | | | (This used to be ctdb commit bbe8ad842bdfedd37ef14a6be07ad939113fe9b1)
* merge from ronnieAndrew Tridgell2007-10-191-0/+19
|\ | | | | | | (This used to be ctdb commit d444fdc7782496abe4b27003b647ac49fb52e6be)
| * add a new transport method so that when a node is marked as dead, we Ronnie Sahlberg2007-10-191-0/+23
|/ | | | | | | | | | | | | | shut down and restart the transport othervise, if we use the tcp transport the tcp connection might try to retransmit the queued data during the time the node is unavailable. this together with the exponential backoff for tcp means that the tcp connection quickly reaches the maximum backoff rto which is often 60 or 120 seconds. this would mean that it could take up to 60/120 seconds before the tcp layer detects that the connection is dead and it has to be reestablished. (This used to be ctdb commit 0256db470879ce556b0f00070f7ebeaf37e529ab)
* update lib/replace from samba4Andrew Tridgell2007-07-101-3/+2
| | | | (This used to be ctdb commit f0555484105668c01c21f56322992e752e831109)
* rename tnode->queue to tnode->out_queue to indicate this queue is for Ronnie Sahlberg2007-07-021-1/+1
| | | | | | sending data out to the other node (This used to be ctdb commit 0bc949c529094570da56c9007ff96b1f5ad02c59)
* clean out some more cruftAndrew Tridgell2007-06-051-4/+4
| | | | (This used to be ctdb commit ad16c5fe2748b48a6f6c79976359d56d9bed33f4)
* - make calling of recovered event script asyncAndrew Tridgell2007-06-021-4/+21
| | | | | | - shutdown sockets before calling shutdown script (This used to be ctdb commit c5e099feef94a014a77742b6cc1d0afe78ef9da9)
* ctdb is GPL not LGPLAndrew Tridgell2007-05-311-12/+12
| | | | (This used to be ctdb commit 8624378010d1c2a1438e1e701339dfba7276f960)
* we need to listen at transport initialise stage to find our own node numberAndrew Tridgell2007-05-301-3/+3
| | | | (This used to be ctdb commit 4a9455dfbe95e53884b46ad26dba0c33e3432ba9)
* don't start the transport connecting to the other nodes until after the ↵Andrew Tridgell2007-05-301-2/+13
| | | | | | startup event script has run (This used to be ctdb commit afca3cc74211aa2e18b1f74d36b2add8dffcfdc7)
* merge from peterAndrew Tridgell2007-04-261-22/+29
| | | | (This used to be ctdb commit ddf390da2bceb5b3f431433aec424d99d98c05f4)
* - added a --torture option to all ctdb tools. This setsAndrew Tridgell2007-04-191-6/+0
| | | | | | | | | | | | | | | | CTDB_FLAG_TORTURE, which forces some race conditions to be much more likely. For example a 20% chance of not getting the lock on the first try in the daemon - abstraced the ctdb_ltdb_lock_fetch_requeue() code to allow it to work with both inter-node packets and client->daemon packets - fixed a bug left over in ctdb_call from when the client updated the header on a call reply - removed CTDB_FLAG_CONNECT_WAIT flag (not needed any more) (This used to be ctdb commit 7559dcd184666c3853127e3c8f5baef4fea327c4)
* - make he packet allocation routines take a mem_ctx, which allowsAndrew Tridgell2007-04-191-2/+2
| | | | | | | | | us to put memory directly in the right context, avoiding quite a few talloc_steal calls, and simplifying the code - make the fetch lock code in the daemon fully async (This used to be ctdb commit d98b4b4fcadad614861c0d44a3854d97b01d0f74)
* Rename "private" to "private_data"Volker Lendecke2007-04-111-2/+2
| | | | (This used to be ctdb commit 78cf4443ac0c66fb750ef6919bcdec189ac219c9)
* fix the queueing for partially connected tcp socketsAndrew Tridgell2007-04-101-0/+4
| | | | (This used to be ctdb commit 55f1c2442a53a547302669a4fdd0f1c1deeed930)
* make some functions static, and remove an unused structureAndrew Tridgell2007-04-101-3/+3
| | | | (This used to be ctdb commit 8d09cac96b2c604a68e4903346cc9db3a66d80da)
* move the checking of the CONNECT_WAIT flag into the start method for tcpRonnie sahlberg2007-04-101-0/+6
| | | | (This used to be ctdb commit 44f3e4456d931af642192e034f84c961ab1fdcf0)
* merge fixes from samba4Andrew Tridgell2007-01-231-1/+2
| | | | (This used to be ctdb commit fb90a5424348d0b6ed9a1b8da4ceadcc4d1a1cb1)
* enforce the tcp memory alignment in packet queue Andrew Tridgell2006-12-191-1/+1
| | | | (This used to be ctdb commit 222f53a3205509a45fbc3267297521df22a414ec)
* added handling of partial packet readsAndrew Tridgell2006-12-191-1/+15
| | | | | | | added transport level packet allocator, allowing the transport to enforce alignment or special memory rules (This used to be ctdb commit 50304a5c4d8d640732678eeed793857334ca5ec1)
* - added ctdb_set_flags() callAndrew Tridgell2006-12-011-1/+2
| | | | | | | | | | | | | | | | | | - added --self-connect option to ctdb_test, allowing testing when a node connects to itself. not as efficient as local bypass, but very useful for testing purposes (easier to work with 1 task in gdb than 2) - split the ctdb_call() into an async triple, in the style of Samba4 async functions. So we now have ctdb_call_send(), ctdb_call_recv() and ctdb_call(). - added the main ctdb_call protocol logic. No error checking yet, but seems to work for simple cases - ensure we initialise the length argument to getsockopt() (This used to be ctdb commit 95fad717ef5ab93be3603aa11d2878876fe868d3)
* - added simple (fake) vnn systemAndrew Tridgell2006-11-281-2/+3
| | | | | | | | | | | | - split up ctdb layer code into 3 modules - added a simple test suite - added packet structures for ctdb_call - switched to an array for ctdb_node to make vnn lookup easy and fast (This used to be ctdb commit 8a17460a816a5970f2df8244a06aec55d814f186)
* - setup a convenience name field for nodesAndrew Tridgell2006-11-281-2/+3
| | | | | | | | | | | | - added basic IO handling for the tcp backend - added a ctdb_node_dead upcall - added packet queueing - adding incoming packet handling (This used to be ctdb commit 415497c952630e746e8cdcf8e1e2a7b2ac3e51fb)
* - split up tcp functions into more logical partsAndrew Tridgell2006-11-281-0/+84
- added upcall methods from transport to ctdb layer (This used to be ctdb commit 59f0dab652000f1c755e59567b03cf84dad7e954)