Janunez/daos 16627 - #18955
Conversation
daltonbohning
left a comment
There was a problem hiding this comment.
Sorry, I started reviewing this before noticing it was switched to draft :)
I'll post my comments but feel free to ignore since you're still working on this
| system_ram_reserved: 2 | ||
| pool: | ||
| size: 90% | ||
| svcn: 1 |
There was a problem hiding this comment.
Recommend not setting this unless specifically needed. The default pool svcn will be >1 when there are enough servers
| svcn: 1 | ||
| container: | ||
| type: POSIX | ||
| control_method: daos |
There was a problem hiding this comment.
Don't need this anymore
| control_method: daos |
| client_processes: | ||
| np_16: | ||
| np: 16 |
There was a problem hiding this comment.
Could simplify
| client_processes: | |
| np_16: | |
| np: 16 | |
| client_processes: | |
| np: 16 |
| np_16: | ||
| np: 16 | ||
| test_file: testFile | ||
| repetitions: 1 |
There was a problem hiding this comment.
Not needed because this is the default
| repetitions: 1 |
| iorflags: | ||
| flags: "-v -k -e -w -r -R -G 27" |
There was a problem hiding this comment.
Probably can simplify this?
| iorflags: | |
| flags: "-v -k -e -w -r -R -G 27" | |
| flags: "-v -k -e -w -r -R -G 27" |
| objectclass: | ||
| oclass_SX: | ||
| dfs_oclass: "SX" |
There was a problem hiding this comment.
| objectclass: | |
| oclass_SX: | |
| dfs_oclass: "SX" | |
| dfs_oclass: "SX" |
| self.log_step("Scanning DAOS control logs for URI lines") | ||
|
|
||
| line_count = 0 | ||
| txt = f"URI to {provider}".replace('+', '\+') |
There was a problem hiding this comment.
You should escape the escape character since you want a literal \ in the string
| txt = f"URI to {provider}".replace('+', '\+') | |
| txt = f"URI to {provider}".replace('+', '\\+') |
There was a problem hiding this comment.
I'll integrate your suggestion.
|
Errors are component not formatted correctly,Ticket number prefix incorrect,PR title is malformatted. See https://daosio.atlassian.net/wiki/spaces/DC/pages/11133911069/Commit+Comments,Unable to load ticket data |
Test the changing fabric provider without reformatting storage feature. The test writes with IOR, changes the fabric provider and read the data written for correctness. The second test does the same and then reverts the system provider back to the original provider. Skip-unit-test: true Skip-fault-injection-test: true Test-tag: test_change_fabric_provider Test-tag: test_change_fabric_provider_and_revert Signed-off-by: James Nunez <james.nunez@hpe.com>
1c2a07b to
005ffee
Compare
| svcn: 1 | ||
| container: | ||
| type: POSIX | ||
| control_method: daos |
There was a problem hiding this comment.
As Dalton suggested: I need to remove the 'control_method' line.
| repetitions: 1 | ||
| read_flags: "-v -C -k -e -r -R -G 27" | ||
| iorflags: | ||
| flags: "-v -k -e -w -r -R -G 27" |
There was a problem hiding this comment.
Simplify as Dalton suggested: simplify into single 'flags: "-v -k -e -w -r -R -G 27"' line
jamesanunez
left a comment
There was a problem hiding this comment.
Need to update YAML file with Dalton's suggestions.
| system_ram_reserved: 2 | ||
| pool: | ||
| size: 90% | ||
| svcn: 1 |
There was a problem hiding this comment.
As Dalton suggested: Remove 'svcn' line.
| api: POSIX | ||
| client_processes: | ||
| np_16: | ||
| np: 16 |
There was a problem hiding this comment.
As Dalton suggested: simplify lines with single line with 'np: 16'
| np_16: | ||
| np: 16 | ||
| test_file: testFile | ||
| repetitions: 1 |
There was a problem hiding this comment.
As Dalton suggested: remove repetitions line
| for line in data.stdout: | ||
| self.log.info("%s", line) | ||
| line_count += 1 |
There was a problem hiding this comment.
I think this might already be logged by default? We could view a test log to double check
| client_ok = provider in line | ||
| elif re.match(r"^\d+\s+\S+://", line) and provider not in line: | ||
| ranks_ok = False | ||
| return client_ok and ranks_ok |
There was a problem hiding this comment.
It would be helpful to give an example of what r"^\d+\s+\S+://" matches on.
Also, there might be a gap here. What if NO lines match that expression, and so therefore ranks_ok = True by default?
| common_providers = get_common_provider(self.log, | ||
| self.host_info.all_hosts, self.test_env.interface) |
There was a problem hiding this comment.
It's a preference, but we tend to do this instead
| common_providers = get_common_provider(self.log, | |
| self.host_info.all_hosts, self.test_env.interface) | |
| common_providers = get_common_provider( | |
| self.log, self.host_info.all_hosts, self.test_env.interface) |
| # Find a different provider than the input provider | ||
| new_provider = None | ||
| for provider in common_providers: | ||
| if current_provider not in provider and provider in SUPPORTED_PROVIDERS: | ||
| new_provider = provider | ||
| break | ||
|
|
||
| if new_provider is None: | ||
| self.fail(f'No alternative provider found; available: {common_providers}, ' | ||
| f'current: {current_provider}') | ||
|
|
||
| return new_provider |
There was a problem hiding this comment.
This is partly preference too, but if you are familiar with set logic you can do this like
alternate_providers = (
set(SUPPORTED_PROVIDERS)
.intersection(common_providers)
.difference(set([current_provider]))
)
if not alternate_providers:
# error
# Return a random provider
return self.random.choice(alternate_providers)
| self.log.info(f'Initial IOR write with provider ' | ||
| f'{original_provider} completed successfully') | ||
|
|
||
| # Work around for pool.connect() issue |
There was a problem hiding this comment.
Maybe mention something like "the pool handle is not valid after server restart"
| # Restart the DAOS servers and agents with the new config. | ||
| self._restart_servers_and_agents(new_provider) | ||
|
|
||
| # Verify the provider was changed | ||
| current_provider = self.server_managers[0].manager.job.yaml.get_value('provider') | ||
| if current_provider != new_provider: | ||
| self.fail(f'Provider change failed: expected {new_provider}, ' | ||
| f'actual {current_provider}') |
There was a problem hiding this comment.
self.server_managers[0].manager.job.yaml.get_value is what the framework uses to generate the config. So just because that is correct does not necessarily mean the server DID come up with that provider.
So I would recommend either
- Remove this and just rely on the dump_attachinfo check you already have
- Put this check before the _restart_servers_and_agents so it's clear that it's just verifying our own code
rpadma2
left a comment
There was a problem hiding this comment.
Simple suggestions:
- Add a title for the PR rather than just branch information. (Example : Basic test for changing fabric provider).
- Add the test tags as part of git commit message... You don't need to run all the test stages since this is focused only on the functional test stage... Example.
Skip-func-hw-test-medium: false
Skip-func-hw-test-medium-md-on-ssd: false
Skip-fault-injection-test: true
Skip-unit-test: true
Skip-nlt: true
Test-tag: test_change_fabric_provider
The So @jamesanunez at most you can just use |
|
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-18955/2/execution/node/1061/log |
Steps for the author:
After all prior steps are complete: