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-6281 imgstat #61

Merged
merged 5 commits into from
Sep 30, 2024
Merged

CASMHMS-6281 imgstat #61

merged 5 commits into from
Sep 30, 2024

Conversation

rustydb
Copy link
Contributor

@rustydb rustydb commented Sep 26, 2024

Adds imgstat command call after the initrd command in order to print image information such as image size. This can help diagnose image download issues such as CASMTRIAGE-7220.

Also updates .gitignore to cease this annoying warning:

git add cmd/boot-script-service/default_api.go
The following paths are ignored by one of your .gitignore files:
cmd/boot-script-service
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"

.gitignore test:

[534]rusty@HPE-XHD22YD7DW:~/gitstuffs/cray-shasta/hms-bss> echo 1>boot-script-service
[535]rusty@HPE-XHD22YD7DW:~/gitstuffs/cray-shasta/hms-bss> git add boot-script-service
The following paths are ignored by one of your .gitignore files:
boot-script-service
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
[536]rusty@HPE-XHD22YD7DW:~/gitstuffs/cray-shasta/hms-bss> echo 1>>cmd/boot-script-service/default_api.go
[537]rusty@HPE-XHD22YD7DW:~/gitstuffs/cray-shasta/hms-bss> git add cmd/boot-script-service/default_api.go
[538]rusty@HPE-XHD22YD7DW:~/gitstuffs/cray-shasta/hms-bss>

@rustydb
Copy link
Contributor Author

rustydb commented Sep 26, 2024

Doesn't look like unit tests can even run in CI anymore.

Copy link

github-actions bot commented Sep 26, 2024

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

artifactory.algol60.net/csm-docker/unstable/cray-bss:1.27.0-20240930152350.7bc9b17

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

podman pull artifactory.algol60.net/csm-docker/unstable/cray-bss:1.27.0-20240930152350.7bc9b17

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-bss:1.27.0-20240930152350.7bc9b17

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-bss:1.27.0-20240930152350.7bc9b17 > container_image.spdx

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

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

Copy link

github-actions bot commented Sep 26, 2024

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

artifactory.algol60.net/csm-docker/unstable/cray-bss-hmth-test:1.27.0-20240930152337.7bc9b17

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

podman pull artifactory.algol60.net/csm-docker/unstable/cray-bss-hmth-test:1.27.0-20240930152337.7bc9b17

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-bss-hmth-test:1.27.0-20240930152337.7bc9b17

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-bss-hmth-test:1.27.0-20240930152337.7bc9b17 > container_image.spdx

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

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

Call `imgstat` after an `initrd` is downloaded to print its image size and any other properties it may have.
This code should only bother running if `err != nil`, makes it easier to
understand and removes a level of nesting.
Add exception for directories matching the binary name to avoid this
nuisance.
```
git add cmd/boot-script-service/default_api.go
The following paths are ignored by one of your .gitignore files:
cmd/boot-script-service
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
```
@rustydb rustydb force-pushed the CASMHMS-6281-imgstat branch from 0431358 to e3757bd Compare September 26, 2024 18:16
@jwlv
Copy link

jwlv commented Sep 30, 2024

Doesn't look like unit tests can even run in CI anymore.

@rustydb I ran into this recently too in a different repo. We need to change "docker-compose" to "docker compose". See this PR from last week on what I did: Cray-HPE/hms-smd#163

@jwlv
Copy link

jwlv commented Sep 30, 2024

Doesn't look like unit tests can even run in CI anymore.

@rustydb I ran into this recently too in a different repo. We need to change "docker-compose" to "docker compose". See this PR from last week on what I did: Cray-HPE/hms-smd#163

@jwlv jwlv closed this Sep 30, 2024
@jwlv jwlv reopened this Sep 30, 2024
@rustydb rustydb merged commit 896d2c9 into master Sep 30, 2024
15 checks passed
rustydb added a commit that referenced this pull request Oct 4, 2024
A missing `\n` in #61 prevents the `boot` commmand from getting called,
leading to a bootloop.
@rustydb rustydb mentioned this pull request Oct 4, 2024
rustydb added a commit that referenced this pull request Oct 4, 2024
A missing `\n` in #61 prevents the `boot` commmand from getting called,
leading to a bootloop.
shunr-hpe pushed a commit that referenced this pull request Oct 4, 2024
A missing `\n` in #61 prevents the `boot` command from getting called,
leading to a bootloop.
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