-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Data not copying up to volumes for containers created but not started #10262
Comments
I doubt it. This would involve a significant refactor of the way volume mount and copy-up happens to move it to container creation from first-time initialization. We're planning 3.2.0 final later this week, and this is too much work and too large of a change to land before then. Maybe in 3.3.x. |
I see. Is there a timeline for 3.3? |
If we maintain our current pace, mid to late July seems reasonable? |
That will work. Thank you. |
Hi @mheon , just checking on this one. |
@mheon , is this planned for the July release? |
No one has begun work on it yet. |
@mheon ,
I'm unable to create branches for these repos. How can I contribute to this issue? |
Why can't you create branches for these repos? |
The patch also won't work - it's happening too soon. Initialization must happen after the container is added to the state. |
GitHub does not show me option to create branch when I type a unique name in the branch text field. Pushing the changes fail.
Looks like I am receiving the error because I am not member of the “Containers” GitHub organization. |
Thanks @mheon for the review and comment.
Not sure what "happening to soon" mean. I changed the logic to just prepare container instead of initializing so that there is no init event sent. It would also avoid the "executable file not found in" error as observed in the issue. With this change, I guess we should be okay calling prepare before adding the container to the state. Let me know if that's not the case. The new patches look like
|
This does not fix the core problem of the earlier patch - the prepare is happening before the container is added to the state, so configuration information is not being saved to the DB. The old init() code was fine but it must be more further down in the function. |
@mheon ,
Is this okay? I also wanted to check if the prepare() needs to be a conditional call or can it happen by default? I remember you mentioned that doing this may have performance impact on |
Could someone set the “In Progress” label and assign this to me? |
@vikas-goel I am suggesting you fork the project create a branch and open a PR for MAIN. Not that you create a branch on the main repo. |
Thank you @rhatdan for the suggestion and assignment. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When volume and container with this volume are created by docker, that volume gets populated (copied up from the image) and can then be consumed by another container using
--volumes-from
. It does not seem to work with podman. With podman, the workaround is to runpodman container init
after creating the container as described in #8041.Running
podman container init
gives error same as mentioned in #8041 (comment). The command, however, does the job.I am using Docker Compose to create data volume container and then adding the same as a dependency for the service/application in the same Docker Compose configuration YAML file.
With Podman 3.0.2 and later version, I am using podman-docker package to manage my podman containers using Docker Compose. As the said podman command (podman container init) for the workaround is very specific to podman, Docker Compose does not have option to do the same.
Can we have a podman (global) configuration option, say
setup-volume-mount
, that can stay turned off by default. When the option is turned on, thepodman create --name <name> <container-image>
behaves same as correspondingdocker
command. That is, the podman should internally prepare the mount, i.e. copy the data without requiring additional commands (podman container init). The error described in #8041 (comment) should be ignored.Steps to reproduce the issue:
Same as described in #8041
Describe the results you received:
Same as described in #8041
Describe the results you expected:
Same as described in #8041
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
Red Hat Enterprise Linux 8.4 Beta
VMware virtual machine
The text was updated successfully, but these errors were encountered: