Skip to content

Commit

Permalink
bugfix: skip error when failed to set disk quota
Browse files Browse the repository at this point in the history
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 <rudyflyzhang@gmail.com>
  • Loading branch information
rudyfly authored and wangforthinker committed Mar 11, 2019
1 parent 7e2e266 commit b4ac324
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions daemon/mgr/container_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit b4ac324

Please sign in to comment.