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

Cant delete Jenkins job if the perforce template client has been deleted

    Details

    • Similar Issues:

      Description

      Steps to simulate:

      • Create a dummy Perforce template job (I called mine 'template_test')
        p4 client template_test
      • Create a Jenkins job: (I called mine 'TestJob' – Freestyle project)
        • Source Code Management = Perforce Software
          • Workspace behaviour: Template (view generated from node)
          • Workspace Name Format: Test-${NODE_NAME}-${JOB_NAME}
      • Build newly created job (it should be green since it doesnt do much)
      • Delete the perforce template
        p4 client -d template_test
      • Try and delete the previously created Jenkins Project (i.e. click on 'Delete Project') and it crashes with this error:
        • Jenkins 1.642.4 – Perforce plugin ver 1.4.14
        • Jenkins 2.121.3 – Perforce plugin ver 1.10.6

      Manually deleting all the previous run jobs and then deleting the project works

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          Wrong plugin. Perforce-plugin is deprecated and no longer supported. Please make sure you are filing tickets under the correct plugin (p4-plugin).

          Show
          rpetti Rob Petti added a comment - Wrong plugin. Perforce-plugin is deprecated and no longer supported. Please make sure you are filing tickets under the correct plugin (p4-plugin).
          Hide
          p4karl Karl Wirth added a comment -

          Hi James Bateman - I'll test this and get back to you.

          Show
          p4karl Karl Wirth added a comment - Hi James Bateman - I'll test this and get back to you.
          Hide
          p4karl Karl Wirth added a comment - - edited

          Confirmed. The job is disabled but not deleted. An alternative workaround is to change the source control in the job to 'None' if this is a Freestyle job. Passing to developers.

          Error seen when using Above Reproduction Steps:

          A problem occurred while processing the request.
                  Please check our bug tracker to see if a similar problem has already been reported.
                  If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem.
                  If you think this is a new issue, please file a new issue.
                  When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins.
                  The users list might be also useful in understanding what has happened.Stack traceAlso:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to KarlsDesktop
          		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
          		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
          		at hudson.remoting.Channel.call(Channel.java:957)
          		at hudson.FilePath.act(FilePath.java:1070)
          		at hudson.FilePath.act(FilePath.java:1059)
          		at org.jenkinsci.plugins.p4.PerforceScm.processWorkspaceBeforeDeletion(PerforceScm.java:830)
          		at hudson.scm.SCM.processWorkspaceBeforeDeletion(SCM.java:245)
          		at hudson.model.AbstractProject.performDelete(AbstractProject.java:358)
          		at hudson.model.AbstractItem.delete(AbstractItem.java:775)
          		at hudson.model.Job.delete(Job.java:675)
          		at hudson.model.AbstractItem.doDoDelete(AbstractItem.java:645)
          		at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
          		at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
          		at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
          		at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
          		at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
          		at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
          		at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
          		at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
          		at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          		at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
          		at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
          		at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:280)
          		at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          		at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
          		at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
          		at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
          		at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
          		at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
          		at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
          		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623)
          		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
          		at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:243)
          		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          		at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
          		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          		at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
          		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          		at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)
          		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          		at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
          		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          		at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:64)
          		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
          		at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
          		at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
          		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          		at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
          		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          		at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
          		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          		at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
          		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          		at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
          		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
          		at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
          		at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          		at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
          		at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1701)
          		at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
          		at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
          		at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
          		at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
          		at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1668)
          		at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
          		at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
          		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
          		at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          		at org.eclipse.jetty.server.Server.handle(Server.java:502)
          		at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
          		at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
          		at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
          		at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
          		at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
          		at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
          		at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
          		at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
          		at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
          		at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
          		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
          		at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
          		at java.lang.Thread.run(Thread.java:748)
          hudson.AbortException: P4: Task Exception: P4: Undefined workspace: jenkins-KarlsDesktop-00559329-Client_Template_Job-0
          	at org.jenkinsci.plugins.p4.tasks.AbstractTask.tryTask(AbstractTask.java:189)
          	at org.jenkinsci.plugins.p4.tasks.RemoveClientTask.invoke(RemoveClientTask.java:106)
          	at org.jenkinsci.plugins.p4.tasks.RemoveClientTask.invoke(RemoveClientTask.java:25)
          	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
          	at hudson.remoting.Request$2.run(Request.java:369)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          	at java.lang.Thread.run(Thread.java:834)
          
          
          Show
          p4karl Karl Wirth added a comment - - edited Confirmed. The job is disabled but not deleted. An alternative workaround is to change the source control in the job to 'None' if this is a Freestyle job. Passing to developers. Error seen when using Above Reproduction Steps : A problem occurred while processing the request. Please check our bug tracker to see if a similar problem has already been reported. If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem. If you think this is a new issue, please file a new issue. When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins. The users list might be also useful in understanding what has happened.Stack traceAlso: hudson.remoting.Channel$CallSiteStackTrace: Remote call to KarlsDesktop at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:957) at hudson.FilePath.act(FilePath.java:1070) at hudson.FilePath.act(FilePath.java:1059) at org.jenkinsci.plugins.p4.PerforceScm.processWorkspaceBeforeDeletion(PerforceScm.java:830) at hudson.scm.SCM.processWorkspaceBeforeDeletion(SCM.java:245) at hudson.model.AbstractProject.performDelete(AbstractProject.java:358) at hudson.model.AbstractItem.delete(AbstractItem.java:775) at hudson.model.Job.delete(Job.java:675) at hudson.model.AbstractItem.doDoDelete(AbstractItem.java:645) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145) at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:280) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:243) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1701) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1668) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:502) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) at java.lang. Thread .run( Thread .java:748) hudson.AbortException: P4: Task Exception: P4: Undefined workspace: jenkins-KarlsDesktop-00559329-Client_Template_Job-0 at org.jenkinsci.plugins.p4.tasks.AbstractTask.tryTask(AbstractTask.java:189) at org.jenkinsci.plugins.p4.tasks.RemoveClientTask.invoke(RemoveClientTask.java:106) at org.jenkinsci.plugins.p4.tasks.RemoveClientTask.invoke(RemoveClientTask.java:25) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.lang. Thread .run( Thread .java:834)
          Hide
          cbopardikar Charusheela Bopardikar added a comment -

          Fixed. It will now delete the job whether or not the template exists.

          Show
          cbopardikar Charusheela Bopardikar added a comment - Fixed. It will now delete the job whether or not the template exists.
          Hide
          cbopardikar Charusheela Bopardikar added a comment -

          Released in 1.10.9

          Show
          cbopardikar Charusheela Bopardikar added a comment - Released in 1.10.9

            People

            • Assignee:
              cbopardikar Charusheela Bopardikar
              Reporter:
              jbateman James Bateman
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: