ctdb-daemon: Add function ctdb_ip_to_node()
authorMartin Schwenke <martin@meltin.net>
Thu, 8 Aug 2019 06:20:44 +0000 (16:20 +1000)
committerMartin Schwenke <martins@samba.org>
Fri, 16 Aug 2019 21:30:35 +0000 (21:30 +0000)
commit3acb8e9d1c854b577d6be282257269df83055d31
treea6ef0173a21a24440d3af9e03a944237e27a2a5d
parent5cb539d8adedadee2089edd334ffc8c0bd3e4c77
ctdb-daemon: Add function ctdb_ip_to_node()

This is the core logic from ctdb_ip_to_pnn(), so re-implement that
that function using ctdb_ip_to_node().

Something similar (ctdb_ip_to_nodeid()) was recently removed in commit
010c1d77cd7e192b1fff39b7b91fccbdbbf4a786 because it wasn't required.
Now there is a use case.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14084

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/include/ctdb_private.h
ctdb/server/ctdb_server.c