Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-6572 engine: Use CDEBUG to silence shutdown warnings. #4859

Merged
merged 8 commits into from
Mar 9, 2021
5 changes: 3 additions & 2 deletions src/container/srv_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ cont_aggregate_epr(struct ds_cont_child *cont, daos_epoch_range_t *epr,
rc = ds_obj_ec_aggregate(cont, epr, dss_ult_yield,
(void *)cont->sc_agg_req, is_current);
if (rc) {
D_CDEBUG(rc == -DER_NOTLEADER || rc == -DER_SHUTDOWN,
DB_ANY, DLOG_ERR,
"EC aggregation returned: "DF_RC"\n", DP_RC(rc));
if (rc == -DER_NOTLEADER)
return -DER_SHUTDOWN;
D_ERROR("EC aggregation returned: "DF_RC"\n",
DP_RC(rc));
}

if (dss_ult_exiting(cont->sc_agg_req))
Expand Down
3 changes: 2 additions & 1 deletion src/pool/srv_iv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,8 @@ ds_pool_iv_srv_hdl_fetch(struct ds_pool *pool, uuid_t *pool_hdl_uuid,
pool_key->pik_entry_size = sizeof(struct pool_iv_entry);
rc = ds_iv_fetch(pool->sp_iv_ns, &key, &sgl, false /* retry */);
if (rc) {
D_CDEBUG(rc == -DER_NOTLEADER, DB_ANY, DLOG_ERR,
D_CDEBUG(rc == -DER_NOTLEADER || rc == -DER_SHUTDOWN,
DB_ANY, DLOG_ERR,
"iv fetch failed "DF_RC"\n", DP_RC(rc));
D_GOTO(out, rc);
}
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/cart/util/cart_logparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def __lnext(self):
if not line:
raise StopIteration
fields = line.split(' ', 8)
if len(fields) < 6 or len(fields[0]) != 17:
if len(fields) < 6 or len(fields[0]) != 17 or fields[0][2] != '/':
return LogRaw(line)
return LogLine(line)

Expand Down
10 changes: 9 additions & 1 deletion src/tests/ftest/cart/util/cart_logtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ def _check_pid_from_log_file(self,
err_count = 0
warnings_strict = False
warnings_mode = False
server_shutdown = False

regions = OrderedDict()
memsize = hwm_counter()
Expand All @@ -376,6 +377,9 @@ def _check_pid_from_log_file(self,
except AttributeError:
pass
if abort_on_warning:
if not server_shutdown and \
line.fac != 'external' and line.function == 'server_fini':
server_shutdown = True
if line.level <= cart_logparse.LOG_LEVELS['WARN']:
show = True
if self.hide_fi_calls:
Expand Down Expand Up @@ -416,6 +420,9 @@ def _check_pid_from_log_file(self,
show = False
if line.fac == 'external':
show = False
if show and server_shutdown and line.get_msg().endswith(
"DER_SHUTDOWN(-2017): 'Service should shut down'"):
show = False
if show:
# Allow WARNING or ERROR messages, but anything higher
# like assert should trigger a failure.
Expand Down Expand Up @@ -690,6 +697,7 @@ def run():
parser.add_argument('--dfuse',
help='Summarise dfuse I/O',
action='store_true')
parser.add_argument('--warnings', action='store_true')
parser.add_argument('file', help='input file')
args = parser.parse_args()
try:
Expand All @@ -709,7 +717,7 @@ def run():
test_iter.check_dfuse_io()
else:
try:
test_iter.check_log_file(False)
test_iter.check_log_file(args.warnings)
except LogError:
print('Errors in log file, ignoring')
except NotAllFreed:
Expand Down