Repository navigation
DAOS-17915 test: Add mem ratio pool creation test - #16760
Conversation
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>
|
Ticket title is 'Verify pool creation with different mem_ratio sizes' |
|
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 |
|
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>
|
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 |
|
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>
|
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 |
|
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>
size. Skip-unit-tests: true Skip-fault-injection-test: true Signed-off-by: Phil Henderson <phillip.henderson@hpe.com>
|
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 |
|
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 |
|
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 |
|
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>
|
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>
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>
|
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/ |
| "mem_file_bytes": "<ERROR>", | ||
| "create_ratio": 0 | ||
| } | ||
| errors.append(f"{name} - Invalid dmg pool create response: {_result}") |
There was a problem hiding this comment.
Nit - I'd recommend "unexpected" instead of "invalid". Since it might actually be valid from the control plane's or engine's perspective
| try: | ||
| pools.append(add_pool(**kwargs)) | ||
| pools[-1].set_logmasks.value = _restore | ||
| except TestFail as error: |
There was a problem hiding this comment.
This could raise more than just a TestFail
There was a problem hiding this comment.
This is will raise a TestFail because of the @fail_on decorators on the TestPool.create() method.
| if query_on_error: | ||
| query_kwargs = {"show_usable": True, "mem_ratio": kwargs.get("mem_ratio")} | ||
| dmg.storage_query_usage(**query_kwargs) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
tanabarr
left a comment
There was a problem hiding this comment.
great work! no blocking comments just suggestions to address at your discretion. thanks
| 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 |
There was a problem hiding this comment.
I would base this on #16915 and remove this restriction rather than having to go back later to revise the test.
There was a problem hiding this comment.
I did pick up the #16915 change a few merges ago. I could remove the restriction.
| } | ||
| 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"]) |
There was a problem hiding this comment.
can probably swap this and the next line
There was a problem hiding this comment.
I'm not sure I follow, could you clarify?
| 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: |
There was a problem hiding this comment.
Is one percent a high enough tolerance?
There was a problem hiding this comment.
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.
| "mem_file_bytes": "<ERROR>", | ||
| "create_ratio": 0 | ||
| } | ||
| errors.append(f"{name} - Unexpected dmg pool create response: {_result}") |
There was a problem hiding this comment.
Is there any way of encoding the Value of the exception raised?
There was a problem hiding this comment.
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.
| 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 = ( |
There was a problem hiding this comment.
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
| # 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" |
There was a problem hiding this comment.
What do these magic numbers represent?
There was a problem hiding this comment.
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.
| log_file: daos_server1.log | ||
| storage: auto | ||
|
|
||
| pool_size_percent: 100 |
There was a problem hiding this comment.
why do we specify this if we are adjusting the parameters inside the test file?
There was a problem hiding this comment.
Two reasons:
- (Which I need to fix) when running in PMEM mode, this test will just create one pool and use this percentage
- 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>
| 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) |
There was a problem hiding this comment.
| self.log.debug("Pool failure expected due to: '%s'", pattern) | |
| self.log.debug("Pool create failure expected due to: '%s'", pattern) |
| 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) |
There was a problem hiding this comment.
FYI we do have this helper
| pool_queries[str(pool)] = dmg.pool_query(pool.identifier) | |
| pool_queries[str(pool)] = pool.query() |
| # Collect the pool query output values | ||
| for name, query in pool_queries.items(): | ||
| try: |
There was a problem hiding this comment.
Curious - why loop to get all the queries and then loop again to parse them?
There was a problem hiding this comment.
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.
|
Test stage Functional Hardware Medium completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-16760/37/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>
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>
|
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>
|
New pool/mem_ratio.py test passed in https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-16760/41/testReport/FTEST_pool/MemRatioTest/ |
Test pool creation with various mem ratio sizes.
Skip-unit-tests: true
Skip-fault-injection-test: true
Steps for the author:
After all prior steps are complete: