Skip to content

DAOS-19589 tests: Fix dmg_negative_test extend cases - #19106

Open
liw wants to merge 1 commit into
masterfrom
liw/filter-err-ii
Open

liw wants to merge 1 commit into
masterfrom
liw/filter-err-ii

Conversation

@liw

@liw liw commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

The logic of run_osa_dmg_test when extend is True seems strange:

  • It avoids extending the pool to rank 0, but treats the other ranks
    in the pool differently.

  • It uses the expected results which sometimes are based on invalid
    targets, even though the extend command does not take targets
    parameter.

This might have led to the extend command returning an error when given
a rank that is already in the pool, while the exclude, drain, and
reintegrate commands all succeed when given ranks that is already
excluded, drained, and reintegrated, respectively. #18651 and #19026
have changed the extend case to succeed. This patch fixes
dmg_negative_test to match the new behavior.

Test-tag: OSADmgNegativeTest

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

@github-actions

Copy link
Copy Markdown

Ticket title is 'osa/dmg_negative_test.py:OSADmgNegativeTest.test_osa_dmg_cmd_without_extend- pool reintegration rank is stating OK without pool exclude the rank '
Status is 'In Progress'
Labels: 'ci_master_daily'
https://daosio.atlassian.net/browse/DAOS-19589

@liw
liw marked this pull request as ready for review September 17, 2026 11:08
@liw
liw requested review from a team as code owners September 17, 2026 11:08
@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Cluster Box Medium MD on SSD completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-19106/2/testReport/

@liw
liw marked this pull request as draft September 17, 2026 15:02
@liw
liw force-pushed the liw/filter-err-ii branch from aff0305 to 4f899b4 Compare September 18, 2026 01:59
@liw liw changed the title DAOS-19589 pool: Abort extend upon joined ranks DAOS-19589 tests: Fix dmg_negative_test extend cases Sep 18, 2026
@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Large MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19106/2/execution/node/1837/log

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Medium MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19106/3/execution/node/1059/log

The logic of run_osa_dmg_test when extend is True seems strange:

  - It avoids extending the pool to rank 0, but treats the other ranks
    in the pool differently.

  - It uses the expected results which sometimes are based on invalid
    targets, even though the extend command does not take targets
    parameter.

This might have led to the extend command returning an error when given
a rank that is already in the pool, while the exclude, drain, and
reintegrate commands all succeed when given ranks that is already
excluded, drained, and reintegrated, respectively. #18651 and #19026
have changed the extend case to succeed. This patch fixes
dmg_negative_test to match the new behavior.

Test-tag: OSADmgNegativeTest
Signed-off-by: Li Wei <liwei@hpe.com>
@liw
liw force-pushed the liw/filter-err-ii branch from 4f899b4 to 0504206 Compare September 18, 2026 11:26
@liw
liw marked this pull request as ready for review September 18, 2026 13:17
@liw
liw requested review from a team as code owners September 18, 2026 13:17
# There is no need to extend rank 0-3
# Avoid DER_ALREADY
if extend is True and rank != "0":
if extend is True and rank in ["4", "5"]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is existing, so I don't expect this PR to fix it, but I think part of the problem with this logic is that the ranks are hardcoded. IMO it would be more robust to query the pool and extend only if the ranks are not already in the pool. I think reading such logic would make the behavior of the test more clear. But I will leave that for future enhancement.

@liw liw Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed. This test has confused me quite a bit and taken several iterations to fix properly. On top of that the value seems moderate.

@rpadma2 rpadma2 Sep 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am bit lost why this change is needed? The test is simple....

It takes the following test sequence and runs them in the loop based on whether extend needs to be done or not...

dmg_cmd_test:
# Rank list, target_list, Pass/Fail Condition
# Invalid Rank list
- ["7", "0,1", "Fail"]
# Invalid Target list
- ["1", "0,10", "Fail"]
- ["2", "10", "Fail"]
- ["3", "10", "Fail"]
# Invalid rank, target
- ["7", "11", "Fail"]
# Valid Rank and Target
- ["0", "1,2", "Pass"]
- ["4", "0,2", "Pass"]
- ["5", "1,2", "Pass"]

If some can explain me what is wrong with the original code, I can try to understand...

Basically it looks like the for loop takes each rows and uses the first value as a rank and try to run the dmg pool command, some ranks are invalid and some are valid...
For the following row is skipped ["0", "1,2", "Pass"] based on this check ---> if extend is True and rank != "0":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NOTE: This is a negative test... We are trying to pass invalid and some valid ranks... The only Valid rank test cases are related to ranks=0,4,5.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please provide me the Jenkins failure for the test which we are trying to address. To me, there is no need to change this test... I maybe wrong. But, I would like to review the failure before approving this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure why this change is needed either. validate_results can handle failed dmg pool extend (non-zero exit status) if you pass in Fail to exp_result.

I'm guessing there's a reason that we don't want to extend rank 1, 2, 3, and 7, but we want to continue testing the rest of the commands with those ranks. If so, we should explain that somewhere.

@liw

liw commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

I consider this ready to land as soon as there's a second approval.

@daltonbohning daltonbohning added the release-3.0.0 Targeted for release 3.0.0 label Sep 19, 2026
# There is no need to extend rank 0-3
# Avoid DER_ALREADY
if extend is True and rank != "0":
if extend is True and rank in ["4", "5"]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please provide me the Jenkins failure for the test which we are trying to address. To me, there is no need to change this test... I maybe wrong. But, I would like to review the failure before approving this PR.

# There is no need to extend rank 0-3
# Avoid DER_ALREADY
if extend is True and rank != "0":
if extend is True and rank in ["4", "5"]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure why this change is needed either. validate_results can handle failed dmg pool extend (non-zero exit status) if you pass in Fail to exp_result.

I'm guessing there's a reason that we don't want to extend rank 1, 2, 3, and 7, but we want to continue testing the rest of the commands with those ranks. If so, we should explain that somewhere.


# Extend the pool
# There is no need to extend rank 0
# There is no need to extend rank 0-3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
# There is no need to extend rank 0-3
# There is no need to extend rank 0-3 and 7

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

Labels

release-3.0.0 Targeted for release 3.0.0

Development

Successfully merging this pull request may close these issues.

5 participants