mirror of
https://github.com/containers/podman.git
synced 2025-07-04 01:48:28 +08:00
libpod: use GraphRoot for overlay upper dir
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -1527,7 +1527,7 @@ func (c *Container) mountStorage() (_ string, deferredErr error) {
|
|||||||
mountPoint := c.config.Rootfs
|
mountPoint := c.config.Rootfs
|
||||||
// Check if overlay has to be created on top of Rootfs
|
// Check if overlay has to be created on top of Rootfs
|
||||||
if c.config.RootfsOverlay {
|
if c.config.RootfsOverlay {
|
||||||
overlayDest := c.runtime.RunRoot()
|
overlayDest := c.runtime.GraphRoot()
|
||||||
contentDir, err := overlay.GenerateStructure(overlayDest, c.ID(), "rootfs", c.RootUID(), c.RootGID())
|
contentDir, err := overlay.GenerateStructure(overlayDest, c.ID(), "rootfs", c.RootUID(), c.RootGID())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("rootfs-overlay: failed to create TempDir in the %s directory: %w", overlayDest, err)
|
return "", fmt.Errorf("rootfs-overlay: failed to create TempDir in the %s directory: %w", overlayDest, err)
|
||||||
|
@ -973,6 +973,14 @@ func (r *Runtime) RunRoot() string {
|
|||||||
return r.store.RunRoot()
|
return r.store.RunRoot()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GraphRoot retrieves the current c/storage directory in use by Libpod.
|
||||||
|
func (r *Runtime) GraphRoot() string {
|
||||||
|
if r.store == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return r.store.GraphRoot()
|
||||||
|
}
|
||||||
|
|
||||||
// GetName retrieves the name associated with a given full ID.
|
// GetName retrieves the name associated with a given full ID.
|
||||||
// This works for both containers and pods, and does not distinguish between the
|
// This works for both containers and pods, and does not distinguish between the
|
||||||
// two.
|
// two.
|
||||||
|
Reference in New Issue
Block a user