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

disk usage doesn't get updated when wiping out workspace

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: disk-usage-plugin
    • Labels:
      None
    • Environment:
      Hudson ver. 1.341
      Hudson disk-usage plugin 0.11

      Description

      When trying to do some cleanup, our devs wiped out worskpaces in an effort to preserve disk space, but the project graph trend and disk usage page never seem to pick up the change (zero space taken now).

      Clicking the "record disk usage" button doesn't seem to help, although there is no real way to know for sure it has finished recalculating.....

        Activity

        Hide
        vjuranek vjuranek added a comment -

        I'll try to reproduce this bug.
        You can check Hudson thread dump (http://hudsonURL/threadDump) if there is any disk usage plugin thread to be sure the the recalculation has finished. The disk usage is quite expensive operation, which takes a usually some time. Another possibility is that the operation is stuck because of some stuck slave. If you see in the thread dump something like this:
        "Project disk usage thread / waiting for hudson.remoting.Channel@........" the calculation is not finished yet or or waits for stuck slave forever.

        Show
        vjuranek vjuranek added a comment - I'll try to reproduce this bug. You can check Hudson thread dump ( http://hudsonURL/threadDump ) if there is any disk usage plugin thread to be sure the the recalculation has finished. The disk usage is quite expensive operation, which takes a usually some time. Another possibility is that the operation is stuck because of some stuck slave. If you see in the thread dump something like this: "Project disk usage thread / waiting for hudson.remoting.Channel@........" the calculation is not finished yet or or waits for stuck slave forever.
        Hide
        edelorme edelorme added a comment -

        I did not find any thread stuck in the thread dump.
        I also ran the disk usage another time, the thread was there but it was doing its job, not waiting...

        Maybe this has to do with the fact that the project has no workspace at the time (being wiped out),
        the value would be remembered from previous runs?

        Show
        edelorme edelorme added a comment - I did not find any thread stuck in the thread dump. I also ran the disk usage another time, the thread was there but it was doing its job, not waiting... Maybe this has to do with the fact that the project has no workspace at the time (being wiped out), the value would be remembered from previous runs?
        Hide
        vjuranek vjuranek added a comment -

        > Maybe this has to do with the fact that the project has no workspace at the time (being wiped out),
        > the value would be remembered from previous runs?

        I think this is not the case:
        quickly looking at DiskUsageThread:

        if (workspace != null)

        { ... }

        else

        { bdua.diskUsage.wsUsage = 0; //workspace have been delete or is not reachable }

        However, I have to check it more carefully...

        Show
        vjuranek vjuranek added a comment - > Maybe this has to do with the fact that the project has no workspace at the time (being wiped out), > the value would be remembered from previous runs? I think this is not the case: quickly looking at DiskUsageThread: if (workspace != null) { ... } else { bdua.diskUsage.wsUsage = 0; //workspace have been delete or is not reachable } However, I have to check it more carefully...
        Hide
        vjuranek vjuranek added a comment -

        Confirmed, I can reproduce this issue. The strange thing is that it happens only sometimes - I tried wipe workspace of 5 projects, in 4 cases disk usage got updated, in one case not. I'll investigate it further...

        Show
        vjuranek vjuranek added a comment - Confirmed, I can reproduce this issue. The strange thing is that it happens only sometimes - I tried wipe workspace of 5 projects, in 4 cases disk usage got updated, in one case not. I'll investigate it further...
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in hudson
        User: : vjuranek
        Path:
        trunk/hudson/plugins/disk-usage/src/main/java/hudson/plugins/disk_usage/BuildDiskUsageAction.java
        http://jenkins-ci.org/commit/36147
        Log:
        Old data for workspace shouldn't be used - fix for JENKINS-7867

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : vjuranek Path: trunk/hudson/plugins/disk-usage/src/main/java/hudson/plugins/disk_usage/BuildDiskUsageAction.java http://jenkins-ci.org/commit/36147 Log: Old data for workspace shouldn't be used - fix for JENKINS-7867
        Hide
        vjuranek vjuranek added a comment -

        Fixed and disk-usage 0.12 released

        Show
        vjuranek vjuranek added a comment - Fixed and disk-usage 0.12 released
        Hide
        edelorme edelorme added a comment -

        Thanks!
        Can't wait to try it!
        Is it normal that the release for 0.12 doesn't show up at http://jenkins-ci.org/download/plugins/disk-usage ?

        Show
        edelorme edelorme added a comment - Thanks! Can't wait to try it! Is it normal that the release for 0.12 doesn't show up at http://jenkins-ci.org/download/plugins/disk-usage ?
        Hide
        vjuranek vjuranek added a comment -

        it takes some time to appear there. [1] states that "The released plugin will show up in the update center in half a day or so."

        [1] http://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins

        Show
        vjuranek vjuranek added a comment - it takes some time to appear there. [1] states that "The released plugin will show up in the update center in half a day or so." [1] http://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins
        Hide
        edelorme edelorme added a comment -

        I downloaded and installed the plugin from
        http://maven.dyndns.org/2/org/jvnet/hudson/plugins/disk-usage/0.12/disk-usage-0.12.hpi

        The issue seems to be fixed, thanks again!

        Show
        edelorme edelorme added a comment - I downloaded and installed the plugin from http://maven.dyndns.org/2/org/jvnet/hudson/plugins/disk-usage/0.12/disk-usage-0.12.hpi The issue seems to be fixed, thanks again!

          People

          • Assignee:
            vjuranek vjuranek
            Reporter:
            edelorme edelorme
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: