ctdbd: Clean up orphaned interfaces when an IP is deleted
commit4f0d68cba6b905ff19c7183dfbeb740e1162aa54
authorMartin Schwenke <martin@meltin.net>
Fri, 23 Nov 2012 09:09:07 +0000 (23 20:09 +1100)
committerMartin Schwenke <martin@meltin.net>
Mon, 7 Jan 2013 01:19:33 +0000 (7 12:19 +1100)
tree4f986512978a3f44f1e37163df637f757f55baec
parent1eddc33d7043616eef9c29f07f2cb750ce5a676f
ctdbd: Clean up orphaned interfaces when an IP is deleted

Add a new function ctdb_remove_orphaned_ifaces() and call it in
ctdb_control_del_public_address().

ctdb_remove_orphaned_ifaces() uses a naive implementation that does
things in a very obvious way.  There are many ways to improve the
performance - some are mentioned in a comment in the code.  However, I
doubt that this will be a bottleneck even with a large number of
public IPs.  Running the eventscript is likely to outweigh the cost of
this cleanup.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit cc1a3ae911d3fee8b87fda5de5ab6d9499d7510a)
ctdb/server/ctdb_takeover.c