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

podman load ... [name:tag] inconsistencies #7387

Closed
vrothberg opened this issue Aug 20, 2020 · 19 comments · Fixed by #8877
Closed

podman load ... [name:tag] inconsistencies #7387

vrothberg opened this issue Aug 20, 2020 · 19 comments · Fixed by #8877
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@vrothberg
Copy link
Member

The optional name:tag for podman load is treated differently among the formats. docker-archive will apply it as tag to the loaded image while oci-archive seems to try to extract it from the image. Let's try to find a way to untangle the hairy ball and get it consistent (or clearly document the different behaviours).

The man pages need to be more explicit:

You can also specify a name for the image if the archive does not contain a named reference, of if you want an additional name for the local image.

Background discussion: https://github.com/containers/podman/pull/6811/files#r472198035

@zhangguanzhang
Copy link
Collaborator

podman save --format oci-archive alpine:latest > /tmp/FOO.tar
podman load -i /tmp/FOO.tar domain.com/NewName:tag   

after this, the image's name should be domain.com/NewName:tag? or just search domain.com/NewName:tag in the /tmp/FOO.tar and load it

@vrothberg
Copy link
Member Author

That really depends what we want to do.

I am also open to change podman load to not accept such an optional name:tag. If users want to load a specific image, they can use podman pull instead. That way, podman load would be ~identical to docker load.

@rhatdan
Copy link
Member

rhatdan commented Aug 20, 2020

I think podman load should be identical to docker load.

@vrothberg
Copy link
Member Author

Proposal: let's wait first for Podman v2.1 and then remove the optional arguments and get that into Podman v3.0.

Users can always load+tag or use pull to extract a specific image.

@vrothberg
Copy link
Member Author

@mtrmac WDYT?

@mtrmac
Copy link
Collaborator

mtrmac commented Aug 20, 2020

Note that this is not just the CLI: changes might affect the two /images/load APIs (OTOH at least in Swagger the “reference” parameter seems completely undocumented).

Users can always load+tag or use pull to extract a specific image.

Right now, the CLI load command prints the IDs(?) of loaded images only in a non-trivially-parseable text format.


Conceptually, I think it does make sense to offer both

  • Extract only image $name from archive (as opposed to the docker load “overwrite an unpredictable set of images in local storage” behavior, making “load” insecure to use with not-100%-trusted archives)
  • Tag the result with $dest-tag

OTOH, considering how broken it’s been (we provide sometimes one, sometimes the other, sometimes a broken version of one or the other, and we don’t document which one it is supposed to be) and how there haven’t been many reports complaining about this, removing the feature and waiting for an actual user motivated to contribute one of those features makes sense.

@rhatdan
Copy link
Member

rhatdan commented Sep 10, 2020

@vrothberg What is going on with this issue?

@vrothberg
Copy link
Member Author

@vrothberg What is going on with this issue?

Proposal: let's wait first for Podman v2.1 and then remove the optional arguments and get that into Podman v3.0.

^ no breaking changes at this point :)

@rhatdan rhatdan added kind/bug Categorizes issue or PR as related to a bug. 3.0 Features labels Oct 7, 2020
@github-actions
Copy link

github-actions bot commented Nov 7, 2020

A friendly reminder that this issue had no activity for 30 days.

@baude
Copy link
Member

baude commented Dec 1, 2020

shall we merge?

@rhatdan
Copy link
Member

rhatdan commented Dec 1, 2020

We need a PR to merge. But yes we should fix this problem.

@github-actions
Copy link

github-actions bot commented Jan 1, 2021

A friendly reminder that this issue had no activity for 30 days.

rhatdan added a commit to rhatdan/podman that referenced this issue Jan 12, 2021
Docker does not support this, and it is confusing what to do if
the image has more then one tag.  We are dropping support for this
in podman 3.0

Fixes: containers#7387

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@Aryanrt
Copy link

Aryanrt commented Feb 23, 2022

Currently I am trying to build an image using buildkit and use podman load to save the built image.
However, currently the name of the built image is "localhost/latest:latest".
How can I specify the name of the loaded image?
Thank you in advance

@rhatdan
Copy link
Member

rhatdan commented Feb 24, 2022

podman tag localhost/latest NAME.

@vrothberg
Copy link
Member Author

@Aryanrt, which version of Podman do you use? I think it's best to open a new issue but note that recent versions of Podman should support it.

@Aryanrt
Copy link

Aryanrt commented Feb 24, 2022

Thank you for the speedy response.
I am using podman version 3.4.2

@Aryanrt
Copy link

Aryanrt commented Feb 24, 2022

podman tag localhost/latest NAME.
This works. Thanks!

@vl-shopback
Copy link

podman 3.4.4 also same issue

@vrothberg
Copy link
Member Author

Please open a new issue with a reproducer. Otherwise, it's impossible to track.

jacobsalmela added a commit to Cray-HPE/metal-basecamp that referenced this issue Apr 25, 2022
podman load no longer allows the tagging of the image during a load op: containers/podman#7387

to adjust the script for this, I filter the images to match metal-basecamp, get
the image id, and then tag it in a separate command after the image has loaded

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
jacobsalmela added a commit to Cray-HPE/metal-basecamp that referenced this issue Apr 25, 2022
podman load no longer allows the tagging of the image during a load op: containers/podman#7387

to adjust the script for this, I filter the images to match metal-basecamp, get
the image id, and then tag it in a separate command after the image has loaded

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>

prevent error
```
Apr 25 20:58:20 redbull-ncn-m001-pit systemd[1]: /usr/lib/systemd/system/basecamp.service:14: Unit configured to use KillMode=none. Support for KillMode=none is deprecated and will be eventually removed in future SLE versions. Please see SUSE TID https://www.suse.com/support/kb/doc/?id=000020394 for more details.
```
by setting the killmode to control-group

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
jacobsalmela added a commit to Cray-HPE/metal-basecamp that referenced this issue Apr 27, 2022
podman load no longer allows the tagging of the image during a load op: containers/podman#7387

to adjust the script for this, I filter the images to match metal-basecamp, get
the image id, and then tag it in a separate command after the image has loaded

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>

prevent error
```
Apr 25 20:58:20 redbull-ncn-m001-pit systemd[1]: /usr/lib/systemd/system/basecamp.service:14: Unit configured to use KillMode=none. Support for KillMode=none is deprecated and will be eventually removed in future SLE versions. Please see SUSE TID https://www.suse.com/support/kb/doc/?id=000020394 for more details.
```
by setting the killmode to control-group

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
jacobsalmela added a commit to Cray-HPE/metal-basecamp that referenced this issue Apr 28, 2022
podman load no longer allows the tagging of the image during a load op: containers/podman#7387

to adjust the script for this, I filter the images to match metal-basecamp, get
the image id, and then tag it in a separate command after the image has loaded

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>

prevent error
```
Apr 25 20:58:20 redbull-ncn-m001-pit systemd[1]: /usr/lib/systemd/system/basecamp.service:14: Unit configured to use KillMode=none. Support for KillMode=none is deprecated and will be eventually removed in future SLE versions. Please see SUSE TID https://www.suse.com/support/kb/doc/?id=000020394 for more details.
```
by setting the killmode to control-group

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
jacobsalmela added a commit to Cray-HPE/metal-basecamp that referenced this issue Apr 28, 2022
podman load no longer allows the tagging of the image during a load op: containers/podman#7387

to adjust the script for this, I filter the images to match metal-basecamp, get
the image id, and then tag it in a separate command after the image has loaded

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>

prevent error
```
Apr 25 20:58:20 redbull-ncn-m001-pit systemd[1]: /usr/lib/systemd/system/basecamp.service:14: Unit configured to use KillMode=none. Support for KillMode=none is deprecated and will be eventually removed in future SLE versions. Please see SUSE TID https://www.suse.com/support/kb/doc/?id=000020394 for more details.
```
by setting the killmode to control-group

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
jacobsalmela added a commit to Cray-HPE/metal-basecamp that referenced this issue Apr 28, 2022
podman load no longer allows the tagging of the image during a load op: containers/podman#7387

to adjust the script for this, I filter the images to match metal-basecamp, get
the image id, and then tag it in a separate command after the image has loaded

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>

prevent error
```
Apr 25 20:58:20 redbull-ncn-m001-pit systemd[1]: /usr/lib/systemd/system/basecamp.service:14: Unit configured to use KillMode=none. Support for KillMode=none is deprecated and will be eventually removed in future SLE versions. Please see SUSE TID https://www.suse.com/support/kb/doc/?id=000020394 for more details.
```
by setting the killmode to control-group

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants