The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6387
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Every single call to "lxc info" hits GetVolumeUsage, leading to a lot of warnings and errors being logged. The only case where a log message is really appropriate is if the user requests a quota be applied and we are unable to do so due to lack of support. Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From b9803f69986a950fcbd1ad0159649fbdd0dd55de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Sat, 2 Nov 2019 09:52:58 -0400 Subject: [PATCH] lxd/storage/dir: Don't fail/complain about missing quotas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every single call to "lxc info" hits GetVolumeUsage, leading to a lot of warnings and errors being logged. The only case where a log message is really appropriate is if the user requests a quota be applied and we are unable to do so due to lack of support. Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/storage/drivers/driver_dir.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lxd/storage/drivers/driver_dir.go b/lxd/storage/drivers/driver_dir.go index e4bfeb2779..61ed55a992 100644 --- a/lxd/storage/drivers/driver_dir.go +++ b/lxd/storage/drivers/driver_dir.go @@ -126,7 +126,7 @@ func (d *dir) GetVolumeUsage(volType VolumeType, volName string) (int64, error) volPath := GetVolumeMountPath(d.name, volType, volName) ok, err := quota.Supported(volPath) if err != nil || !ok { - return -1, fmt.Errorf("The backing filesystem doesn't support quotas") + return 0, nil } // Get the volume ID for the volume to access quota. @@ -695,7 +695,6 @@ func (d *dir) initQuota(path string, volID int64) error { ok, err := quota.Supported(path) if err != nil || !ok { // Skipping quota as underlying filesystem doesn't suppport project quotas. - d.logger.Warn("The backing filesystem doesn't support quotas, skipping quota", log.Ctx{"path": path}) return nil }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel