[opensuse-buildservice] osc rdelete leftovers files
Hi, 'osc rdelete project -r -f' do not delete everything but, rather, copy some stuff to the "_deleted" project directory and keep bazillions of files related to that project under: * ./trees/ * ./repos/.../.../... * /repos_sync/ We run obs-server-2.3.7-3.5 ( appliance ) and osc-0.134.1-2.4.1. Questions: - obs bug ? osc bug ? Known bug ? If so, is it fixed ? - Didn't find any documentation on "_deleted" projects, A pointer would appreciated. I didn't find anything on the webui or "bs_admin" to manage that. I only found "os ls -D" which does not help much. Meanwhile , I am quite tempted to: find /srv/obs | grep "deleted project" | xargs -n1 rm -rf Any advise against this "Big Hammer" ? Thanks in advance. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 7/27/2013 at 01:46 AM, Michel Bourget <michel@sgi.com> wrote: Hi,
'osc rdelete project -r -f' do not delete everything but, rather, copy some stuff to the "_deleted" project directory and keep bazillions of files related to that project under:
* ./trees/ * ./repos/.../.../... * /repos_sync/
We run obs-server-2.3.7-3.5 ( appliance ) and osc-0.134.1-2.4.1.
Questions: - obs bug ? osc bug ? Known bug ? If so, is it fixed ?
Not a bug, it's a feature. OBS allows you to "undelete" a file, package or even a project. Refer to "osc undelete --help" for more information.
- Didn't find any documentation on "_deleted" projects, A pointer would appreciated. I didn't find anything on the webui or "bs_admin" to manage that. I only found "os ls -D" which does not help much.
Meanwhile , I am quite tempted to:
find /srv/obs | grep "deleted project" | xargs -n1 rm -rf
Any advise against this "Big Hammer" ?
Well, I'm not an expert, I'm just another guy who runs a local OBS instance like you. So, I'll let someone else take that question. But I agree, it would be great if there was a way to permanently "delete and purge" a project, package or file - especially, along with their corresponding sources. :) At least, in git master, there's an option to delete sources older than 'x' days, but nothing for 2.3 or 2.4, AFAICS. HTH, Srinidhi. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Fri, Jul 26, 2013 at 04:16:13PM -0400, Michel Bourget wrote:
'osc rdelete project -r -f' do not delete everything but, rather, copy some stuff to the "_deleted" project directory and keep bazillions of files related to that project under:
* ./trees/ * ./repos/.../.../... * /repos_sync/
The publisher should eventually delete the ./repos and ./repos_sync stuff. The sources of the packages in the project are kept because you can undelete projects. (Keeping all sources is kind of an obs feature, we promise that you can at any time get the sources for packages that were built with obs. You can use 'rpm -q --qf '%{DISTURL'}\n' <rpm>' to query a built package for a reference to its sources.) Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 07/29/2013 05:17 AM, Michael Schroeder wrote:
On Fri, Jul 26, 2013 at 04:16:13PM -0400, Michel Bourget wrote:
'osc rdelete project -r -f' do not delete everything but, rather, copy some stuff to the "_deleted" project directory and keep bazillions of files related to that project under:
* ./trees/ * ./repos/.../.../... * /repos_sync/ The publisher should eventually delete the ./repos and ./repos_sync stuff.
Interesting ... Didn't notice. Likely, I didn't dig/research it enough.
The sources of the packages in the project are kept because you can undelete projects.
(Keeping all sources is kind of an obs feature, we promise that you can at any time get the sources for packages that were built with obs. You can use 'rpm -q --qf '%{DISTURL'}\n'<rpm>' to query a built package for a reference to its sources.)
Hi Michael, thanks for feedback. The real I have is about an asymmetric semantic, ie: - non-admin user can create "home:user:blah" project. - but can't wipe it, ie. only admin can do it. Imo, a user should be able to "wipe" a project he/she created. "osc rwipe" ? Here's the scenario I went thru: -1. osc meta {prj,prjconf} home:user:blah -2. osc add a couple of packages ... -3. something goes really wrong. Hey, let's restart -4. osc rdelete -f -r home:user:blah -5. re-do step 1 and 2 but better and/or with fixes. -6. re-do step 2 in same manner. Here is where it goes wrong. In step 6, new _pkg and _service files were checked/committed. OBS then states "nothing to do" somehow. Guess what , the buildlog ( and service logs details ) were restored back to what they were, even showing impossible errors because some fixes were applied to a (new, btw ) /usr/lib/obs/service/script. Doing an "osc service remoterun" fixes that ... but, needless to say, it wasn't obvious. At any rate, being able to "osc rwipe" would be a "Very Nice to have(Tm)" :) For the sake of our operations, I wrote a little script to accomplish this on the OBS server as "Admin". Script attached. Thanks !
Cheers, Michael.
On Mon, Jul 29, 2013 at 03:16:59PM -0400, Michel Bourget wrote:
The real I have is about an asymmetric semantic, ie: - non-admin user can create "home:user:blah" project. - but can't wipe it, ie. only admin can do it.
Imo, a user should be able to "wipe" a project he/she created. "osc rwipe" ?
Here's the scenario I went thru: -1. osc meta {prj,prjconf} home:user:blah -2. osc add a couple of packages ... -3. something goes really wrong. Hey, let's restart -4. osc rdelete -f -r home:user:blah -5. re-do step 1 and 2 but better and/or with fixes. -6. re-do step 2 in same manner.
Here is where it goes wrong. In step 6, new _pkg and _service files were checked/committed. OBS then states "nothing to do" somehow. Guess what , the buildlog ( and service logs details ) were restored back to what they were, even showing impossible errors because some fixes were applied to a (new, btw ) /usr/lib/obs/service/script.
That should not be the case, all the build results should be gone. We once had a bug in the scheduler code that made it ignore project/repository delete events, but that is AFAIK fixed. (I don't think the 2.3 branch had this bug, though. Are you sure you run 2.3? If yes, why don't you upgrade to 2.4? 2.3 is really old...) Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Michael Schroeder
-
Michel Bourget
-
Srinidhi B