------------------------------------------------------------
revno: 559
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Thu 2007-07-05 09:59:11 +1000
message:
merge from ronnie
modified:
tools/ctdb.c
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1
------------------------------------------------------------
revno: 432.1.104
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Thu 2007-07-05 08:56:02 +1000
message:
add a command to ctdb to send tickle-ack's
------------------------------------------------------------
revno: 432.1.103
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Wed 2007-07-04 17:53:16 +1000
message:
merge from tridge
------------------------------------------------------------
revno: 432.1.102
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Wed 2007-07-04 17:37:26 +1000
message:
merge from tridge
------------------------------------------------------------
revno: 432.1.101
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Wed 2007-07-04 17:35:16 +1000
message:
merge from tridge
=== modified file 'tools/ctdb.c'
--- a/tools/ctdb.c 2007-07-04 06:51:13 +0000
+++ b/tools/ctdb.c 2007-07-04 22:56:02 +0000
@@ -338,6 +338,37 @@
}
/*
+ send a tcp tickle ack
+ */
+static int tickle_tcp(struct ctdb_context *ctdb, int argc, const char **argv)
+{
+ int ret;
+ struct sockaddr_in src, dst;
+
+ if (argc < 2) {
+ usage();
+ }
+
+ if (!parse_ip_port(argv[0], &src)) {
+ printf("Bad IP:port '%s'\n", argv[1]);
+ return -1;
+ }
+
+ if (!parse_ip_port(argv[1], &dst)) {
+ printf("Bad IP:port '%s'\n", argv[1]);
+ return -1;
+ }
+
+ ret = ctdb_sys_send_tcp(&src, &dst, 0, 0, 0);
+ if (ret==0) {
+ return 0;
+ }
+ printf("Error while sending tickle ack\n");
+
+ return -1;
+}
+
+/*
display public ip status
*/
static int control_ip(struct ctdb_context *ctdb, int argc, const char **argv)
@@ -859,6 +890,7 @@
{ "freeze", control_freeze, true, "freeze all
databases" },
{ "thaw", control_thaw, true, "thaw all
databases" },
{ "killtcp", kill_tcp, false, "kill a tcp
connection", "<srcip:port> <dstip:port>" },
+ { "tickle", tickle_tcp, false, "send a tcp
tickle ack", "<srcip:port> <dstip:port>" },
};
/*