ctdb-takeover: Generalise error handling for GET_PUBLIC_IPS