-
Notifications
You must be signed in to change notification settings - Fork 302
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-15964 test: verify daos_server_helper on server #15503
Conversation
Ticket title is 'control/daos_server_helper.py: checker for helper on server instead of runner node' |
Test stage Functional Hardware Medium completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15503/1/testReport/ |
3b32f31
to
006ee8d
Compare
# Get the result remotely with os.stat so the format is compatible with local code | ||
self.log_step("Verify daos_server_helper binary permissions") | ||
helper_path = os.path.join(self.prefix, "bin", "daos_server_helper") | ||
cmd = f"python3 -c 'import os; print(os.stat(\"{helper_path}\").st_mode)'" | ||
result = run_remote(self.log, NodeSet(self.hostlist_servers[0]), cmd) | ||
if not result.passed: | ||
self.fail("Failed to get daos_server_helper mode") | ||
mode = int(result.joined_stdout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2024-11-14 23:10:18,829 test L0471 INFO | ==> Step 2: Verify daos_server_helper binary permissions [elapsed since last step: 0.00s]
2024-11-14 23:10:18,829 run_utils L0470 DEBUG| Running on wolf-142 with a 120 second timeout: python3 -c 'import os; print(os.stat("/usr/bin/daos_server_helper").st_mode)'
2024-11-14 23:10:19,029 run_utils L0334 DEBUG| wolf-142 (rc=0): 35304
So we get a string similar to if we ran os.stat
locally
verify daos_server_helper on server instead of the runner/client. misc cleanup Skip-unit-tests: true Skip-fault-injection-test: true Required-githooks: true Signed-off-by: Dalton Bohning <[email protected]>
006ee8d
to
03e160d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request to add the manual server stop for tearDown
file_stats = os.stat("/usr/bin/daos_server_helper") | ||
# Get the result remotely with os.stat so the format is compatible with local code | ||
self.log_step("Verify daos_server_helper binary permissions") | ||
helper_path = os.path.join(self.prefix, "bin", "daos_server_helper") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have self.bin
:
helper_path = os.path.join(self.prefix, "bin", "daos_server_helper") | |
helper_path = os.path.join(self.bin, "daos_server_helper") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done
self.log_step("Verify daos_server_helper binary permissions") | ||
helper_path = os.path.join(self.prefix, "bin", "daos_server_helper") | ||
cmd = f"python3 -c 'import os; print(os.stat(\"{helper_path}\").st_mode)'" | ||
result = run_remote(self.log, NodeSet(self.hostlist_servers[0]), cmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we limit this to one server or run it on all server hosts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we might as well run it on all and enforce it is consistent and correct.
try: | ||
self.server_managers[0].detect_format_ready() | ||
except ServerFailed as error: | ||
self.fail( | ||
"##(2)Failed starting server before format as non-root user: {}".format(error)) | ||
self.fail(f"Failed to start server before format as non-root user: {error}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we've successfully started the servers via self.server_managers[0].detect_format_ready()
and didn't use self.start_servers()
we should manually register the tearDown step to stop the servers:
self.fail(f"Failed to start server before format as non-root user: {error}") | |
self.fail(f"Failed to start server before format as non-root user: {error}") | |
self.register_cleanup(self.stop_servers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Skip-unit-tests: true Skip-fault-injection-test: true Required-githooks: true Signed-off-by: Dalton Bohning <[email protected]>
Test stage Functional Hardware Medium completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15503/5/testReport/ |
Skip-unit-tests: true Skip-fault-injection-test: true Required-githooks: true Signed-off-by: Dalton Bohning <[email protected]>
verify daos_server_helper on server instead of the runner/client. misc cleanup Skip-unit-tests: true Skip-fault-injection-test: true Required-githooks: true Signed-off-by: Dalton Bohning <[email protected]>
verify daos_server_helper on server instead of the runner/client. misc cleanup Skip-unit-tests: true Skip-fault-injection-test: true Required-githooks: true Signed-off-by: Dalton Bohning <[email protected]>
verify daos_server_helper on server instead of the runner/client. misc cleanup Signed-off-by: Dalton Bohning <[email protected]>
verify daos_server_helper on server instead of the runner/client. misc cleanup
Skip-unit-tests: true
Skip-fault-injection-test: true
Required-githooks: true
Before requesting gatekeeper:
Features:
(orTest-tag*
) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.Gatekeeper: