Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax disk space checking #275

Merged
merged 1 commit into from
Jan 22, 2017
Merged

Relax disk space checking #275

merged 1 commit into from
Jan 22, 2017

Conversation

rnorth
Copy link
Member

@rnorth rnorth commented Jan 21, 2017

…to not abort in cases where df output shows no available volumes (see #273). While the cause is not known, and Docker may yet fail, relaxing this constraint at least lets Docker try without aborting prematurely.

@rnorth rnorth requested a review from bsideup January 21, 2017 17:12
@@ -157,7 +157,7 @@ private void checkDiskSpace(DockerClient client) {
df.usedPercent.map(x -> x.toString() + "%").orElse("unknown"),
df.availableMB.map(x -> x.toString() + " MB available").orElse("unknown available"));

if (df.availableMB.orElseThrow(NotAbleToGetDiskSpaceUsageException::new) < 2048) {
if (df.availableMB.isPresent() && df.availableMB.get() < 2048) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (df.availableMB.map(it -> it < 2048).orElse(false)) { :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:0 .... :D

…ws no available volumes (see #273). While the cause is not known, and Docker may yet fail, relaxing this constraint at least lets Docker try without aborting prematurely.

Use functional operation to compare disk space if not null
@bsideup bsideup merged commit 3b5165e into master Jan 22, 2017
@bsideup bsideup deleted the relax-disk-space-check branch January 22, 2017 08:27
@bsideup bsideup added this to the 1.1.8 milestone Jan 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants