I'm prefixing this by saying this is all from a perspective of linux environment with kernels 6.8 with ubuntu distro.
Based on
|
func checkAndRecordOverlaySupport(home, runhome string) (bool, error) { |
If overlay support feature isn't already cached on the host (which will happen every boot since it caches in /run/containers/storage/overlay, backed by tmpfs)
It will try to test support, on failure it'll delete home which in default configurations would be /var/lib/containers/storage/overlay if I'm not mistaken.
But on success, it'll also attempt to delete home, before it eventually recreates it
|
defer func() { |
|
// Permitted to fail, since the various subdirectories |
|
// can be empty or not even there, and the home might |
|
// legitimately be not empty |
|
_ = unix.Unmount(mergedDir, unix.MNT_DETACH) |
|
_ = os.RemoveAll(layerDir) |
|
_ = os.Remove(home) |
|
}() |
In the XFS project quota libs section it's suggested that we can assign a project id to /var/lib/containers/storage/overlay
|
// xfs_quota tool can be used to assign a project id to the driver home directory, e.g.: |
|
// echo 100000:/var/lib/containers/storage/overlay >> /etc/projects |
|
// echo 200000:/var/lib/containers/storage/volumes >> /etc/projects |
|
// echo storage:100000 >> /etc/projid |
|
// echo volumes:200000 >> /etc/projid |
|
// xfs_quota -x -c 'project -s storage volumes' /<xfs mount point> |
|
// |
|
// In the example above, the storage directory project id will be used as a |
|
// "start offset" and all containers will be assigned larger project ids |
|
// (e.g. >= 100000). Then the volumes directory project id will be used as a |
|
// "start offset" and all volumes will be assigned larger project ids |
|
// (e.g. >= 200000). |
|
// This is a way to prevent xfs_quota management from conflicting with |
|
// containers/storage. |
But, if the home deletion is successful, doesn't that remove the XFS project quota ID on home if the admin set one up before running a workload?
I'm prefixing this by saying this is all from a perspective of linux environment with kernels 6.8 with ubuntu distro.
Based on
container-libs/storage/drivers/overlay/overlay.go
Line 226 in e70c309
If
overlay supportfeature isn't already cached on the host (which will happen every boot since it caches in/run/containers/storage/overlay, backed by tmpfs)It will try to test support, on failure it'll delete
homewhich in default configurations would be/var/lib/containers/storage/overlayif I'm not mistaken.But on success, it'll also attempt to delete
home, before it eventually recreates itcontainer-libs/storage/drivers/overlay/overlay.go
Lines 709 to 716 in e70c309
In the XFS project quota libs section it's suggested that we can assign a project id to
/var/lib/containers/storage/overlaycontainer-libs/storage/drivers/quota/projectquota_supported.go
Lines 112 to 125 in e70c309
But, if the
homedeletion is successful, doesn't that remove the XFS project quota ID onhomeif the admin set one up before running a workload?