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

CASMHMS-6148: Parse PowerConsumedWatts for any data type and intialize pcap min/max appropriately #31

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

jwlv
Copy link
Contributor

@jwlv jwlv commented Apr 23, 2024

Summary and Scope

The Paradise redfish Power endpoint presents the consumed watts value as a float. All prior platforms have presented it as an integer value and thus the PCS data structure for holding it declared it as an int. This caused json.Unmarshal() to fail on Paradise because it enforces strict type checking.

The fix here is to change the int type to an interface{} type so that it can hold a value of any type. We then convert any floats we read to an int (by rounding). We chose to do this rather than simply changing the type from an int to a float so that we don't break any customer code that may be doing the same thing we were doing (expecting an int rather than a float).

Additionally, this PR contains a fix to initialize the power cap min/max values to -1. This is necessary in order for requests against non-oem platforms to work properly in doPowerCapTask() where checks are made against these values.

Adopted app version 2.4.0 for CSM 1.5.2 (helm chart 2.0.9)
Adopted app version 2.4.0 for CSM 1.6 (helm chart 2.1.6)

Issues and Related PRs

  • Resolves CASMHMS-6148

Testing

Tested on:

  • tyr

Test description:

With a patched SMD in place, verified that PCS would convert floats to ints properly when ran against Paradise nodes. Then verified that PCS could power cap both Paradise and Bard Peak compute nodes.

  • Were the install/upgrade-based validation checks/tests run (goss tests/install-validation doc)? Y
  • Were continuous integration tests run? If not, why? Y
  • Was upgrade tested? If not, why? Y
  • Was downgrade tested? If not, why? Y

Risks and Mitigations

Are there known issues with these changes? Any other special considerations?

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

@jwlv jwlv requested review from a team as code owners April 23, 2024 17:59
Copy link

github-actions bot commented Apr 23, 2024

👋 Hey! Here are the chart(s) we built for you:

Chart Download Link
cray-power-control-2.0.9-20240423193734+f3ace53.tgz https://artifactory.algol60.net/artifactory/csm-helm-charts/unstable/cray-hms-power-control/cray-power-control-2.0.9-20240423193734+f3ace53.tgz
cray-power-control-2.1.6-20240423193734+f3ace53.tgz https://artifactory.algol60.net/artifactory/csm-helm-charts/unstable/cray-hms-power-control/cray-power-control-2.1.6-20240423193734+f3ace53.tgz

Note: this SHA is the merge of 7a00df3 and the PR base branch. Good luck and make rocket go now! 🌮 🚀

Build summary

Build metadata

Key Value
Artifactory Component cray-hms-power-control
Stable Build false
Unstable Build Prefix -20240423193734+f3ace53

Publish Helm charts results

Key Value
Status success
Successfully uploaded charts count 2
Failed uploaded charts count 0

@jwlv jwlv merged commit 5effbb0 into main Apr 30, 2024
18 of 23 checks passed
@jwlv jwlv deleted the CASMHMS-6148 branch April 30, 2024 16:37
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.

3 participants