summaryrefslogtreecommitdiffstats
path: root/ctdb/client
Commit message (Collapse)AuthorAgeFilesLines
...
* client: implement ctdb_ctrl_get_public_ip_info()Stefan Metzmacher2010-01-201-2/+61
| | | | | | metze (This used to be ctdb commit 4efab41dfa61d5c7951c583d584df3455ee9c704)
* controls: add stups for GET_PUBLIC_IP_INFO, GET_IFACES and SET_IFACE_LINK_STATEStefan Metzmacher2010-01-201-0/+25
| | | | | | metze (This used to be ctdb commit a2c9e4578e149eccb2c6183f64a6b657eb95c5e1)
* client: add CTDB_PUBLIC_IP_FLAGS_ONLY_AVAILABLE ctdb_ctrl_get_public_ips_flags()Stefan Metzmacher2010-01-201-4/+16
| | | | | | metze (This used to be ctdb commit 6bd780510058e5589f2f7c3722d37acbba4935ab)
* fix a conflict in the merge from rustyRonnie Sahlberg2009-12-171-6/+1
|\ | | | | | | | | | | | | | | | | | | Merge commit 'rusty/ctdb-no-setsched' Conflicts: server/ctdb_vacuum.c (This used to be ctdb commit b4365045797f520a7914afdb69ebd1a8dacfa0d9)
| * Remove RT priority, use niceness.Rusty Russell2009-12-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) It's buggy. Code needs to be carefully written (ie. no busy loops) to handle running with it, and we fork and run scripts.[1] 2) It makes debugging harder. If ctdbd loops (as has happened recently) it can be extremely hard to get in and see what's happening. We've already seen the valgrind hacks. 3) We have seen recent scheduler problems. Perhaps they are unrelated, but removing this very unusual setup is unlikely to hurt. 4) It doesn't make anything faster. Under all but the most perverse of circumstances, 99% of the cpu gives the same performance as 100%, and we will always preempt normal processes anyway. [1] I made this worse in 0fafdcb8d353 "eventscript: fork() a child for each script" by removing the switch_from_server_to_client() which restored it, but even that was only for monitor scripts. Others were run with RT priority. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 482c302d46e2162d0cf552f8456bc49573ae729d)
| * Add --valgringing flag instead of --nosetschedRusty Russell2009-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | The do_setsched was being tested for whether to mmap tdbs: let's make it explicit. We can also happily move the kill-child eventscript hack under this flag. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 2ee86cc1f311d7b7504c7b14d142b9c4f6f4b469)
* | client: make ctdb_dumpdb_record() publicStefan Metzmacher2009-12-161-2/+2
| | | | | | | | | | | | metze (This used to be ctdb commit 1cdc8dbb9cb971cf6dd6cd22b1adaf70ddc77e65)
* | client: add ctdb_ctrl_getdbhealth()Stefan Metzmacher2009-12-161-0/+38
| | | | | | | | | | | | metze (This used to be ctdb commit 5abe44d0113839d3a45c9a31d30856aa70c2ea1f)
* | ctdb: pass TDB_DISALLOW_NESTING to all tdb_open/tdb_wrap_open callsStefan Metzmacher2009-12-161-0/+1
|/ | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 1635e931b909c66eb3b1f5357e3a549b1a0da70d)
* client: lower level of commit retry message WARNING->DEBUGMichael Adam2009-12-091-3/+3
| | | | | | | | This can happen frequently when recoveries intercept transactions. Michael (This used to be ctdb commit c46adb210e47530488503e20d682d4d182c0fb79)
* client: lower debug level of transaction-active-retry message to DEBUGMichael Adam2009-12-091-4/+4
| | | | | | | | This reduces some noise. Michael (This used to be ctdb commit 54d227811753f4a87f1a2c9dc0b1389f5ca2a12f)
* ctdb: scriptstatus can now query non-monitor eventsRusty Russell2009-12-081-7/+15
| | | | | | | | | | | | We also no longer return an error before scripts have been run; a special zero-length data means we have never run the scripts. "ctdb scriptstatus all" returns all event script results. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 9b90d671581e390e2892d3a68f3ca98d58bef4df)
* eventscript: rename ctdb_monitoring_wire to ctdb_scripts_wireRusty Russell2009-12-081-2/+2
| | | | | | | | | | We're going to allow fetching status of all script runs, so this name is no longer appropriate. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit f5cb41ecf3fa986b8af243e8546eb3b985cd902a)
* eventscript: remove unused ctbd_ctrl_event_script*Rusty Russell2009-12-081-80/+0
| | | | | | | | | | | | | | The child no longer uses ctdb_ctrl_event_script_init or ctdb_ctrl_event_script_finished, and the others are redundant: it doesn't need to tell us it's starting a script when it only runs one. We move start and stop calls to the parent, and eliminate the RPC infrastructure altogether. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 391926a87a7af73840f10bb314c0a2f951a0854c)
* eventscript: use -ENOEXEC for disabled status valueRusty Russell2009-12-071-22/+0
| | | | | | | | | | This unifies code paths and simplifies things: we just hand -ENOEXEC to ctdb_ctrl_event_script_stop(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit eadf5e44ef97d7703a7d3bce0e7ea0f21cb11f14)
* client: improve two error messages in ctdb_transaction_commit().Michael Adam2009-12-041-2/+10
| | | | | | Michael (This used to be ctdb commit d971b2ca84c0451dc7e5acbf4a5ade06270a2044)
* client: increase the number of commit retries 10-->100Michael Adam2009-12-041-1/+1
| | | | | | | | | To cope with timeouts when recoveries and transactions collide. Maybe 100 is too high. Michael (This used to be ctdb commit c23d804165e84bdf95ba960c953c736d361011d7)
* client: untangle checks and produce more detailed error messagesMichael Adam2009-12-041-1/+13
| | | | | | | | in ctdb_transaction_fetch_start Michael (This used to be ctdb commit 428914377851a98b3fc893798783fbfebffc1c0d)
* client: increase the rsn of the __transaction_lock__ when storingMichael Adam2009-12-041-0/+2
| | | | | | | | | So that it is correctly handled by recoveries. Also explicitly set the dmaster field to the current node's pnn. Michael (This used to be ctdb commit 03a5bb727b9db1ba952632f08ceb5355f0df842d)
* make ctdb_ctrl_transaction_active public.Michael Adam2009-12-041-3/+3
| | | | | | Michael (This used to be ctdb commit e5496a83ef4a01604195b27c4b97f50d4979510e)
* client: in catdb, print the keyname first, and separate records by a blank lineMichael Adam2009-12-041-3/+5
| | | | | | Michael (This used to be ctdb commit b9882710e12f28c96a0af298e419160f00578241)
* client: randomize the transaction_start retry loop:Michael Adam2009-10-301-3/+5
| | | | | | | | instead of sleeping 1 second, sleep between 1 and 100 milliseconds Michael (This used to be ctdb commit a5d90d8ed8b44355c4ffb9c32ded772025fcc174)
* client: fix a race in the local race condition fix in transaction_startMichael Adam2009-10-301-8/+10
| | | | | | | | | | | The gap that remained is between checking whether a transaction commit is in progress and taking the lock. Now we first take the lock and then check whether a transaction commit is in progress. If so, we release the lock, wait for one second and retry. Michael (This used to be ctdb commit b95524c08bf12914120cb6c818ecc1c99738fe37)
* client: add a debug message when a transaction_commit needs to be retriedMichael Adam2009-10-301-0/+3
| | | | | | Michael (This used to be ctdb commit 9e4902c7d3ad1329c296f4196fcb1396f2a7a6a0)
* client: log db_id as 8-digit hex in ctdb_transaction_fetch_start()Michael Adam2009-10-301-1/+1
| | | | | | Michael (This used to be ctdb commit d7b9babda2f7c7f7b95ee19ec75c37200816c6ef)
* client: improve "control timed out" debug messageMichael Adam2009-10-301-1/+3
| | | | | | | | | | * add __location__ * wrap overly long line * print unsigned ints as unsigned (reqid, opcode, destnode) Michael (This used to be ctdb commit 6b47ea111867c845974aa2687a658ebca2854816)
* Revert "update the "uptime" command to indicate the "time since last" is the ↵Ronnie Sahlberg2009-10-291-3/+45
| | | | | | | | time since the last recovery OR failover." This reverts commit 3b0d44497800a16400d05a30bdaf6e6c285d4b36. (This used to be ctdb commit cb36bbb5418290e8e5b770d2d836285b15da2a6f)
* update the "uptime" command to indicate the "time since last" is the time ↵Ronnie Sahlberg2009-10-291-45/+3
| | | | | | since the last recovery OR failover. (This used to be ctdb commit 3b0d44497800a16400d05a30bdaf6e6c285d4b36)
* ctdb_client: reformat a comment slightly to enhance clearness.Michael Adam2009-10-291-3/+5
| | | | | | Michael (This used to be ctdb commit 9560f8b7fe0f7ee0386a87c2653333071050fe4b)
* client: fix race condition with concurrent transactions on the same node.Michael Adam2009-10-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | In ctdb_transaction_commit(), when the trans2_commit control fails, there is a race condition in the 1 second sleep between the local transaction_cancel and the call to ctdb_replay_transaction(): The database is not locked, and neither is the transaction_lock record. So another client can start and possibly complete a new transaction in this gap, but only on the same node: The locking of the transaction_lock record on a different node which involves migration of the record to the other node has been disabled by introduction of the transaction_active flag on the db which closes precisely this gap from the start of the commit until the call to TRANS2_FINISH or TRANS2_ERROR. But this mechanism does not cover the case where a process on the same node tries to start a transaction: There is no obstacle to locking the transaction_lock record because the record does not need to be migrated. This commit closes this race condition in ctdb_transaction_fetch_start() by using the new ctdb_ctrl_transaction_active() call to ask the local ctdb daemon whether it has a transaction running on the database. If so, the check is repeated until the running transaction is done. This does introduce an additional call to the local ctdbd when starting transactions, but it does close the (hopefully) last race condition. Michael (This used to be ctdb commit 02ee9dfd3c6b09f5c5172a7e38738c20b7f0aecd)
* client: add ctdb_ctrl_transaction_active() which calls out to CTDB_TRANS2_ACTIVEMichael Adam2009-10-291-0/+28
| | | | | | Michael (This used to be ctdb commit 813cfd7c625ac8af4ef169cc92fb6d69f66004c9)
* for debuggingRonnie Sahlberg2009-10-271-0/+2
| | | | | | | add a global variable holding the pid of the main daemon. change the tracking of time() in the event loop to only check/warn when called from the main daemon (This used to be ctdb commit a10fc51f4c30e85ada6d4b7347b0f9a8ebc76637)
* ctdb_client: fix DEBUG statement in ctdb_ctrl_modflags()Stefan Metzmacher2009-10-261-1/+1
| | | | | | metze (This used to be ctdb commit a244b75ee49556b0ff51e254cc812594ee3b23a7)
* initial attempt at freezing databases in priority orderRonnie Sahlberg2009-10-121-3/+11
| | | | (This used to be ctdb commit e8d692590da1070c87a4144031e3306d190ebed2)
* uptade the freeze/thaw commands to be able to send the requested database ↵Ronnie Sahlberg2009-10-121-8/+20
| | | | | | | | priority to freeze/thaw to the daemon. this is encoded in the srvid field of the request header (This used to be ctdb commit 0cb3d33caa42ed783e03bc825b181dde4cf63616)
* add a control to read the db priority from a databaseRonnie Sahlberg2009-10-101-0/+27
| | | | (This used to be ctdb commit ca6d045e419f308f57e74d4c978907afb05ddb85)
* add a control to set a database priority. Let newly created databases ↵Ronnie Sahlberg2009-10-101-0/+24
| | | | | | | | default to priority 1. database priorities will be used to control in which order databases are locked during recovery in. (This used to be ctdb commit 67741c0ee01916d94cace8e9462ef02507e06078)
* add a new function to collect a list of all active nodes EXCEPT a certain nodeRonnie Sahlberg2009-10-061-0/+34
| | | | (This used to be ctdb commit be52954d921e7d443304cf49fbd488c619a9c4ec)
* ctdb_client: fix race in starting concurrent transactions on a single nodeMichael Adam2009-09-211-1/+24
| | | | | | | | | | | | | | | There are two races in concurrent transactions on a single node. One in starting a transaction, and one with committing (replaying). This commit closes the first race by storing the pid in the transaction-lock record and comparing the own pid against it as a measure to prevent starting a second transaction when a second node has come inbetween and changed the pid in the lock record. Michael (This used to be ctdb commit 84e5a55a900b01903b80e23045edfc726d8d77a1)
* new prototype banning codeRonnie Sahlberg2009-09-041-0/+45
| | | | (This used to be ctdb commit 0c4c2240267af183d54ffd4c0aacda208f6eff6a)
* add new controls to make it possible to enable/disable individual eventscriptsRonnie Sahlberg2009-08-131-0/+66
| | | | | | update scriptstatus output so it lists disabled scripts (This used to be ctdb commit 7e799b7523c9699bd65a8a8207f7e03d668b0b81)
* client: fix a debug message (misplaced newline).Michael Adam2009-08-041-1/+1
| | | | | | Michael (This used to be ctdb commit c513a31d755003d7af91529790b06ce0d226c90f)
* client:ctdb_control_send: remove duplicate setting of the reqid header.Michael Adam2009-08-041-1/+0
| | | | | | Michael (This used to be ctdb commit 875778fbbfd6b0f09fd2db76f7348ad6271350a3)
* client: refuse to do record_store() on a persistent tdb.Michael Adam2009-07-291-36/+2
| | | | | | | | Only allow stores wrapped in transactions on persistent dbs. Michael (This used to be ctdb commit 9dea71cf72ef79a9aadf8ee7cf1a1899527459ff)
* client: set dmaster in ctdb_transaction_store() also when updating an ↵Michael Adam2009-07-291-2/+2
| | | | | | | | existing record Michael (This used to be ctdb commit e9194a130327d6b05a8ab90bd976475b0e93b06d)
* When processing the stop node control reply in the client code we shouldRonnie Sahlberg2009-07-291-2/+3
| | | | | | | | | | also check the returned status code in case the _stop() command failed due to the eventscripts failing. If this happens, make "ctdb stop" log an error to the console and try the operation again. (This used to be ctdb commit 20e82e0c48e07d1012549f5277f1f5a3f4bd10d1)
* add two commands : setlmasterrole and setrecmasterrole to enable/disable ↵Ronnie Sahlberg2009-07-281-0/+46
| | | | | | these capabilities at runtime (This used to be ctdb commit 51aaed0e9e42e901451292e8dd545297ab725a62)
* add a command "setnatgwstate {on|off}" that can be used to indicate if this ↵Ronnie Sahlberg2009-07-281-0/+23
| | | | | | node is using natgw functionality or not. (This used to be ctdb commit 89a9bb29a60a6fb1fba55987e6cf0a4baa695e50)
* add two new controls, CTOP_NODE and CONTINUE_NODERonnie Sahlberg2009-07-091-0/+34
| | | | | | that are used to stop/continue a node instead of using modflags messages (This used to be ctdb commit 54b4a02053a0f98f8c424e7f658890254023d39a)
* add a control to set the reclock fileRonnie Sahlberg2009-06-251-1/+29
| | | | (This used to be ctdb commit 36cc2e586f03fa497ee9b06f3e6afc80219c4aaa)