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-15847 container: add a few debug log #15962

Closed
wants to merge 1 commit into from

Conversation

liuxuezhao
Copy link
Contributor

add a few logs to facilitate debug.

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate owners.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

add a few logs to facilitate debug.

Signed-off-by: Xuezhao Liu <[email protected]>
@liuxuezhao liuxuezhao requested review from a team as code owners February 24, 2025 09:48
Copy link

Ticket title is 'refine rebuild's error handling'
Status is 'Open'
https://daosio.atlassian.net/browse/DAOS-15847

@@ -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 "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest use DL_ERROR(rc, ...) here

also it may be helpful to log the container UUID in the other log calls in this function like D_DEBUG above on line 476 for IV_CONT_SNAP case and the D_DEBUG on line 546 at the end of the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, this PR included in #15994

@@ -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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if adding an ERR message in this internal function is good - maybe it could cause a bunch of unwanted logging in certain cases? There are many callers, and it seems there are differences in the callers, whether they invoke DL_ERROR if this function returns rc != 0.

@@ -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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above. Also, if these errors are kept, probably don't need "cont " in the output since the function name already has that.

@liuxuezhao liuxuezhao closed this Feb 28, 2025
@liuxuezhao
Copy link
Contributor Author

replaced by #15994

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants