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-11663 common: fault injection to simulate DAOS inconsistency #10933

Merged
merged 2 commits into from
Dec 2, 2022

Conversation

Nasf-Fan
Copy link
Contributor

@Nasf-Fan Nasf-Fan commented Nov 30, 2022

In includes the following:

  1. DAOS_CHK_CONT_ORPHAN
    Take effect when destory the container, that will cause the
    container shards to be left on related targets then simulate
    the case of orphan container.

  2. DAOS_CHK_CONT_BAD_LABEL
    Take effect when change the container label, that will cause
    the container label in the container service does not match
    the one in the container property.

Signed-off-by: Fan Yong [email protected]

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 watchers.
  • 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.

In includes the following:

1. DAOS_CHK_CONT_ORPHAN
   Take effect when destory the container, that will cause the
   container shards to be left on related targets then simulate
   the case of orphan container.

2. DAOS_CHK_CONT_BAD_LABEL
   Take effect when change the container label, that will cause
   the container label in the container service does not match
   the one in the container property.

Signed-off-by: Fan Yong <[email protected]>
@github-actions
Copy link

github-actions bot commented Nov 30, 2022

Bug-tracker data:
Ticket title is 'Command line tool for DAOS fault injection'
Status is 'In Progress'
https://daosio.atlassian.net/browse/DAOS-11663

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@Nasf-Fan Nasf-Fan force-pushed the Nasf-Fan/DAOS-11663 branch from 56b049a to a3b971a Compare November 30, 2022 06:41
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@Nasf-Fan Nasf-Fan changed the title Nasf fan/daos 11663 DAOS-11663 common: fault injection to simulate DAOS inconsistency Nov 30, 2022
@daosbuild1
Copy link
Collaborator

Test stage Functional on EL 8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-10933/2/testReport/(root)/

@Nasf-Fan Nasf-Fan force-pushed the Nasf-Fan/DAOS-11663 branch from a3b971a to 299b081 Compare November 30, 2022 09:16
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-10933/3/execution/node/357/log

@daosbuild1
Copy link
Collaborator

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-10933/3/execution/node/316/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-10933/3/execution/node/324/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-10933/3/execution/node/321/log

@Nasf-Fan Nasf-Fan force-pushed the Nasf-Fan/DAOS-11663 branch from 299b081 to 9ff2d53 Compare November 30, 2022 14:31
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-10933/4/execution/node/1028/log

Copy link
Contributor

@mjmac mjmac left a comment

Choose a reason for hiding this comment

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

One small nit in the spelling of "label". I am not very familiar with daos_fail_loc, but I'll look into it.

@@ -825,6 +825,10 @@ enum {
#define DAOS_FORCE_EC_AGG_PEER_FAIL (DAOS_FAIL_UNIT_TEST_GROUP_LOC | 0x9a)
#define DAOS_FAIL_TX_CONVERT (DAOS_FAIL_UNIT_TEST_GROUP_LOC | 0x9b)

#define DAOS_CHK_POOL_ORPHAN (DAOS_FAIL_UNIT_TEST_GROUP_LOC | 0xa0)
#define DAOS_CHK_CONT_ORPHAN (DAOS_FAIL_UNIT_TEST_GROUP_LOC | 0xa1)
#define DAOS_CHK_CONT_BAD_LABLE (DAOS_FAIL_UNIT_TEST_GROUP_LOC | 0xa2)
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: Should be DAOS_CHK_CONT_BAD_LABEL

Comment on lines 234 to 235
if (DAOS_FAIL_CHECK(DAOS_CHK_POOL_ORPHAN))
D_GOTO(out, rc = 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this? We already have dmg faults mgmt-svc pool $pool POOL_NONEXIST_ON_MS which as far as I can tell does the same thing. It removes the pool entry from the MS so that the checker finds the orphaned pool.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good to know that. I will remove it.
I think we also need the fault injection to simulate POOL_NONEXIST_ON_ENGINE, means to destroy the pool shards on targets, but with the pool entry kept on MS.

src/container/srv_container.c Outdated Show resolved Hide resolved
Comment on lines +1301 to +1302
if (!DAOS_FAIL_CHECK(DAOS_CHK_CONT_ORPHAN))
rc = ds_cont_tgt_destroy(in->tdi_pool_uuid, in->tdi_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 think this is all we really need now, right? I think we can probably just use the daos_debug_set_params utility for this. I could make dmg shell out to that utility because it's not very nice to use, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It am not sure whether it is convenient for @shimizukko to directly use the C API in his CR demo scripts or we have some utils named daos_debug_set_params?

Copy link
Contributor

Choose a reason for hiding this comment

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

I could add this to the daos tool, maybe. The dmg tool does not have any connection to the C API, and we don't want to add a new dependency just for this faults use case. I'll think about adding a new daos faults subcommand.

@Nasf-Fan Nasf-Fan force-pushed the Nasf-Fan/DAOS-11663 branch from 9ff2d53 to ea2fc7e Compare December 1, 2022 02:29
@Nasf-Fan Nasf-Fan requested review from shimizukko and mjmac December 1, 2022 02:29
@Nasf-Fan Nasf-Fan force-pushed the Nasf-Fan/DAOS-11663 branch from ea2fc7e to 85f257c Compare December 1, 2022 02:31
@daosbuild1
Copy link
Collaborator

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-10933/6/execution/node/368/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-10933/6/execution/node/303/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-10933/6/execution/node/300/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-10933/6/execution/node/343/log

@Nasf-Fan Nasf-Fan force-pushed the Nasf-Fan/DAOS-11663 branch from 85f257c to a76cb6d Compare December 1, 2022 04:12
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Add support for the following faults:
  * daos faults DAOS_CHK_CONT_ORPHAN
    Fail to remove container during destroy
  * DAOS_CHK_CONT_BAD_LABEL
    Fail to persist set-prop --properties label:$newval

Signed-off-by: Michael MacDonald <[email protected]>
@mjmac mjmac marked this pull request as ready for review December 2, 2022 01:09
@mjmac mjmac requested a review from a team as a code owner December 2, 2022 01:09
@mjmac mjmac merged commit b259db2 into feature/cat_recovery Dec 2, 2022
@mjmac mjmac deleted the Nasf-Fan/DAOS-11663 branch December 2, 2022 01:11
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.

4 participants