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

NodeMonitor out of disk space message is wrong for master

    • Jenkins 2.164

      When the master goes out of disk space, it is put offline by the hudson.node_monitors.AbstractDiskSpaceMonitor system.

      The message has a blank where the node name should be:

      Putting back online as there is enough disk space again

      I think this is just because c.getName() returns an empty string in https://github.com/jenkinsci/jenkins/blob/9d61a9a13171c94e55779d166d81599cdd0f9cb7/core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java#L43-L71.

      Acceptance criteria

      • This should show master instead of a space as the node name, i.e.

      Putting back master online as there is enough disk space

        1. Capture1.JPG
          Capture1.JPG
          59 kB
        2. Capture1.JPG
          Capture1.JPG
          59 kB
        3. Capture2.JPG
          Capture2.JPG
          125 kB
        4. Capture2 - Copy.JPG
          Capture2 - Copy.JPG
          193 kB
        5. Capture3.JPG
          Capture3.JPG
          121 kB
        6. Capture3 - Copy.JPG
          Capture3 - Copy.JPG
          181 kB
        7. Capture4 - Copy.JPG
          Capture4 - Copy.JPG
          127 kB
        8. Capture5 - Copy.JPG
          Capture5 - Copy.JPG
          159 kB
        9. image-2019-02-09-00-30-55-101.png
          image-2019-02-09-00-30-55-101.png
          193 kB

          [JENKINS-55738] NodeMonitor out of disk space message is wrong for master

          Baptiste Mathus added a comment - - edited

          nisarg14 are you on Windows or Linux?

          On Linux, the usual way for this is simply to use fallocate or dd, see https://stackoverflow.com/a/5688625/345845.

          On Windows, the simplest low-tech way I did that in the past is the following:

          • find a big enough file, or very big if you have a lot of free disk space
          • copy paste it as many times as needed, even using the UI and Ctrl-C Ctrl-V should be quick enough
            • i.e. if you have 10 GB of free disk space, find a big file, like 1GB, and copy-paste it like nine or ten times

          Or maybe try https://blogs.msdn.microsoft.com/oldnewthing/20150710-00/?p=45171 but didn't try it myself.

          HTH

          Baptiste Mathus added a comment - - edited nisarg14 are you on Windows or Linux? On Linux, the usual way for this is simply to use fallocate or dd , see https://stackoverflow.com/a/5688625/345845 . On Windows, the simplest low-tech way I did that in the past is the following: find a big enough file, or very big if you have a lot of free disk space copy paste it as many times as needed, even using the UI and Ctrl-C Ctrl-V should be quick enough i.e. if you have 10 GB of free disk space, find a big file, like 1GB, and copy-paste it like nine or ten times Or maybe try https://blogs.msdn.microsoft.com/oldnewthing/20150710-00/?p=45171 but didn't try it myself. HTH

          Nisarg Shah added a comment -

          batmat Okay, great I had a thought of copying and pasting big files and manually create an out of disk event. But actually after this I have a doubt that how to run jenkins code on local and test that fixed part?

          Nisarg Shah added a comment - batmat Okay, great I had a thought of copying and pasting big files and manually create an out of disk event. But actually after this I have a doubt that how to run jenkins code on local and test that fixed part?

          Nisarg Shah added a comment - - edited

          batmat jglick

          Due to some issues I have deleted my previous repo and due to that my old PR got deleted.

          Here is new PR : https://github.com/jenkinsci/jenkins/pull/3874

          Nisarg Shah added a comment - - edited batmat jglick Due to some issues I have deleted my previous repo and due to that my old PR got deleted. Here is new PR :  https://github.com/jenkinsci/jenkins/pull/3874

          Nisarg Shah added a comment -

          batmat

          Can you suggest me the command(applied on Jenkins Folder) of test through which I can check this fix?

          I have checked some flow of the code and want to check whether this fix would actually work or not.

          Nisarg Shah added a comment - batmat Can you suggest me the command(applied on Jenkins Folder) of test through which I can check this fix? I have checked some flow of the code and want to check whether this fix would actually work or not.

          Answered in the open GitHub Pull Request.

          Baptiste Mathus added a comment - Answered in the open GitHub Pull Request.

          Nisarg Shah added a comment -

          batmat

          I have tested he fix and attaching screenshot of the output of Jenkins Window and CLI.

          And I think this fix has resolved the issue of displaying null message.

           

           

          Nisarg Shah added a comment - batmat I have tested he fix and attaching screenshot of the output of Jenkins Window and CLI. And I think this fix has resolved the issue of displaying null message.    

          nisarg14 the goal here is to fix the message explained in the description.

          See the acceptance criteria above.
          You need to see how Jenkins reacts when you remove the big files and have enough disk space again.

          Baptiste Mathus added a comment - nisarg14 the goal here is to fix the message explained in the description. See the acceptance criteria above. You need to see how Jenkins reacts when you remove the big files and have enough disk space again.

          Nisarg Shah added a comment -

          batmat

          I am attaching the screenshot of the message before the fix : 

          I have marked the issue with red marker.

          Nisarg Shah added a comment - batmat I am attaching the screenshot of the message before the fix :  I have marked the issue with red marker.

          Nisarg Shah added a comment -

          batmat

          I am attaching the screenshot of message after the fix.

          And I think the issue is solved as per acceptance criteria.

           

          Nisarg Shah added a comment - batmat I am attaching the screenshot of message after the fix. And I think the issue is solved as per acceptance criteria.  

          Oleg Nenashev added a comment -

          The fix has been released in Jenkins 2.164. Thanks nisarg14!

          Oleg Nenashev added a comment - The fix has been released in Jenkins 2.164. Thanks nisarg14 !

            nisarg14 Nisarg Shah
            batmat Baptiste Mathus
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: