The Samba-Bugzilla – Attachment 12376 Details for
Bug 12152
Fix "ctdb addip" implementation to match "ctdb delip"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for v4-5 branch
BZ12152-v4-5.patch (text/plain), 3.51 KB, created by
Amitay Isaacs
on 2016-08-18 05:36:33 UTC
(
hide
)
Description:
Patches for v4-5 branch
Filename:
MIME Type:
Creator:
Amitay Isaacs
Created:
2016-08-18 05:36:33 UTC
Size:
3.51 KB
patch
obsolete
>From a8b1c150a275e36859b07cdacf42c893080c07b0 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Mon, 15 Aug 2016 15:54:51 +1000 >Subject: [PATCH] ctdb-tools: Addition of IPs is deferred until the next > takeover run > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12152 > >This makes the behaviour of "ctdb addip" similar to "ctdb delip". > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Martin Schwenke <martin@meltin.net> >(cherry picked from commit f635bd8997e2df1ed61429520e19fedb13cad97e) >--- > ctdb/doc/ctdb.1.xml | 13 ++++++++----- > ctdb/tests/simple/16_ctdb_config_add_ip.sh | 1 + > ctdb/tests/simple/60_recoverd_missing_ip.sh | 1 + > ctdb/tools/ctdb.c | 2 +- > 4 files changed, 11 insertions(+), 6 deletions(-) > >diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml >index 9324813..d295213 100644 >--- a/ctdb/doc/ctdb.1.xml >+++ b/ctdb/doc/ctdb.1.xml >@@ -1031,13 +1031,16 @@ DB Statistics: locking.tdb > <refsect2> > <title>addip <parameter>IPADDR</parameter>/<parameter>mask</parameter> <parameter>IFACE</parameter></title> > <para> >- This command is used to add a new public ip to a node during runtime. >- This allows public addresses to be added to a cluster without having >- to restart the ctdb daemons. >+ This command is used to add a new public ip to a node >+ during runtime. It should be followed by a <command>ctdb >+ ipreallocate</command>. This allows public addresses to be >+ added to a cluster without having to restart the ctdb daemons. > </para> > <para> >- Note that this only updates the runtime instance of ctdb. Any changes will be lost next time ctdb is restarted and the public addresses file is re-read. >- If you want this change to be permanent you must also update the public addresses file manually. >+ Note that this only updates the runtime instance of ctdb. Any >+ changes will be lost next time ctdb is restarted and the public >+ addresses file is re-read. If you want this change to be >+ permanent you must also update the public addresses file manually. > </para> > </refsect2> > >diff --git a/ctdb/tests/simple/16_ctdb_config_add_ip.sh b/ctdb/tests/simple/16_ctdb_config_add_ip.sh >index d33ec04..0bc668a 100755 >--- a/ctdb/tests/simple/16_ctdb_config_add_ip.sh >+++ b/ctdb/tests/simple/16_ctdb_config_add_ip.sh >@@ -34,4 +34,5 @@ try_command_on_node -v all $CTDB ip > > echo "Adding IP ${test_ip}/${mask} on ${iface}, node ${test_node}" > try_command_on_node $test_node $CTDB addip ${test_ip}/${mask} $iface >+try_command_on_node $test_node $CTDB ipreallocate > wait_until_ips_are_on_node $test_node $test_ip >diff --git a/ctdb/tests/simple/60_recoverd_missing_ip.sh b/ctdb/tests/simple/60_recoverd_missing_ip.sh >index cf68b19..c6b4de0 100755 >--- a/ctdb/tests/simple/60_recoverd_missing_ip.sh >+++ b/ctdb/tests/simple/60_recoverd_missing_ip.sh >@@ -63,6 +63,7 @@ try_command_on_node $test_node $CTDB setifacelink $iface down > > echo "Adding IP $test_ip to node $test_node" > try_command_on_node $test_node $CTDB addip $test_ip/$mask $iface >+try_command_on_node $test_node $CTDB ipreallocate > > echo "Wait long enough for IP verification to have taken place" > sleep_for 15 >diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c >index 4191fc5..e3e68f2 100644 >--- a/ctdb/tools/ctdb.c >+++ b/ctdb/tools/ctdb.c >@@ -3907,7 +3907,7 @@ static int control_addip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, > return ret; > } > >- return ipreallocate(mem_ctx, ctdb); >+ return 0; > } > > static int control_delip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
martins
:
review+
Actions:
View
Attachments on
bug 12152
: 12376