ISC_LIST_INIT(cleanup);
/*
- * Updates are disabled. Pause for 5 minutes.
+ * Updates are disabled. Pause for 1 minute.
*/
if (zone->update_disabled) {
result = ISC_R_FAILURE;
- goto failure;
+ goto cleanup;
}
ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_read);
ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_read);
if (db == NULL) {
result = ISC_R_FAILURE;
- goto failure;
+ goto cleanup;
}
result = dns_db_newversion(db, &version);
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:dns_db_newversion -> %s",
dns_result_totext(result));
- goto failure;
+ goto cleanup;
}
isc_stdtime_get(&now);
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:dns__zone_findkeys -> %s",
dns_result_totext(result));
- goto failure;
+ goto cleanup;
}
sigvalidityinterval = dns_zone_getsigvalidityinterval(zone);
ISC_LOG_ERROR,
"updatesecure -> %s",
dns_result_totext(result));
- goto failure;
+ goto cleanup;
}
}
result = updatesignwithkey(zone, signing,
dns_zone_log(zone, ISC_LOG_ERROR,
"updatesignwithkey -> %s",
dns_result_totext(result));
- goto failure;
+ goto cleanup;
}
build_nsec = false;
goto next_signing;
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:dns_dbiterator_next -> %s",
dns_result_totext(result));
- goto failure;
+ goto cleanup;
} else if (is_bottom_of_zone) {
dns_dbiterator_current(signing->dbiterator,
&node, nextname);
dns_zone_log(zone, ISC_LOG_ERROR, "zone_sign:"
"dns__zone_updatesigs -> %s",
dns_result_totext(result));
- goto failure;
+ goto cleanup;
}
}
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:del_sigs -> %s",
dns_result_totext(result));
- goto failure;
+ goto cleanup;
}
result = update_soa_serial(db, version, zonediff.diff, zone->mctx,
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:update_soa_serial -> %s",
dns_result_totext(result));
- goto failure;
+ goto cleanup;
}
/*
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:add_sigs -> %s",
dns_result_totext(result));
- goto failure;
+ goto cleanup;
}
/*
}
failure:
+ if (result != ISC_R_SUCCESS) {
+ dns_zone_log(zone, ISC_LOG_ERROR, "zone_sign: failed: %s",
+ dns_result_totext(result));
+ }
+
+ cleanup:
/*
* Pause all dbiterators.
*/