Skip to content

Commit

Permalink
Reverse broken backwards minimum disk space warning (#3132)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Aug 1, 2021
1 parent 06ff3e5 commit 1f95a18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/dockerutil/dockerutils.go
Expand Up @@ -956,7 +956,7 @@ func CheckAvailableSpace() {
_, out, _ := RunSimpleContainer(version.GetWebImage(), "", []string{"sh", "-c", `df -h / | awk '/overlay/ {print $5;}'`}, []string{}, []string{}, []string{"testnfsmount" + ":/nfsmount"}, "", true, false, nil)
out = strings.Trim(out, "% \n")
spacePercent, _ := strconv.Atoi(out)
if spacePercent < nodeps.MinimumDockerSpaceWarning {
util.Error("Your docker installation has less than %d%% available space. Please increase it!", nodeps.MinimumDockerSpaceWarning)
if (100 - spacePercent) < nodeps.MinimumDockerSpaceWarning {
util.Error("Your docker installation has less than %d%% available space (%d%% used). Please increase disk image size.", nodeps.MinimumDockerSpaceWarning, spacePercent)
}
}

0 comments on commit 1f95a18

Please sign in to comment.