- ret = ctdb_ctrl_uptime(ctdb, mem_ctx, CONTROL_TIMEOUT(),
- CTDB_CURRENT_NODE, &uptime2);
- if (ret != 0) {
- DEBUG(DEBUG_ERR, ("Unable to get uptime from local node %u\n", pnn));
- talloc_free(mem_ctx);
- return -1;
- }
-
- /* skip the check if the startrecovery time has changed */
- if (timeval_compare(&uptime1->last_recovery_started,
- &uptime2->last_recovery_started) != 0) {
- DEBUG(DEBUG_NOTICE, (__location__ " last recovery time changed while we read the public ip list. skipping public ip address check\n"));
- talloc_free(mem_ctx);
- return 0;
- }
-
- /* skip the check if the endrecovery time has changed */
- if (timeval_compare(&uptime1->last_recovery_finished,
- &uptime2->last_recovery_finished) != 0) {
- DEBUG(DEBUG_NOTICE, (__location__ " last recovery time changed while we read the public ip list. skipping public ip address check\n"));
- talloc_free(mem_ctx);
- return 0;
- }
-
- /* skip the check if we have started but not finished recovery */
- if (timeval_compare(&uptime1->last_recovery_finished,
- &uptime1->last_recovery_started) != 1) {
- DEBUG(DEBUG_INFO, (__location__ " in the middle of recovery or ip reallocation. skipping public ip address check\n"));
- talloc_free(mem_ctx);
-
- return 0;
- }
-