mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
Recreate the Rootfs in mountStorage for infra-container.
After the system reboot, the Rootfs for infra-container can be removed. This can happen when it is stored on tmpfs. This commit recreates the infra-container directory which is used for Rootfs for infra-container before mounting it. Fixes: #26190 Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit is contained in:
@ -250,7 +250,11 @@ func (r *Runtime) newContainer(ctx context.Context, rSpec *spec.Spec, options ..
|
||||
|
||||
func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Container, retErr error) {
|
||||
if ctr.IsDefaultInfra() || ctr.IsService() {
|
||||
_, err := ctr.prepareInitRootfs()
|
||||
err := ctr.createInitRootfs()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_, err = ctr.prepareCatatonitMount()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user