[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2016-06-09 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jesse Glick updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-2111 
 
 
 
  removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jesse Glick 
 
 
 

Labels:
 
 multibranch workflow workspace 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2015-11-12 Thread alexan...@kriegisch.name (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Alexander Kriegisch commented on  JENKINS-2111 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 
 
For me the workdirs on the Jenkins master (no slaves) are never deleted, no matter whether I delete them via REST or from the GUI. Our Jenkins version is 1.596.2. What am I doing wrong? All workdirs are stored unter /opt/.jenkins/workspace. Is that a non-default directory? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2015-10-27 Thread nick.volyn...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Nick Volynkin commented on  JENKINS-2111 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 
 
From the user's side being asked to delete/rename workspace when deleting/renaming a job looks quite fine. The options on job deletion could be: 
 

delete altogether
 

leave intact
 
 
And on renaming: 
 

rename to the job's new name
 

use the old workspace (the "Use custom workspace" option)
 

delete and create a new workspace with job's name
 

leave intact and create a new workspace with job's name
 
 
Not every user is able to operate directly in the filesystem of a particular slave (either by ssh or directly). Maybe such users should not be able to leave a workspace intact, because otherwise they would waste storage space, which then will have to be cleaned by somebody else, like a sysadmin. (But there's a workaround with creating a new job with the old name, "catching" the workspace and wiping it.)  
There is a major exclusion with workspaces used by several jobs. They should be detected and only options 2 and 4 should be available. Maybe the whole feature/bug of not-auto-renaming exists to support reused workspaces? 
If a node is offline, it may be useful to allow only "use custom" and "leave intact". The user will be able to explicitly rename, delete or set up the new workspace when the node is online again. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 

[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2015-10-27 Thread pjdar...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 pjdarton commented on  JENKINS-2111 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 
 
Re: "feasible" Would it also be feasible to have all (online) slaves (attempt to) rename their workspace when a job is renamed? 
I think that having all (online) slaves (attempt to) delete/rename the workspace belonging to a job that is being deleted/renamed would be a good idea. Jenkins already has a web-ui page asking "are you sure" when you ask it to delete/rename a job, so this page could also be the place where the question is asked about whether or not Jenkins should attempt to delete/rename the matching workspaces. 
Note: Any code that's iterating over multiple slaves, asking them to delete/rename workspace folders, MUST NOT STOP if one slave declares a failure. We have (far too many) Windows-based slaves, and filesystem operations on Windows aren't reliable as the OS can decide (at any point, albeit briefly) that a file is locked and hence cause a deletion/rename to fail because a "file is in use", so we've leaned the hard way that if you want something to "just work" then you need to cope with filesystem "failures" (because they're often not reporting a fatal problem). i.e. the loop going over all slaves should ask them to try, but shouldn't stop asking the 3rd slave just because the 2nd failed - this "tidy up" operation should be on a "best effort" basis, not a "succeed or die trying" basis. 
I would also suggest that any operation that's being done "on all slaves" should run in multiple threads, rather than asking each slave in turn. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2015-10-27 Thread db...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Beck edited a comment on  JENKINS-2111 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 
 {quote}Or one could solve this another way:If the main Jenkins server were to iterate over all the jobs, it could build up a Map> listing, for each slave, what workspaces that slave might be asked about.Each slave could then be instructed to remove all the workspaces not in that list.This would ensure that each slave only retains the workspaces that the Jenkins server might ask it about - workspaces belonging to deleted/renamed builds would be removed, and workspaces belonging to valid builds that were last built on a different slave (and hence if the Jenkins server needed to access the workspace, it'd ask that slave not this one) would also be removed.{quote}I think it's possible to reference environment variables in the 'Custom Workspace' option, and if those are only defined during a build or occasionally change values, this will result in the deletion of legitimate workspaces.Jenkins is a complex system, so any magic here will break things horribly for quite a few users -- see the frequent complaints about the existing WorkspceCleanupThread.What would likely be feasible: If there are workspaces, ask whether they should be deleted as well when the project gets deleted.  If a slave is offline, it's your responsibility to clean up. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2015-10-27 Thread db...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Beck commented on  JENKINS-2111 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 
 

Or one could solve this another way: If the main Jenkins server were to iterate over all the jobs, it could build up a Map> listing, for each slave, what workspaces that slave might be asked about. Each slave could then be instructed to remove all the workspaces not in that list. This would ensure that each slave only retains the workspaces that the Jenkins server might ask it about - workspaces belonging to deleted/renamed builds would be removed, and workspaces belonging to valid builds that were last built on a different slave (and hence if the Jenkins server needed to access the workspace, it'd ask that slave not this one) would also be removed.
 
I think it's possible to reference environment variables in the 'Custom Workspace' option, and if those are only defined during a build or occasionally change values, this will result in the deletion of legitimate workspaces. 
Jenkins is a complex system, so any magic here will break things horribly for quite a few users – see the frequent complaints about the existing WorkspceCleanupThread. 
What would likely be feasible: If there are workspaces, ask whether they should be deleted as well when the project gets deleted. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2015-10-27 Thread pjdar...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 pjdarton commented on  JENKINS-2111 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 
 
I think that it would be very nice if, when a job does not have a custom workspace directory, renaming or deleting the job would rename or delete the workspace too (on ALL slaves). If a job has a custom workspace directory then things get more complicated, and that's where the "Don't delete the workspace if this job is deleted" check-box would be necessary. So, I'd suggest that this "Don't delete the workspace if this job is deleted" flag default to true where there is a custom workspace, and default to false (i.e. "do delete it") where a job just uses the workspace that Jenkins gives it. 
Or one could solve this another way: If the main Jenkins server were to iterate over all the jobs, it could build up a Map> listing, for each slave, what workspaces that slave might be asked about. Each slave could then be instructed to remove all the workspaces not in that list. This would ensure that each slave only retains the workspaces that the Jenkins server might ask it about - workspaces belonging to deleted/renamed builds would be removed, and workspaces belonging to valid builds that were last built on a different slave (and hence if the Jenkins server needed to access the workspace, it'd ask that slave not this one) would also be removed. 
The link Distributed Workspace Clean plugin helps, but only works on valid builds - it doesn't remove data belonging to renamed/deleted builds. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2015-10-27 Thread pjdar...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 pjdarton edited a comment on  JENKINS-2111 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 
 I think that it would be very nice if, when a job does not have a custom workspace directory, renaming or deleting the job would rename or delete the workspace too (on ALL slaves).If a job has a custom workspace directory then things get more complicated, and that's where the "Don't delete the workspace if this job is deleted" check-box would be necessary.So, I'd suggest that this "Don't delete the workspace if this job is deleted" flag default to true where there is a custom workspace, and default to false (i.e. "do delete it") where a job just uses the workspace that Jenkins gives it.Or one could solve this another way:If the main Jenkins server were to iterate over all the jobs, it could build up a Map> listing, for each slave, what workspaces that slave might be asked about.Each slave could then be instructed to remove all the workspaces not in that list.This would ensure that each slave only retains the workspaces that the Jenkins server might ask it about - workspaces belonging to deleted/renamed builds would be removed, and workspaces belonging to valid builds that were last built on a different slave (and hence if the Jenkins server needed to access the workspace, it'd ask that slave not this one) would also be removed.The [ link  Distributed Workspace Clean plugin|https://wiki.jenkins-ci.org/display/JENKINS/Distributed+Workspace+Clean+plugin] helps, but only works on valid builds - it doesn't remove data belonging to renamed/deleted builds. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2015-10-27 Thread nick.volyn...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Nick Volynkin commented on  JENKINS-2111 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 
 
This happens when you rename a job - its workspace is not renamed and not deleted either. The job page shows the size of the old workspace, but after next build the new workspace will be created and the used space will equal to the sum of two workspaces. When the job is deleted or when you wipe out the workspace, only the new workspace gets deleted. 
Just found that my Jenkins (v 1.635) "stashed" 35GB this way. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2015-10-23 Thread laur...@tourreau.fr (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Laurent TOURREAU commented on  JENKINS-2111 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: removing a job does not remove the workspace  
 
 
 
 
 
 
 
 
 
 
Hi this issue is very annoying when dealing with hundred jobs you manage dynamically. In long term, this causes a lot of space disk issues. I agree this not desirable when having a workspace shared with others jobs. In this case it should be the responsibility of the job author to know if the job deletion (along with its workspace) should impact others jobs. To avoid such case I suggest to add a check box "Don't delete the workspace if this job is deleted" in job configuration and find a way to mark a directory not eraseable. 
Concerning the slaves I suggest to check once a the node is reconnected, the list of orphan job workspaces and remove them automaticaly. Is it conceivable? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2014-10-08 Thread dan...@beckweb.net (JIRA)














































Daniel Beck
 commented on  JENKINS-2111


removing a job does not remove the workspace















I agree that this is a bug. When a build gets deleted, so should all the data be deleted.

This may not be possible in the case of distributed builds (nodes may be offline). It may not be desirable in the case of custom workspaces shared with other projects or not meant to be deleted at all (it happens).

I have used Hudson for a long time and now Jenkins, and as far as I remember, the default behaviour always was delete the workspace when deleting jobs. 

Possibly since new installs use a different top level directory for workspaces than for jobs. It used to be jobs/foo/workspace, now it is workspace/foo, like slave FS layout always was. However, for the master node, this is configurable in global config.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-2111) removing a job does not remove the workspace

2014-10-08 Thread o.v.nenas...@gmail.com (JIRA)














































Oleg Nenashev
 updated  JENKINS-2111


removing a job does not remove the workspace
















Change By:


Oleg Nenashev
(08/Oct/14 12:24 PM)




Component/s:


core





Component/s:


other



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.