Bug 12506 - 3 nodes cluster, restart ctdb on one node, ctdb ip -1
Summary: 3 nodes cluster, restart ctdb on one node, ctdb ip -1
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Amitay Isaacs
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-10 02:28 UTC by sunyekuan
Modified: 2017-01-13 09:21 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sunyekuan 2017-01-10 02:28:08 UTC
a 3 nodes cluster, when i restart ctdb on one node, then execute command "ctdb ip", the public ips have -1. for example:
ctdb ip
192.168.10.11 -1
192.168.10.12 -1
192.168.10.13 0
but execute the command "ctdb ip", the result is correct, for example:
192.168.10.11 2
192.168.10.12 1
192.168.10.13 0

all nodes "ctdb status" is OK.

ask for some help and suggestions.
thank you!
Comment 1 sunyekuan 2017-01-10 04:48:59 UTC
but execute the command "ctdb ip" on the other node, the result is correct, for example:
192.168.10.11 2
192.168.10.12 1
192.168.10.13 0
Comment 2 Amitay Isaacs 2017-01-10 05:08:35 UTC
When CTDB is started, none of the IP addresses get assigned till at least one of the nodes becomes healthy.  When the IP addresses are not assigned, it will print -1 as the node number.

This is not an error.

You must always check "ctdb status" to see if at least one of the nodes is HEALTHY.  Only then it makes sense to run "ctdb ip" to check the IP allocation.
Comment 3 sunyekuan 2017-01-10 05:43:08 UTC
Thanks for the reply
Sorry I did not describe clearly;
At the beginning, 3 nodes of the cluster "ctdb status" and "ctdb ip" are all OK and successfully allocated, as follows:
ctdb ip
192.168.10.11 2
192.168.10.12 1
192.168.10.13 0

Then I restart ctdb on node 0, after a while, I execute "ctdb ip" on node 0 and found that:
192.168.10.11 -1
192.168.10.12 -1
192.168.10.13 0
but "ctdb status" is OK.

and node 1 and node 2 "ctdb ip" are as follows:
192.168.10.11 2
192.168.10.12 1
192.168.10.13 0

I don't know why?
Comment 4 Amitay Isaacs 2017-01-10 05:48:31 UTC
(In reply to sunyekuan from comment #3)

What version of CTDB are you using?

There is a bug (12470) in the implementation of "ctdb ip" command for CTDB 4.5.x. This will be fixed in CTDB 4.5.4.
Comment 5 sunyekuan 2017-01-10 05:57:51 UTC
my samba version is 4.5.1.
I review the bug 12470 and found my problems are same as 12470.
thank you very much.
and when could download the 4.5.4 ?
Comment 6 Amitay Isaacs 2017-01-10 06:10:39 UTC
(In reply to sunyekuan from comment #5)

The release schedule for Samba 4.5.x is available here:

  https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.5

As per the schedule, Samba 4.5.4 will be released on Jan 18th.

*** This bug has been marked as a duplicate of bug 12470 ***
Comment 7 sunyekuan 2017-01-10 06:17:25 UTC
OK, thank you very much.
I met another problem. Could you help me see the bug(12504).
thank again.
Comment 8 sunyekuan 2017-01-13 09:21:56 UTC
Except bug(12470), I have the following problem which I mentioned before:
At the beginning, 3 nodes of the cluster "ctdb status" and "ctdb ip" are all OK and successfully allocated, as follows:
ctdb ip
192.168.10.11 2
192.168.10.12 1
192.168.10.13 0

Then I restart ctdb on node 0, after a while, I execute "ctdb ip" on node 0 and found that:
192.168.10.11 -1
192.168.10.12 -1
192.168.10.13 0
but "ctdb status" is OK.

and node 1 and node 2 "ctdb ip" are as follows:
192.168.10.11 2
192.168.10.12 1
192.168.10.13 0

Is the problem same as bug(12470) ?

Thank you very much.