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-6073 part2 #121

Merged
merged 11 commits into from
Sep 6, 2023
Merged

CASMHMS-6073 part2 #121

merged 11 commits into from
Sep 6, 2023

Conversation

rsjostrand-hpe
Copy link
Contributor

@rsjostrand-hpe rsjostrand-hpe commented Aug 30, 2023

Summary and Scope

Summarize what has changed. Explain why this PR is necessary. What is impacted? Is this a new feature, critical bug fix, etc?

  • Updated hms-xname to v1.3.0 to pickup VirtualNode type changes.
  • Bogus NID calculation was updated to support virtual nodes.
    • For the virtual machine work the hypervisor nodes will not be present in HSM, as they are in the control of fawkes. Meaning that both the hypervisor nodes and the virtual nodes that they are running will not be in HSM at the same time.
    • After consulting with @alvarez3-hpe he suggested to use the virtual node ordinal in blade of the node ordinal when calculating the bogus NID, and the chance of a collision should be now.
  • NodeMap now supports VirtualNodes in addition to Nodes
  • On POST/PUT to State Components GetCompDefaults is now used for both Nodes and VirtualNodes.
    • When a Node or VirtualNode component is created/updated with missing Role/NID/Class information HSM will look at SLS and HSM NodeMaps to fill in the missing component information.
  • CT test changes
    • Added SLS to docker-compose.test.ct.yaml
    • Updated CT tests for VirtualNode types
    • Extended 3-disruptive/test_nodemaps_negative.tavern.yaml to test both Node and VirtualNode types
    • Wrote new tests to verify HSM's interaction with NodeMaps and SLS when creating/updating Node and VirtualNode components without Role/NID/Class information.

Is this change backwards incompatible, backwards compatible, or a backwards compatible bugfix?
Backwards compatible

Issues and Related PRs

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

  • Resolves CASMHMS-6073

Testing

List the environments in which these changes were tested.

Tested on:

  • Local development environment
  • Github Actions
  • Virtual Shasta

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?

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

Local Testing

I ran the HSM docker images locally against the nightly integration environment. All of the tavern tests from the other HMS services were ran against their respective services alongside a modified state manager from this PR. All tests passed.

git clone [email protected]:Cray-HPE/hms-nightly-integration
cd hms-nightly-integration

# Setup hms-nightly-integration
python3 -m venv venv
. ./venv/bin/activate
pip install -r requirements.txt

# Get up to date image versions
export ARTIFACTORY_ALGOL60_READONLY_TOKEN=
export ARTIFACTORY_ALGOL60_READONLY_USERNAME=
./gather_bleeding_edge_images.py  

# edited bleeding-edge-image-versions.json to include the BMCs

# Stand up the HMS Simulation Environment with the updated docker images 
git clone [email protected]:Cray-HPE/hms-simulation-environment
./update_docker_compose.py \
    --csm-release bleeding-edge \
    --csm-extractor-output-json bleeding-edge-image-versions.json \
    --docker-compose-file  hms-simulation-environment/docker-compose.yaml

pushd hms-simulation-environment
        ./setup_venv.sh
        . ./venv/bin/activate
        ./run.py ../sls_input_file.json
popd


# Run the tests
./run_tests.py \
          --csm-extractor-output-json bleeding-edge-image-versions.json \
          --csm-release bleeding-edge | tee run_tests.log

Virtual Shasta Testing

Performed upgrade and downgrade testing with the version of HSM from this PR.

The HMS CT tests ran successfully after deploying the new version of HSM.

ncn-m001:~ # /opt/cray/csm/scripts/hms_verification/run_hms_ct_tests.sh
Log file for run is: /opt/cray/tests/hms_ct_test-20230905T200522.log
Running all tests...
SKIPPED: cray-hms-reds test, running in vShasta
DONE.
SUCCESS: All 9 service tests passed: bss, capmc, fas, hbtd, hmnfd, hsm, pcs, scsd, sls

Risks and Mitigations

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

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

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

👋 Hey! Here is the image we built for you (Artifactory Link):

artifactory.algol60.net/csm-docker/unstable/cray-smd-hmth-test:2.13.0-20230905201843.240dce0

Use podman or docker to pull it down and inspect locally:

podman pull artifactory.algol60.net/csm-docker/unstable/cray-smd-hmth-test:2.13.0-20230905201843.240dce0

Or, use this script to pull the image from the build server to a dev system:

Dev System Pull Script

Note the following script only applies to systems running CSM 1.2 or later.

#!/usr/bin/env bash

IMAGE=artifactory.algol60.net/csm-docker/unstable/cray-smd-hmth-test:2.13.0-20230905201843.240dce0

podman run --rm --network host  \
    quay.io/skopeo/stable copy \
    --src-tls-verify=false \
    --dest-tls-verify=false \
    --dest-username "$(kubectl -n nexus get secret nexus-admin-credential -o json | jq -r '.data.username | @base64d')" \
    --dest-password "$(kubectl -n nexus get secret nexus-admin-credential -o json | jq -r '.data.password | @base64d')" \
    docker://$IMAGE \
    docker://registry.local/$IMAGE
Snyk Report

Coming soon

Software Bill of Materials
cosign download sbom artifactory.algol60.net/csm-docker/unstable/cray-smd-hmth-test:2.13.0-20230905201843.240dce0 > container_image.spdx

If you don't have cosign, then you can get it here.

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

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

👋 Hey! Here is the image we built for you (Artifactory Link):

artifactory.algol60.net/csm-docker/unstable/cray-smd:2.13.0-20230905201857.240dce0

Use podman or docker to pull it down and inspect locally:

podman pull artifactory.algol60.net/csm-docker/unstable/cray-smd:2.13.0-20230905201857.240dce0

Or, use this script to pull the image from the build server to a dev system:

Dev System Pull Script

Note the following script only applies to systems running CSM 1.2 or later.

#!/usr/bin/env bash

IMAGE=artifactory.algol60.net/csm-docker/unstable/cray-smd:2.13.0-20230905201857.240dce0

podman run --rm --network host  \
    quay.io/skopeo/stable copy \
    --src-tls-verify=false \
    --dest-tls-verify=false \
    --dest-username "$(kubectl -n nexus get secret nexus-admin-credential -o json | jq -r '.data.username | @base64d')" \
    --dest-password "$(kubectl -n nexus get secret nexus-admin-credential -o json | jq -r '.data.password | @base64d')" \
    docker://$IMAGE \
    docker://registry.local/$IMAGE
Snyk Report

Coming soon

Software Bill of Materials
cosign download sbom artifactory.algol60.net/csm-docker/unstable/cray-smd:2.13.0-20230905201857.240dce0 > container_image.spdx

If you don't have cosign, then you can get it here.

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

@rsjostrand-hpe rsjostrand-hpe merged commit 05d131f into master Sep 6, 2023
15 checks passed
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