Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7776

hudson shows 0GB free space when space available drops below 1GB

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • remoting
    • None
    • Hudson 1.371, master on Linux, slaves on Linux and Windows XP

      In the node Dashboard, Hudson always shows disk space and temp space in GB. If the available space is less than 1GB, this number is rounded down to 0GB. It would be better if Hudson displayed ">1 GB" (or the value in MB) unless there really was no free space on the disk.

      I encountered this during routine maintenance, when I checked on the Hudson node status and saw the attached image. I logged into the 0GB slave to verify that it wasn't completely out of space before I realized that Hudson was just rounding down.

          [JENKINS-7776] hudson shows 0GB free space when space available drops below 1GB

          Chris Arnott added a comment -

          It should have been giving a decimal for a value < 1GB. But only if you haven't changed the monitoring threshold.

          Pull request to fix created: https://github.com/jenkinsci/jenkins/pull/1039

          Chris Arnott added a comment - It should have been giving a decimal for a value < 1GB. But only if you haven't changed the monitoring threshold. Pull request to fix created: https://github.com/jenkinsci/jenkins/pull/1039

          Code changed in jenkins
          User: Chris Arnott
          Path:
          core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java
          http://jenkins-ci.org/commit/jenkins/11b258829ab89e72b4de188c2d0e32006aa49bd2
          Log:
          JENKINS-7776 Show decimals when disk space monitored as less than 1 GB.

          The logic relied on the monitor being triggered to show more decimals.
          The monitor threshold can be set to something other than 1 GB, and therefore didn't always work as intended.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Chris Arnott Path: core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java http://jenkins-ci.org/commit/jenkins/11b258829ab89e72b4de188c2d0e32006aa49bd2 Log: JENKINS-7776 Show decimals when disk space monitored as less than 1 GB. The logic relied on the monitor being triggered to show more decimals. The monitor threshold can be set to something other than 1 GB, and therefore didn't always work as intended.

          Code changed in jenkins
          User: Chris Arnott
          Path:
          core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java
          core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java
          http://jenkins-ci.org/commit/jenkins/3f7de7f317441a36be4179d978007db1f644e033
          Log:
          JENKINS-7776 Show human readable units when Monitored space is low.

          Revert the logic in DiskSpaceMonitor to be correct again.
          Use Functions.humanReadableByteSize() to show useful values in Monitors.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Chris Arnott Path: core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java http://jenkins-ci.org/commit/jenkins/3f7de7f317441a36be4179d978007db1f644e033 Log: JENKINS-7776 Show human readable units when Monitored space is low. Revert the logic in DiskSpaceMonitor to be correct again. Use Functions.humanReadableByteSize() to show useful values in Monitors.

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java
          core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java
          http://jenkins-ci.org/commit/jenkins/5806cfab96d35067c1bfc86985b1e3d894fe9e93
          Log:
          [FIXED JENKINS-7776] Merge pull request #1039 from ChrisA89/moreHelpfulDiskSpaceMonitor

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java http://jenkins-ci.org/commit/jenkins/5806cfab96d35067c1bfc86985b1e3d894fe9e93 Log: [FIXED JENKINS-7776] Merge pull request #1039 from ChrisA89/moreHelpfulDiskSpaceMonitor

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3089
          JENKINS-7776 Show decimals when disk space monitored as less than 1 GB. (Revision 11b258829ab89e72b4de188c2d0e32006aa49bd2)
          JENKINS-7776 Show human readable units when Monitored space is low. (Revision 3f7de7f317441a36be4179d978007db1f644e033)

          Result = SUCCESS
          cta : 11b258829ab89e72b4de188c2d0e32006aa49bd2
          Files :

          • core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java

          cta : 3f7de7f317441a36be4179d978007db1f644e033
          Files :

          • core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java
          • core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3089 JENKINS-7776 Show decimals when disk space monitored as less than 1 GB. (Revision 11b258829ab89e72b4de188c2d0e32006aa49bd2) JENKINS-7776 Show human readable units when Monitored space is low. (Revision 3f7de7f317441a36be4179d978007db1f644e033) Result = SUCCESS cta : 11b258829ab89e72b4de188c2d0e32006aa49bd2 Files : core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java cta : 3f7de7f317441a36be4179d978007db1f644e033 Files : core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java

            chrisa89 Chris Arnott
            dbacher1 dbacher1
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: