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

Asynchronous cleanup not removing renamed workspace directories on slaves

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • ws-cleanup-plugin
    • None
    • Jenkins ver. 2.121.3
      ws-cleanup 0.34

      We noticed the workspaces on our slaves getting renamed to the form of ${WORKSPACE}ws-cleanup${TIMESTAMP}. (ie, job1 would become job1_ws-cleanup_1411197183394). The expected behavior is that these were temporary to support asynchronous processing and would be deleted. However, these directories never get removed from the slave. Over time, the slave hard drives filled up resulting in build failures.

          [JENKINS-53579] Asynchronous cleanup not removing renamed workspace directories on slaves

          Jakub Bochenski created issue -
          Jakub Bochenski made changes -
          Link New: This issue is related to JENKINS-27648 [ JENKINS-27648 ]
          Jakub Bochenski made changes -
          Environment Original: Jenkins 1.579
          ws-cleanup 0.24
          New: ws-cleanup 0.34
          Jakub Bochenski made changes -
          Environment Original: ws-cleanup 0.34 New: Jenkins ver. 2.121.3
          ws-cleanup 0.34
          Jakub Bochenski made changes -
          Description Original: After upgrading to ws-cleanup 0.24 in order to get the asynchronous cleanup function we noticed the workspaces on our slaves getting renamed to the form of ${WORKSPACE}_ws-cleanup_${TIMESTAMP}. (ie, job1 would become job1_ws-cleanup_1411197183394). The expected behavior under ws-cleanup 0.24 is that these were temporary to support asynchronous processing and would be deleted. However, these directories never get removed from the slave. Over time, the slave hard drives filled up resulting in build failures. New: We noticed the workspaces on our slaves getting renamed to the form of ${WORKSPACE}_ws-cleanup_${TIMESTAMP}. (ie, job1 would become job1_ws-cleanup_1411197183394). The expected behavior is that these were temporary to support asynchronous processing and would be deleted. However, these directories never get removed from the slave. Over time, the slave hard drives filled up resulting in build failures.
          Jakub Bochenski made changes -
          Link New: This issue depends on JENKINS-24824 [ JENKINS-24824 ]

          We're experiencing same issue on Jenkins - v. 2.138.2 / WS-Cleanup plugin - v. 0.34

          Oleksandr Perepelytsya added a comment - We're experiencing same issue on Jenkins - v. 2.138.2 / WS-Cleanup plugin - v. 0.34

          Collin R added a comment - - edited

          Same here on Jenkins v. 2.140 / WS-Cleanup plugin v. 0.34. Seems that the ${WORKSPACE}_ws-cleanup_${TIMESTAMP} directory is somehow owned by root and therefore causes the async resource disposer to fail due to lack of permissions. Workaround is to add a cron job to chown ${WORKSPACE}_ws-cleanup_${TIMESTAMP} which allows async cleanup to occur.

          Collin R added a comment - - edited Same here on Jenkins v. 2.140 / WS-Cleanup plugin v. 0.34. Seems that the ${WORKSPACE}_ws-cleanup_${TIMESTAMP} directory is somehow owned by root and therefore causes the async resource disposer to fail due to lack of permissions. Workaround is to add a cron job to chown ${WORKSPACE}_ws-cleanup_${TIMESTAMP} which allows async cleanup to occur.

          On second thoughts I think this is an improvement, not a defect. Nobody promised async cleanup will handle ownership errors etc.
          It would be nice to have support for it, but any solution will be hacky and

          Jakub Bochenski added a comment - On second thoughts I think this is an improvement, not a defect. Nobody promised async cleanup will handle ownership errors etc. It would be nice to have support for it, but any solution will be hacky and
          Jakub Bochenski made changes -
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]

            olivergondza Oliver Gondža
            jbochenski Jakub Bochenski
            Votes:
            15 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated: