diff --git a/core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java b/core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java index 9b94d4b4e721..02d4a62b9d2f 100644 --- a/core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java +++ b/core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java @@ -115,7 +115,8 @@ public DiskSpace markNodeOfflineIfDiskspaceIsTooLow(Computer c) { long threshold = getThresholdBytes(c); if (size != null) { size.setThreshold(threshold); - size.setWarningThreshold(getWarningThresholdBytes(c)); + long warningThreshold = getWarningThresholdBytes(c); + size.setWarningThreshold(warningThreshold); if (size.size < threshold) { size.setTriggered(this.getClass(), true); if (getDescriptor().markOffline(c, size)) { diff --git a/core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java b/core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java index e83cbf48790f..1115a028e32a 100644 --- a/core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java +++ b/core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java @@ -124,7 +124,7 @@ public boolean isTriggered() { @Restricted(NoExternalUse.class) public boolean isWarning() { - return warningThreshold > 0 && size < warningThreshold; + return size > threshold && size < warningThreshold ; } /**