2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

log a error if we don't explicitly know that a error has been logged in zone_sign

This commit is contained in:
Mark Andrews
2018-12-04 13:39:00 +11:00
parent 8b17f364a9
commit b108376a10

View File

@@ -8495,11 +8495,11 @@ zone_sign(dns_zone_t *zone) {
ISC_LIST_INIT(cleanup); ISC_LIST_INIT(cleanup);
/* /*
* Updates are disabled. Pause for 5 minutes. * Updates are disabled. Pause for 1 minute.
*/ */
if (zone->update_disabled) { if (zone->update_disabled) {
result = ISC_R_FAILURE; result = ISC_R_FAILURE;
goto failure; goto cleanup;
} }
ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_read); ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_read);
@@ -8508,7 +8508,7 @@ zone_sign(dns_zone_t *zone) {
ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_read); ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_read);
if (db == NULL) { if (db == NULL) {
result = ISC_R_FAILURE; result = ISC_R_FAILURE;
goto failure; goto cleanup;
} }
result = dns_db_newversion(db, &version); result = dns_db_newversion(db, &version);
@@ -8516,7 +8516,7 @@ zone_sign(dns_zone_t *zone) {
dns_zone_log(zone, ISC_LOG_ERROR, dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:dns_db_newversion -> %s", "zone_sign:dns_db_newversion -> %s",
dns_result_totext(result)); dns_result_totext(result));
goto failure; goto cleanup;
} }
isc_stdtime_get(&now); isc_stdtime_get(&now);
@@ -8527,7 +8527,7 @@ zone_sign(dns_zone_t *zone) {
dns_zone_log(zone, ISC_LOG_ERROR, dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:dns__zone_findkeys -> %s", "zone_sign:dns__zone_findkeys -> %s",
dns_result_totext(result)); dns_result_totext(result));
goto failure; goto cleanup;
} }
sigvalidityinterval = dns_zone_getsigvalidityinterval(zone); sigvalidityinterval = dns_zone_getsigvalidityinterval(zone);
@@ -8803,7 +8803,7 @@ zone_sign(dns_zone_t *zone) {
ISC_LOG_ERROR, ISC_LOG_ERROR,
"updatesecure -> %s", "updatesecure -> %s",
dns_result_totext(result)); dns_result_totext(result));
goto failure; goto cleanup;
} }
} }
result = updatesignwithkey(zone, signing, result = updatesignwithkey(zone, signing,
@@ -8815,7 +8815,7 @@ zone_sign(dns_zone_t *zone) {
dns_zone_log(zone, ISC_LOG_ERROR, dns_zone_log(zone, ISC_LOG_ERROR,
"updatesignwithkey -> %s", "updatesignwithkey -> %s",
dns_result_totext(result)); dns_result_totext(result));
goto failure; goto cleanup;
} }
build_nsec = false; build_nsec = false;
goto next_signing; goto next_signing;
@@ -8823,7 +8823,7 @@ zone_sign(dns_zone_t *zone) {
dns_zone_log(zone, ISC_LOG_ERROR, dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:dns_dbiterator_next -> %s", "zone_sign:dns_dbiterator_next -> %s",
dns_result_totext(result)); dns_result_totext(result));
goto failure; goto cleanup;
} else if (is_bottom_of_zone) { } else if (is_bottom_of_zone) {
dns_dbiterator_current(signing->dbiterator, dns_dbiterator_current(signing->dbiterator,
&node, nextname); &node, nextname);
@@ -8851,7 +8851,7 @@ zone_sign(dns_zone_t *zone) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_sign:" dns_zone_log(zone, ISC_LOG_ERROR, "zone_sign:"
"dns__zone_updatesigs -> %s", "dns__zone_updatesigs -> %s",
dns_result_totext(result)); dns_result_totext(result));
goto failure; goto cleanup;
} }
} }
@@ -8873,7 +8873,7 @@ zone_sign(dns_zone_t *zone) {
dns_zone_log(zone, ISC_LOG_ERROR, dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:del_sigs -> %s", "zone_sign:del_sigs -> %s",
dns_result_totext(result)); dns_result_totext(result));
goto failure; goto cleanup;
} }
result = update_soa_serial(db, version, zonediff.diff, zone->mctx, result = update_soa_serial(db, version, zonediff.diff, zone->mctx,
@@ -8882,7 +8882,7 @@ zone_sign(dns_zone_t *zone) {
dns_zone_log(zone, ISC_LOG_ERROR, dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:update_soa_serial -> %s", "zone_sign:update_soa_serial -> %s",
dns_result_totext(result)); dns_result_totext(result));
goto failure; goto cleanup;
} }
/* /*
@@ -8896,7 +8896,7 @@ zone_sign(dns_zone_t *zone) {
dns_zone_log(zone, ISC_LOG_ERROR, dns_zone_log(zone, ISC_LOG_ERROR,
"zone_sign:add_sigs -> %s", "zone_sign:add_sigs -> %s",
dns_result_totext(result)); dns_result_totext(result));
goto failure; goto cleanup;
} }
/* /*
@@ -8945,6 +8945,12 @@ zone_sign(dns_zone_t *zone) {
} }
failure: 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. * Pause all dbiterators.
*/ */