Skip to content

DAOS-17915 test: Add mem ratio pool creation test - #16760

Merged
phender merged 43 commits into
masterfrom
hendersp/DAOS-17915
Oct 16, 2025
Merged

phender merged 43 commits into
masterfrom
hendersp/DAOS-17915

Conversation

@phender

@phender phender commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Test pool creation with various mem ratio sizes.

Skip-unit-tests: true
Skip-fault-injection-test: true

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).

Test pool creation with various mem ratio sizes.

Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@github-actions

github-actions Bot commented Aug 22, 2025 •

Copy link
Copy Markdown

Ticket title is 'Verify pool creation with different mem_ratio sizes'
Status is 'In Review'
Labels: 'md_on_ssd,test_2.8,testp1'
https://daosio.atlassian.net/browse/DAOS-17915

Skip-unit-tests: true
Skip-fault-injection-test: true
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@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-16760/2/execution/node/1057/log

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware 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-16760/3/testReport/

Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@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-16760/4/execution/node/976/log

Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@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-16760/5/execution/node/976/log

Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@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-16760/6/execution/node/976/log

Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@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-16760/7/execution/node/976/log

Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
Comment thread src/tests/ftest/pool/mem_ratio.py
Comment thread src/tests/ftest/util/test_utils_pool.py Outdated
Comment thread src/tests/ftest/pool/mem_ratio.py
size.

Skip-unit-tests: true
Skip-fault-injection-test: true

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@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-16760/12/execution/node/814/log

@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-16760/11/execution/node/1148/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-16760/11/execution/node/1103/log

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Medium Verbs Provider 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-16760/11/execution/node/1084/log

Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware 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-16760/13/testReport/

Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
Comment thread src/tests/ftest/util/server_utils.py Outdated
Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware 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-16760/15/testReport/

Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
"mem_file_bytes": "<ERROR>",
"create_ratio": 0
}
errors.append(f"{name} - Invalid dmg pool create response: {_result}")

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.

Nit - I'd recommend "unexpected" instead of "invalid". Since it might actually be valid from the control plane's or engine's perspective

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.

Done

Comment thread src/tests/ftest/util/test_utils_pool.py Outdated
try:
pools.append(add_pool(**kwargs))
pools[-1].set_logmasks.value = _restore
except TestFail as error:

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 could raise more than just a TestFail

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.

This is will raise a TestFail because of the @fail_on decorators on the TestPool.create() method.

Comment thread src/tests/ftest/util/test_utils_pool.py Outdated
Comment on lines +56 to +58
if query_on_error:
query_kwargs = {"show_usable": True, "mem_ratio": kwargs.get("mem_ratio")}
dmg.storage_query_usage(**query_kwargs)

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.

And if the first fails, we print this each time and then keep trying to create more?
Also, this part seems particular to the new test, not something generic that all pool create failures would need

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.

Yes, its intentional. I could see this method being used for other tests where we would expect one or more pool creates to fail and others to pass. If we want to stop creating pools on the first failure, then the method should be called with the default error_handler=None.

As we discussed, optionally running dmg storage query usage on a pool create failure has been moved to the TestPool.create() method

Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: test_mem_ratio
Test-repeat: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@phender
phender requested a review from daltonbohning October 11, 2025 00:03
tanabarr
tanabarr previously approved these changes Oct 12, 2025

@tanabarr tanabarr left a comment

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.

great work! no blocking comments just suggestions to address at your discretion. thanks

Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
self.random.randint(76, 99),
self.random.randint(51, 75),
self.random.randint(26, 50),
self.random.randint(10, 25)] # Limit smallest mem-ratio sizes due to DAOS-18004

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 would base this on #16915 and remove this restriction rather than having to go back later to revise the test.

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.

I did pick up the #16915 change a few merges ago. I could remove the restriction.

Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
}
data[name]["create_ratio"] = round(
int(data[name]["mem_file_bytes"]) / int(data[name]["tier_bytes"][0]) * 100)
_difference = abs(data[name]["mem-ratio"] - data[name]["create_ratio"])

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.

can probably swap this and the next line

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.

I'm not sure I follow, could you clarify?

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.

Fixed, thanks.

Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
data[name]["create_ratio"] = round(
int(data[name]["mem_file_bytes"]) / int(data[name]["tier_bytes"][0]) * 100)
_difference = abs(data[name]["mem-ratio"] - data[name]["create_ratio"])
if data[name]["mem-ratio"] and _difference > 1:

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.

Is one percent a high enough tolerance?

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.

I have not found it to be a problem in multiple PR builds of 10 repetitions each with the current pool sizes. It is a problem with much smaller pools.

Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
"mem_file_bytes": "<ERROR>",
"create_ratio": 0
}
errors.append(f"{name} - Unexpected dmg pool create response: {_result}")

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.

Is there any way of encoding the Value of the exception raised?

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.

Yes, it could be passed. I generally find that these exceptions, like IndexError: list index out of range, are too generic and not as useful as just looking at the dmg json output to understand what went wrong.

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.

I've added it in.

Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
for item in query["response"]["tier_stats"]:
data[name]["tier_stats(query)"][item["media_type"]] = item["total"]
data[name]["mem_file_bytes(query)"] = query["response"]["mem_file_bytes"]
_ratio = (

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.

For consistency and ease of reading it would be nice to have ratios always created with the same formatting style e.g. on one line like https://github.com/daos-stack/daos/pull/16760/files#diff-a4a1c4696e81e34d60b6441bd01387b0dd63f7ca67d3ed970f7c298a99df84bbR107

Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
# Report the test results
if not data:
self.fail(f"Error collecting data from {len(pools)} pool(s)")
_format = "%-54s %-9s %-52s %-14s %-12s %-13s %-64s %-21s %s"

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.

What do these magic numbers represent?

@phender phender Oct 13, 2025 •

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.

Field widths for this output:

2025-10-11 22:44:57,288 mem_ratio        L0167 DEBUG| Pool                                                    mem-ratio  tier_bytes                                            mem_file_bytes  create_ratio  total_engines  tier_stats(query)                                                 mem_file_bytes(query)  query_ratio
2025-10-11 22:44:57,288 mem_ratio        L0170 DEBUG| ------------------------------------------------------  ---------  ----------------------------------------------------  --------------  ------------  -------------  ----------------------------------------------------------------  ---------------------  -----------
2025-10-11 22:44:57,288 mem_ratio        L0185 DEBUG| Pool TestPool_1 (19D0A8DE-6BC3-43D3-AEDC-7D6F81D86A1E)  100         13.88GiB (14898167808),  115.7GiB (124231929032)     14898167808     100           6              scm:  83.25GiB (89389006848), nvme:  694.2GiB (745391574192)      89389006848            100
2025-10-11 22:44:57,288 mem_ratio        L0185 DEBUG| Pool TestPool_2 (7A3FC80B-83D5-4351-A4E8-531C312BE2CA)  83          16.38GiB (17582522368), 105.44GiB (113212653568)     14629732352     83            6              scm:  98.25GiB (105495134208), nvme: 632.62GiB (679275921408)     87778394112            83
2025-10-11 22:44:57,288 mem_ratio        L0185 DEBUG| Pool TestPool_3 (69C3DCD7-2619-4332-8D24-378995BED7DA)  51          25.62GiB (27514634240),  83.08GiB (89203786376)      14092861440     51            6              scm: 153.75GiB (165087805440), nvme: 498.46GiB (535222718256)     84557168640            51
2025-10-11 22:44:57,288 mem_ratio        L0185 DEBUG| Pool TestPool_4 (F5353161-2895-47A3-A5B4-989667A8282A)  47           27.0GiB (28991029248),  57.62GiB (61874372608)      13690208256     47            6              scm:  162.0GiB (173946175488), nvme: 345.75GiB (371246235648)     82141249536            47

They are not really magic, just the text widths.

Comment thread src/tests/ftest/pool/mem_ratio.yaml Outdated
log_file: daos_server1.log
storage: auto

pool_size_percent: 100

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.

why do we specify this if we are adjusting the parameters inside the test file?

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.

Two reasons:

  1. (Which I need to fix) when running in PMEM mode, this test will just create one pool and use this percentage
  2. when running in MD on SSD mode, we use this number to determine 5 pool size percentages that should at least closely combine to be this total

Also update test to work in PMEM mode.

Skip-unit-tests: true
Skip-fault-injection-test: true
Skip-func-hw-test-medium: false
Test-tag: test_mem_ratio
Test-repeat-hw-test-medium-md-on-ssd: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
Skip-unit-tests: true
Skip-fault-injection-test: true
Skip-func-hw-test-medium: false
Test-tag: test_mem_ratio
Test-repeat-hw-test-medium-md-on-ssd: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
result = self.server_managers[0].search_engine_logs(pattern)
if not result.passed:
raise error
self.log.debug("Pool failure expected due to: '%s'", pattern)

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
self.log.debug("Pool failure expected due to: '%s'", pattern)
self.log.debug("Pool create failure expected due to: '%s'", pattern)

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.

Thanks, fixed.

Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
self.log_step(f"Query the {len(pools)} pool(s)")
pool_queries = {}
for pool in pools:
pool_queries[str(pool)] = dmg.pool_query(pool.identifier)

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.

FYI we do have this helper

Suggested change
pool_queries[str(pool)] = dmg.pool_query(pool.identifier)
pool_queries[str(pool)] = pool.query()

Comment thread src/tests/ftest/pool/mem_ratio.py Outdated
Comment on lines +129 to +131
# Collect the pool query output values
for name, query in pool_queries.items():
try:

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.

Curious - why loop to get all the queries and then loop again to parse them?

@phender phender Oct 13, 2025 •

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.

I think at an earlier stage of the PR I was logging in this loop and didn't want it intermixed with the query output. This is no longer a restriction, so I can simplify the looping.

@daosbuild3

Copy link
Copy Markdown
Collaborator

Skip-unit-tests: true
Skip-fault-injection-test: true
Skip-func-hw-test-medium: false
Test-tag: test_mem_ratio
Test-repeat-hw-medium-md-on-ssd: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
Skip-unit-tests: true
Skip-fault-injection-test: true
Skip-func-hw-test-medium: false
Test-tag: test_mem_ratio
Test-repeat-hw-medium-md-on-ssd: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
Skip-unit-tests: true
Skip-fault-injection-test: true
Skip-func-hw-test-medium: false
Test-tag: test_mem_ratio
Test-repeat-hw-medium-md-on-ssd: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
daltonbohning
daltonbohning previously approved these changes Oct 13, 2025
@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-16760/40/execution/node/792/log

Skip-unit-tests: true
Skip-fault-injection-test: true
Skip-func-hw-test-medium: false
Test-tag: test_mem_ratio
Test-repeat-hw-medium-md-on-ssd: 10

Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
@phender

phender commented Oct 14, 2025

Copy link
Copy Markdown
Contributor Author

@phender
phender requested a review from a team October 16, 2025 12:54
@phender phender added the forced-landing The PR has known failures or has intentionally reduced testing, but should still be landed. label Oct 16, 2025
@phender
phender merged commit 956fdb0 into master Oct 16, 2025
32 of 33 checks passed
@phender
phender deleted the hendersp/DAOS-17915 branch October 16, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forced-landing The PR has known failures or has intentionally reduced testing, but should still be landed.

Development

Successfully merging this pull request may close these issues.

4 participants