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

CRAYSAT-1953: Functional tests for sat nid2xname #673

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

annapoorna-s-alt
Copy link
Contributor

@annapoorna-s-alt annapoorna-s-alt commented Jan 29, 2025

Summary and Scope

Add automated test cases for sat nid2xname and sat xname2nid

Issues and Related PRs

List and characterize relationship to Jira/Github issues and other pull requests. Be sure to list dependencies.

Testing

List the environments in which these changes were tested.

Tested on:

  • rocket
  • drax

Test description:

How were the changes tested and success verified? If schema changes were part of this change, how were those handled in your upgrade/downgrade testing?

  • Installed the unstable rpm and unpack, then tested for all the test cases

Risks and Mitigations

Low risk since we added only automated test cases to verify functionality of sat nid2xname and sat xname2nid

Pull Request Checklist

  • Version number(s) incremented, if applicable
  • Copyrights updated
  • License file intact
  • Target branch correct
  • CHANGELOG.md updated
  • Testing is appropriate and complete, if applicable
  • HPC Product Announcement prepared, if applicable

@annapoorna-s-alt annapoorna-s-alt force-pushed the CRAYSAT-1953-sat-nid2xname branch from 20835c9 to 7994c61 Compare January 29, 2025 10:30
@annapoorna-s-alt
Copy link
Contributor Author

Output test on rocket

ncn-m001:/mnt/developer/sann/automation-test/nid2xname/final # ./opt/cray/tests/install/csm-testing-python-venv/bin/test_sat_functional nid2xname.test_nid2xname
test_multiple_nid_to_xname (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting multiple nids to xnames. ... ok
test_multiple_xname_to_nid (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting multiple xnames to nids. ... ok
test_nid_range_to_xname (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting nid range to xnames. ... ok
test_nid_to_xname (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting nid to xname. ... ok
test_xname2nid_format_nid (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test xname2nid with -f nid option. ... ok
test_xname2nid_format_range (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test xname2nid with -f range option. ... ok
test_xname_to_nid (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting xname to nid. ... ok

----------------------------------------------------------------------
Ran 7 tests in 36.871s

OK

Output test on drax

ncn-m001:/mnt/developer/sann # ./opt/cray/tests/install/csm-testing-python-venv/bin/test_sat_functional nid2xname.test_nid2xname
test_multiple_nid_to_xname (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting multiple nids to xnames. ... ok
test_multiple_xname_to_nid (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting multiple xnames to nids. ... ok
test_nid_range_to_xname (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting nid range to xnames. ... ok
test_nid_to_xname (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting nid to xname. ... ok
test_xname2nid_format_nid (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test xname2nid with -f nid option. ... ok
test_xname2nid_format_range (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test xname2nid with -f range option. ... ok
test_xname_to_nid (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting xname to nid. ... ok

----------------------------------------------------------------------
Ran 7 tests in 36.620s

OK

Copy link
Contributor

@ethanholen-hpe ethanholen-hpe left a comment

Choose a reason for hiding this comment

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

Hey @annapoorna-s-alt looks great though I gave it a test on Gamora and its failed on two of the tests converting xnames to nids, the issue seems to be that there are a bunch of prepended zeroes on the nid name. Here is the output from the testing https://gist.github.com/ethanholen-hpe/80081aed9bca7829cffc74a0c364be41

Not sure if this is an issue with the state of gamora or with the test but let me know if you need any help tracking this down.

@annapoorna-s-alt
Copy link
Contributor Author

Thanks @ethanholen-hpe for checking on Gamora too. There were actually few nodes for which the NIDs from cray command is just a single digit. But actually we need to prepend the zeroes on the nid name to make at least 6 digits. I checked on the system too- https://area.hpc.amslabs.hpecorp.net/cgi-bin/hardware.cgi?system=gamora

Adding here an ex for single digit NID:

ncn-m001:~ # cray hsm state components list --type Node --format json | jq -r '.Components[0]'
{
"ID": "x3000c0s19b2n0",
"Type": "Node",
"State": "Off",
"Flag": "OK",
"Enabled": true,
"SoftwareStatus": "DvsAvailable",
"Role": "Compute",
"NID": 2,
"NetType": "Sling",
"Arch": "X86",
"Class": "River"
}

ncn-m001:~ # sat xname2nid x3000c0s19b2n0
nid000002

I addressed it and tested on Gamora too. Please verify

ncn-m001:/mnt/developer/sann/nid2xname/zero-pad # ./opt/cray/tests/install/csm-testing-python-venv/bin/test_sat_functional nid2xname.test_nid2xname
test_multiple_nid_to_xname (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting multiple nids to xnames. ... ok
test_multiple_xname_to_nid (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting multiple xnames to nids. ... ok
test_nid_range_to_xname (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting nid range to xnames. ... ok
test_nid_to_xname (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting nid to xname. ... ok
test_xname2nid_format_nid (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test xname2nid with -f nid option. ... ok
test_xname2nid_format_range (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test xname2nid with -f range option. ... ok
test_xname_to_nid (csm_testing.tests.sat_functional.nid2xname.test_nid2xname.TestNid2Xname)
Test converting xname to nid. ... ok

----------------------------------------------------------------------
Ran 7 tests in 34.856s

OK

Copy link
Contributor

@ethanholen-hpe ethanholen-hpe left a comment

Choose a reason for hiding this comment

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

Looks great tested on both gamora and mug 👍🏻

@annapoorna-s-alt annapoorna-s-alt force-pushed the CRAYSAT-1953-sat-nid2xname branch from a151625 to 3932ba3 Compare January 31, 2025 05:36
@mharding-hpe mharding-hpe merged commit 644301f into release/1.7 Jan 31, 2025
3 checks passed
@mharding-hpe mharding-hpe deleted the CRAYSAT-1953-sat-nid2xname branch January 31, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants