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

return nonzero exit code from failed pull #63

Merged
merged 3 commits into from
May 13, 2023
Merged

Conversation

lastephey
Copy link
Collaborator

Addresses #57

Thanks for the report @wholtz

Have tested:

stephey@nid001013:/mscratch/sd/s/stephey> podman-hpc pull docker.io/debian:not_a_real_tag
Trying to pull docker.io/library/debian:not_a_real_tag...
Error: initializing source docker://debian:not_a_real_tag: reading manifest not_a_real_tag in docker.io/library/debian: manifest unknown: manifest unknown
Pull failed.
stephey@nid001013:/mscratch/sd/s/stephey> echo $?
125
stephey@nid001013:/mscratch/sd/s/stephey> podman-hpc pull ubuntu:latest 
Trying to pull docker.io/library/ubuntu:latest...
Getting image source signatures
Copying blob dbf6a9befcde skipped: already exists  
Copying config 3b418d7b46 done  
Writing manifest to image destination
Storing signatures
3b418d7b466ac6275a6bfcb0c86fbe4422ff6ea0af444a294f82d3bf5173ce74
INFO: Migrating image to /mscratch/sd/s/stephey/storage
stephey@nid001013:/mscratch/sd/s/stephey> echo $?
0
stephey@nid001013:/mscratch/sd/s/stephey> 

@lastephey lastephey requested review from scanon and danfulton May 10, 2023 21:18
@lastephey
Copy link
Collaborator Author

Actually I'm going to address #56 in this PR too.

@lastephey
Copy link
Collaborator Author

I decided not to fully address #56 since that would bring podman-hpc out of alignment with Podman. However, I did incorporate their suggestion to route pull output via stdout and stderr rather than with Click. I think this gives users a little more flexibility.

@lastephey
Copy link
Collaborator Author

Ok tested and ready for review:

stephey@nid001013:~> podman-hpc pull quay.io/podman/hello:latest 
c098961c7f4cf309b966502d01ec5a36cca74ab9385fb286c5aa07bf915cd9a6
Trying to pull quay.io/podman/hello:latest...
Getting image source signatures
Copying blob sha256:32c07ec4961ddabfb3bb898fbbac172cad872e732a2ac5b8b8cc7e379a5aacff
Copying config sha256:c098961c7f4cf309b966502d01ec5a36cca74ab9385fb286c5aa07bf915cd9a6
Writing manifest to image destination
Storing signatures
INFO: Migrating image to /mscratch/sd/s/stephey/storage
stephey@nid001013:~> echo $?
0
stephey@nid001013:~> podman-hpc pull quay.io/podman/hello:latest > /dev/null
Trying to pull quay.io/podman/hello:latest...
Getting image source signatures
Copying blob sha256:32c07ec4961ddabfb3bb898fbbac172cad872e732a2ac5b8b8cc7e379a5aacff
Copying config sha256:c098961c7f4cf309b966502d01ec5a36cca74ab9385fb286c5aa07bf915cd9a6
Writing manifest to image destination
Storing signatures
stephey@nid001013:~> podman-hpc pull quay.io/podman/hello:fake
Trying to pull quay.io/podman/hello:fake...
Error: initializing source docker://quay.io/podman/hello:fake: reading manifest fake in quay.io/podman/hello: manifest unknown: manifest unknown
Pull failed
stephey@nid001013:~> echo $?
125
stephey@nid001013:~> podman-hpc pull quay.io/podman/hello:fake > /dev/null
Trying to pull quay.io/podman/hello:fake...
Error: initializing source docker://quay.io/podman/hello:fake: reading manifest fake in quay.io/podman/hello: manifest unknown: manifest unknown
Pull failed
stephey@nid001013:~> 

@wholtz
Copy link

wholtz commented May 11, 2023

I found a way to do this with podman, but it doesn't work on podman-hpc so I opened issue #64.

Copy link
Member

@scanon scanon left a comment

Choose a reason for hiding this comment

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

LGTM

@lastephey lastephey merged commit 7239028 into main May 13, 2023
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