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

Docker API /containers/{id}/archive #6050

Closed
abitrolly opened this issue Apr 30, 2020 · 24 comments
Closed

Docker API /containers/{id}/archive #6050

abitrolly opened this issue Apr 30, 2020 · 24 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@abitrolly
Copy link
Contributor

abitrolly commented Apr 30, 2020

/kind bug

Accessing /containers/{id}/archive on 1.9.1 gives 404. I guess it is not implemented yet.

https://docs.docker.com/engine/api/v1.38/#operation/ContainerArchive

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 30, 2020
@mheon
Copy link
Member

mheon commented Apr 30, 2020

Yep, a few remote endpoints (those for copy, exec, and I believe the network commands) are still being worked on.

@abitrolly
Copy link
Contributor Author

@mheon can't wait for it to use buildpacks/pack#564

@baude
Copy link
Member

baude commented Apr 30, 2020

@abitrolly https://docs.docker.com/engine/api/v1.40/#operation/ContainerArchiveInfo is this what you are after? if so, you are correct, this is a bug. would you be willing to contribute?

@abitrolly
Copy link
Contributor Author

I am not sure. While it seems pretty interesting, my motivation is still pretty low as I am not backed by any big company and on the personal scale I also won't be able to use it, because podman 2.0 is not ready, and API fixes are not backported to 1.9.x

@github-actions
Copy link

github-actions bot commented Jun 1, 2020

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

@rhatdan
Copy link
Member

rhatdan commented Jun 1, 2020

@abitrolly Does the master branch work for you now?

@mheon
Copy link
Member

mheon commented Jun 1, 2020

This is not implemented yet. We added the endpoints, but they just throw "not implemented" errors for now.

Definitely on our radar, though, but will probably be combined with a rewrite of CLI podman cp

@mheon
Copy link
Member

mheon commented Jun 2, 2020

Changing to kind/feature as this is a new feature

@mheon mheon added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/bug Categorizes issue or PR as related to a bug. labels Jun 2, 2020
@mheon mheon assigned mheon and unassigned jwhonce Sep 9, 2020
@vrothberg
Copy link
Member

@lsm5 are you interested in looking into it? I think we can start with adding a docker/compat endpoint first.

AFAIUI we have to mount the container and the archive the specified path inside the container and throw it back over the wire.

@mheon
Copy link
Member

mheon commented Sep 10, 2020

@vrothberg This is part of the copy work, so I'll be on this one once we're off bug week.

@vrothberg
Copy link
Member

@mheon, sorry, I didn't notice you just self-assigned yesterday.

@yan12125
Copy link
Contributor

I noticed that the API endpoint to upload an archive in Podman uses different HTTP method than the corresponding API in Docker. The former uses POST and the latter uses PUT. Is the difference intentional?

[1] https://docs.podman.io/en/latest/_static/api.html#operation/putArchive
[2] https://docs.docker.com/engine/api/v1.40/#operation/PutContainerArchive

@jwhonce
Copy link
Member

jwhonce commented Sep 11, 2020

@yan12125 That is a bug on podman's part. /cc @mheon

#7638 fixes HTTP method issues

@github-actions
Copy link

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

@yan12125
Copy link
Contributor

Thanks for the fix #7638. The HTTP methods are consistent with Docker now, but that endpoint still returns "501 Not Implemented" as of Podman 2.1.1.

@lcarva
Copy link

lcarva commented Oct 20, 2020

Is there a timeline for when this issue may be addressed? For context, this prevents osbs from switching away from docker to podman.

@rhatdan
Copy link
Member

rhatdan commented Oct 20, 2020

I take it that this is fixed in the main branch now, and you just are waiting for a release of podman 2.1.2 or 2.2 to get the fix? If I am mistaken, please reopen this issue.

@rhatdan rhatdan closed this as completed Oct 20, 2020
@lcarva
Copy link

lcarva commented Oct 20, 2020

I take it that this is fixed in the main branch now, and you just are waiting for a release of podman 2.1.2 or 2.2 to get the fix? If I am mistaken, please reopen this issue.

@rhatdan, the previously mentioned fix was for changing the HTTP method to match what the docker API uses. IIUC, the API method is still returning 501 Not Implemented. Did I miss something?

@mheon
Copy link
Member

mheon commented Oct 20, 2020

This is not fixed, and will require significant effort to implement. There's a Jira card assigned to me for it, but I have other priorities at the moment.

@mheon mheon reopened this Oct 20, 2020
@fatherlinux
Copy link
Contributor

fatherlinux commented Oct 21, 2020

FYI, I just tried this with the pack cli and ran into the lack of the archive method. Specific log message here:
Oct 21 10:53:54 fedora podman[3101]: time="2020-10-21T10:53:54-04:00" level=debug msg="APIHandler -- Method: PUT URL: /v1.38/containers/416b79116c1e9b7e8409ef0bfc4224750143e35bf74b02c046627f045ecbfcb1/archive?noOverwriteDirNonDir=true&path=%2F"
Oct 21 10:53:54 fedora podman[3101]: time="2020-10-21T10:53:54-04:00" level=info msg="Request Failed(Not Implemented): not implemented"

Full log here:
https://pastebin.com/ft1YNwg8

Versions:

  • Podman 2.1.1
  • Fedora 32

@rhatdan
Copy link
Member

rhatdan commented Oct 22, 2020

@jwhonce Is this something you could look at?

@vrothberg
Copy link
Member

Since #8126 has merged, we can close. I am currently working on refactoring the backend so that podman-{remote}-cp and the docker and libpod endpoint share all code.

@abitrolly
Copy link
Contributor Author

@vrothberg could that fix the issue buildpacks/pack#966 with pack?

@vrothberg
Copy link
Member

@vrothberg could that fix the issue buildpacks/pack#966 with pack?

@abitrolly, I do not see why the upper issue is failing. If it's only failing because the archive endpoint was missing, then it should be fixed.

@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. 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

No branches or pull requests

10 participants