My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2999: delete-project does not properly delete Git repositories
9 people starred this issue and may be notified of changes. Back to list
Status:  Submitted
Owner:  ----
Closed:  Feb 2015


Sign in to add a comment
 
Reported by sschuberth, Oct 31, 2014
Affected Version: Gerrit 2.9(.1), delete-project plugin built from sources for that version(s)

What steps will reproduce the problem?

1. Try to delete a non-empty project (with pending changes) from the web UI or command line.
2. In case of web UI, check "Delete project even if open changes exist" and uncheck "Preserve GIT Repository". After pressing "Delete", error 500 "Project not found" is show (this probably is  issue #2955  /  issue #2956 ). In case of command line, use "ssh -p 29418 localhost deleteproject delete --yes-really-delete --force PROJECT".
3. Verify that the Git repository has been properly deleted.

What is the expected output? What do you see instead?

I'd expect the Git repository to be fully deleted, but in fact only the "refs" path is deleted. This is true for both web UI and command line deletion.

Please provide any additional information below.

The log has:

ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in POST /projects/testgreg/deleteproject~delete
java.io.IOException: Error trying to delete /gerrit/gerrit01/git/testgreg.git
    at com.googlesource.gerrit.plugins.deleteproject.fs.FilesystemDeleteHandler.deleteGitRepository(FilesystemDeleteHandler.java:74)
    at com.googlesource.gerrit.plugins.deleteproject.fs.FilesystemDeleteHandler.delete(FilesystemDeleteHandler.java:64)
    at com.googlesource.gerrit.plugins.deleteproject.DeleteProject.apply(DeleteProject.java:110)
    at com.googlesource.gerrit.plugins.deleteproject.DeleteAction.apply(DeleteAction.java:30)
    at com.googlesource.gerrit.plugins.deleteproject.DeleteProject.apply(DeleteProject.java:48)
    at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:303)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:278)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:268)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:180)
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
    at com.google.gerrit.pgm.http.jetty.GetUserFilter.doFilter(GetUserFilter.java:76)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:70)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:113)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.gerrit.httpd.RequireSslFilter.doFilter(RequireSslFilter.java:68)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:64)
    at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:57)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:132)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:129)
    at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:206)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:129)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1539)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:219)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:92)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:459)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:280)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229)
    at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
    at java.lang.Thread.run(Thread.java:745)

Feb 17, 2015
Project Member #1 edwin.ke...@gmail.com
Can you please check if this is fixed by [1,2]?

[1] https://gerrit-review.googlesource.com/64283
[2] https://gerrit-review.googlesource.com/64284
Status: AwaitingInformation
Feb 17, 2015
#2 sschuberth
Unfortunately, I cannot reproduce the original issue anymore right now, so I would be unable to tell whether the new version of the plugin fixes anything. However, I was able to verify with our admins that we indeed host the repos on NFS, so the fix in [1] sounds very reasonable. I'd be fine with closing this. I'll reopen / file a new issue if I ever see this again with the delete-project plugin 2.10 or above.

Thanks!

[1] https://gerrit-review.googlesource.com/#/c/64283/
Feb 17, 2015
Project Member #3 edwin.ke...@gmail.com
(No comment was entered for this change.)
Status: Submitted
Sign in to add a comment

Powered by Google Project Hosting