Skip to content
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

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

daltonbohning
Copy link
Contributor

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:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate owners.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

@daltonbohning daltonbohning self-assigned this Nov 14, 2024
Copy link

Ticket title is 'control/daos_server_helper.py: checker for helper on server instead of runner node'
Status is 'In Progress'
Labels: 'GCP'
https://daosio.atlassian.net/browse/DAOS-15964

@daosbuild1
Copy link
Collaborator

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/

@daltonbohning daltonbohning force-pushed the dbohning/daos-15964 branch 2 times, most recently from 3b32f31 to 006ee8d Compare November 14, 2024 22:32
Comment on lines 39 to 46
# 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)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

From https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-15503/3/artifact/Functional%20Hardware%20Medium/control/daos_server_helper.py/job.log

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]>
@daltonbohning daltonbohning marked this pull request as ready for review November 26, 2024 23:10
@daltonbohning daltonbohning requested review from a team as code owners November 26, 2024 23:11
@daltonbohning daltonbohning requested review from dinghwah, shimizukko and phender and removed request for a team November 26, 2024 23:11
Copy link
Contributor

@phender phender left a 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")
Copy link
Contributor

Choose a reason for hiding this comment

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

We have self.bin:

Suggested change
helper_path = os.path.join(self.prefix, "bin", "daos_server_helper")
helper_path = os.path.join(self.bin, "daos_server_helper")

Copy link
Contributor Author

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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}")
Copy link
Contributor

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:

Suggested change
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)

Copy link
Contributor Author

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]>
@daosbuild1
Copy link
Collaborator

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]>
@daltonbohning daltonbohning added the forced-landing The PR has known failures or has intentionally reduced testing, but should still be landed. label Nov 27, 2024
@daltonbohning daltonbohning requested a review from a team November 27, 2024 20:54
@daltonbohning daltonbohning merged commit bec5ab8 into master Nov 27, 2024
43 of 45 checks passed
@daltonbohning daltonbohning deleted the dbohning/daos-15964 branch November 27, 2024 20:55
daltonbohning added a commit that referenced this pull request Dec 11, 2024
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]>
daltonbohning added a commit that referenced this pull request Dec 18, 2024
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]>
daltonbohning added a commit that referenced this pull request Dec 18, 2024
verify daos_server_helper on server instead of the runner/client.
misc cleanup

Signed-off-by: Dalton Bohning <[email protected]>
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.

5 participants