Skip to content

Commit

Permalink
Merge pull request #2123 from rudyfly/diskquota-bugfix
Browse files Browse the repository at this point in the history
bugfix: fail to execute repquota
  • Loading branch information
Ace-Tang authored Aug 20, 2018
2 parents 94baba4 + fc34681 commit 2fa79c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions storage/quota/quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/alibaba/pouch/pkg/exec"
"github.com/alibaba/pouch/pkg/kernel"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -289,9 +290,10 @@ func loadQuotaIDs(repquotaOpt string) (map[uint32]struct{}, uint32, error) {
quotaIDs := make(map[uint32]struct{}, 0)

minID := QuotaMinID
_, output, _, err := exec.Run(0, "repquota", repquotaOpt)
exit, output, stderr, err := exec.Run(0, "repquota", repquotaOpt)
if err != nil {
return nil, minID, err
return nil, 0, errors.Wrapf(err, "failed to execute [repquota %s], stdout: (%s), stderr: (%s), exit: (%d)",
repquotaOpt, output, stderr, exit)
}

lines := strings.Split(string(output), "\n")
Expand Down

0 comments on commit 2fa79c5

Please sign in to comment.