uint32_t destnode,
struct ctdb_tunable *tunables);
-int ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority);
+void ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority);
bool parse_ip_mask(const char *s, const char *iface, ctdb_sock_addr *addr, unsigned *mask);
bool parse_ip_port(const char *s, ctdb_sock_addr *addr);
ctdb->vnn_map->generation = INVALID_GENERATION;
for (i=1; i<=NUM_DB_PRIORITIES; i++) {
- if (ctdb_start_freeze(ctdb, i) != 0) {
- DEBUG(DEBUG_ERR,(__location__ " Failed to freeze db priority %u\n", i));
- }
+ ctdb_start_freeze(ctdb, i);
}
ctdb_release_all_ips(ctdb);
ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE;
/*
start the freeze process for a certain priority
*/
-int ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority)
+void ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority)
{
if ((priority < 1) || (priority > NUM_DB_PRIORITIES)) {
DEBUG(DEBUG_ERR,(__location__ " Invalid db priority : %u\n", priority));
if (ctdb->freeze_mode[priority] == CTDB_FREEZE_FROZEN) {
/* we're already frozen */
- return 0;
+ return;
}
DEBUG(DEBUG_ERR, ("Freeze priority %u\n", priority));
/* if there isn't a freeze lock child then create one */
if (ctdb->freeze_handles[priority] == NULL) {
ctdb->freeze_handles[priority] = ctdb_freeze_lock(ctdb, priority);
- CTDB_NO_MEMORY(ctdb, ctdb->freeze_handles[priority]);
+ CTDB_NO_MEMORY_FATAL(ctdb, ctdb->freeze_handles[priority]);
ctdb->freeze_mode[priority] = CTDB_FREEZE_PENDING;
} else {
/* The previous free lock child has not yet been able to get locks.
* Invoke debugging script */
ctdb_debug_locks();
}
-
- return 0;
}
/*
return 0;
}
- if (ctdb_start_freeze(ctdb, priority) != 0) {
- DEBUG(DEBUG_ERR,(__location__ " Failed to start freezing databases with priority %u\n", priority));
- return -1;
- }
+ ctdb_start_freeze(ctdb, priority);
/* add ourselves to list of waiters */
if (ctdb->freeze_handles[priority] == NULL) {
int i;
for (i=1; i<=NUM_DB_PRIORITIES; i++) {
- if (ctdb_start_freeze(ctdb, i)) {
- DEBUG(DEBUG_ERR,(__location__ " Failed to freeze databases of prio %u\n", i));
- continue;
- }
+ ctdb_start_freeze(ctdb, i);
/* block until frozen */
while (ctdb->freeze_mode[i] == CTDB_FREEZE_PENDING) {