ctdb-scripts: Add caching function for public IPs
commited3f041c309e84bcb73fda9a7a68dbf69f63e3e3
authorMartin Schwenke <mschwenke@ddn.com>
Thu, 15 Jun 2023 06:21:19 +0000 (15 16:21 +1000)
committerVolker Lendecke <vl@samba.org>
Thu, 30 May 2024 11:42:30 +0000 (30 11:42 +0000)
tree2333bdbb3431e2dfaed699082853136f3d4d90bc
parent558cf280b22e0433c3601f47fb1ce8b660e71691
ctdb-scripts: Add caching function for public IPs

This is way more complicated than I would like but, as per the
comment, this is due to complexities in the way public IPs work.  The
main consumer will be statd-callout, which will then be able to run as
a non-root user.

Also generate the cache file in test code, whenever the PNN is set.
However, this can cause "ctdb ip" to generate a fake IP layout before
public IPs are setup.  So, have the "ctdb ip" stub generate the IP
layout every time it is run to avoid it being stale.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
ctdb/config/events/legacy/10.interface.script
ctdb/config/functions
ctdb/tests/UNIT/eventscripts/scripts/local.sh
ctdb/tests/UNIT/eventscripts/stubs/ctdb