From b4ac324b4bbb329d8a04b9fb8fc2fcd7caa136a9 Mon Sep 17 00:00:00 2001 From: Rudy Zhang Date: Mon, 11 Mar 2019 14:08:35 +0800 Subject: [PATCH] bugfix: skip error when failed to set disk quota skip error when failed to set disk quota, make all path have been set disk quota, and make the contaienr to run. Signed-off-by: Rudy Zhang --- daemon/mgr/container_storage.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/mgr/container_storage.go b/daemon/mgr/container_storage.go index fc578f0b0..3bfd8c005 100644 --- a/daemon/mgr/container_storage.go +++ b/daemon/mgr/container_storage.go @@ -630,14 +630,14 @@ func (mgr *ContainerManager) setDiskQuota(ctx context.Context, c *Container, mou // set rootfs quota _, err = quota.SetRootfsDiskQuota(qm.Source, qm.Size, qm.QuotaID) if err != nil { - return errors.Wrapf(err, "failed to set rootfs quota, mountfs(%s), size(%s), quota id(%d)", - qm.Source, qm.Size, qm.QuotaID) + logrus.Warnf("failed to set rootfs quota, mountfs(%s), size(%s), quota id(%d), err(%v)", + qm.Source, qm.Size, qm.QuotaID, err) } } else { err := quota.SetDiskQuota(qm.Source, qm.Size, qm.QuotaID) if err != nil { - return errors.Wrapf(err, "failed to set disk quota, directory(%s), size(%s), quota id(%d)", - qm.Source, qm.Size, qm.QuotaID) + logrus.Warnf("failed to set disk quota, directory(%s), size(%s), quota id(%d), err(%v)", + qm.Source, qm.Size, qm.QuotaID, err) } } }