diff --git a/src/container/container_iv.c b/src/container/container_iv.c index c51ebe183a3..6f744025333 100644 --- a/src/container/container_iv.c +++ b/src/container/container_iv.c @@ -479,8 +479,9 @@ cont_iv_ent_fetch(struct ds_iv_entry *entry, struct ds_iv_key *key, rc = cont_iv_prop_ent_create(entry, key); if (rc == 0) goto again; - D_ERROR("create cont prop iv entry failed " - ""DF_RC"\n", DP_RC(rc)); + D_ERROR("cont " DF_UUID " create IV_CONT_PROP iv entry failed " + "" DF_RC "\n", + DP_UUID(civ_key->cont_uuid), DP_RC(rc)); } else if (class_id == IV_CONT_CAPA) { struct container_hdl chdl = { 0 }; int rc1; diff --git a/src/container/srv_container.c b/src/container/srv_container.c index d15c597b8e2..249c9cbef84 100644 --- a/src/container/srv_container.c +++ b/src/container/srv_container.c @@ -2058,8 +2058,10 @@ cont_lookup(struct rdb_tx *tx, const struct cont_svc *svc, const uuid_t uuid, st d_iov_set(&tmp, NULL, 0); /* check if the container exists or not */ rc = rdb_tx_lookup(tx, &svc->cs_conts, &key, &tmp); - if (rc != 0) + if (rc != 0) { + DL_ERROR(rc, "cont " DF_UUID ", rdb_tx_lookup failed.\n", DP_UUID(uuid)); D_GOTO(err, rc); + } D_ALLOC_PTR(p); if (p == NULL) { @@ -2126,6 +2128,7 @@ cont_lookup(struct rdb_tx *tx, const struct cont_svc *svc, const uuid_t uuid, st err_p: D_FREE(p); err: + DL_ERROR(rc, "cont " DF_UUID ", lookup failed.\n", DP_UUID(uuid)); return rc; } @@ -5934,8 +5937,11 @@ ds_cont_get_prop(uuid_t pool_uuid, uuid_t cont_uuid, daos_prop_t **prop_out) D_ASSERT(dss_get_module_info()->dmi_xs_id == 0); rc = cont_svc_lookup_leader(pool_uuid, 0, &svc, NULL); - if (rc != 0) + if (rc != 0) { + DL_ERROR(rc, "pool " DF_UUID " cont_svc_lookup_leader failed\n", + DP_UUID(pool_uuid)); return rc; + } rc = rdb_tx_begin(svc->cs_rsvc->s_db, svc->cs_rsvc->s_term, &tx); if (rc != 0) @@ -5943,8 +5949,10 @@ ds_cont_get_prop(uuid_t pool_uuid, uuid_t cont_uuid, daos_prop_t **prop_out) ABT_rwlock_rdlock(svc->cs_lock); rc = cont_lookup(&tx, svc, cont_uuid, &cont); - if (rc != 0) + if (rc != 0) { + DL_ERROR(rc, DF_CONT " cont_lookup failed\n", DP_CONT(pool_uuid, cont_uuid)); D_GOTO(out_lock, rc); + } rc = cont_prop_read(&tx, cont, DAOS_CO_QUERY_PROP_ALL, &prop, true); cont_put(cont); diff --git a/src/container/srv_epoch.c b/src/container/srv_epoch.c index ae1e7be322e..029285b00cc 100644 --- a/src/container/srv_epoch.c +++ b/src/container/srv_epoch.c @@ -1,5 +1,6 @@ /** * (C) Copyright 2016-2023 Intel Corporation. + * (C) Copyright 2025 Hewlett Packard Enterprise Development LP * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -682,8 +683,11 @@ ds_cont_get_snapshots(uuid_t pool_uuid, uuid_t cont_uuid, D_ASSERT(dss_get_module_info()->dmi_xs_id == 0); rc = cont_svc_lookup_leader(pool_uuid, 0, &svc, NULL); - if (rc != 0) + if (rc != 0) { + DL_ERROR(rc, "pool " DF_UUID " cont_svc_lookup_leader failed\n", + DP_UUID(pool_uuid)); return rc; + } rc = rdb_tx_begin(svc->cs_rsvc->s_db, svc->cs_rsvc->s_term, &tx); if (rc != 0) @@ -691,8 +695,10 @@ ds_cont_get_snapshots(uuid_t pool_uuid, uuid_t cont_uuid, ABT_rwlock_rdlock(svc->cs_lock); rc = cont_lookup(&tx, svc, cont_uuid, &cont); - if (rc != 0) + if (rc != 0) { + DL_ERROR(rc, DF_CONT " cont_lookup failed\n", DP_CONT(pool_uuid, cont_uuid)); D_GOTO(out_lock, rc); + } rc = read_snap_list(&tx, cont, snapshots, snap_count); cont_put(cont); diff --git a/src/pool/srv_pool.c b/src/pool/srv_pool.c index 433850100fe..45a67852ad7 100644 --- a/src/pool/srv_pool.c +++ b/src/pool/srv_pool.c @@ -2613,8 +2613,11 @@ ds_pool_cont_svc_lookup_leader(uuid_t pool_uuid, struct cont_svc **svcp, int rc; rc = pool_svc_lookup_leader(pool_uuid, &pool_svc, hint); - if (rc != 0) + if (rc != 0) { + DL_ERROR(rc, "pool " DF_UUID " pool_svc_lookup_leader failed\n", + DP_UUID(pool_uuid)); return rc; + } *svcp = pool_svc->ps_cont_svc; return 0; }