Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove agent-to-controller FilePath calls (JENKINS-67298) #76

Closed
darxriggs opened this issue Aug 20, 2022 · 2 comments · Fixed by #251
Closed

Remove agent-to-controller FilePath calls (JENKINS-67298) #76

darxriggs opened this issue Aug 20, 2022 · 2 comments · Fixed by #251

Comments

@darxriggs
Copy link
Contributor

darxriggs commented Aug 20, 2022

According to JEP-235 and JENKINS-67298 the use of FilePath in the plugin should be updated. For more details see the JEP.

@repolevedavaj
Copy link
Contributor

I think the main issue is caching without compression (see jenkins.plugins.jobcacher.arbitrary.SimpleArbitraryFileCacheStrategy).
I don't have an issue removing support to cache without compression, but I need to check first, how the migration should be done.

@thopiekar
Copy link

I'm running into this issue already with NONE as compression method:

14:52:25  [Cache for cache with id 0fea6a13c52b4d4725368f24b045ca84] Creating cache...
14:52:25  [Cache for cache with id 0fea6a13c52b4d4725368f24b045ca84] Failed to create cache
14:52:25  java.io.IOException: Failed to deserialize response to UserRequest:hudson.FilePath$Exists@240752ad: java.lang.SecurityException: Sending hudson.FilePath$Exists from agent to controller is prohibited.
14:52:25  See https://www.jenkins.io/redirect/security-144 for more details
14:52:25  	at hudson.remoting.Channel.call(Channel.java:1006)
14:52:25  	at hudson.FilePath.act(FilePath.java:1186)
14:52:25  	at hudson.FilePath.act(FilePath.java:1175)
14:52:25  	at hudson.FilePath.exists(FilePath.java:1740)
14:52:25  	at jenkins.plugins.itemstorage.local.LocalObjectPath$IsNotThereOrOlderVisitor.visit(LocalObjectPath.java:144)
14:52:25  	at hudson.util.DirScanner.scanSingle(DirScanner.java:51)
14:52:25  	at hudson.util.DirScanner$Glob.scan(DirScanner.java:146)
14:52:25  	at jenkins.plugins.itemstorage.local.LocalObjectPath$IsModifiedGlob.scan(LocalObjectPath.java:119)
14:52:25  	at hudson.FilePath.writeToTar(FilePath.java:2943)
14:52:25  	at hudson.FilePath$CopyRecursiveRemoteToLocal.invoke(FilePath.java:2908)
14:52:25  	at hudson.FilePath$CopyRecursiveRemoteToLocal.invoke(FilePath.java:2893)
14:52:25  	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
14:52:25  	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
14:52:25  	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
14:52:25  	at hudson.remoting.Request$2.run(Request.java:377)
14:52:25  	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
14:52:25  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
14:52:25  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
14:52:25  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
14:52:25  	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:125)
14:52:25  	at java.base/java.lang.Thread.run(Thread.java:829)
14:52:25  	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 172.17.0.1/172.17.0.1:46984
14:52:25  		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
14:52:25  		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
14:52:25  		at hudson.remoting.Channel$2.adapt(Channel.java:1034)
14:52:25  		at hudson.remoting.Channel$2.adapt(Channel.java:1030)
14:52:25  		at hudson.remoting.FutureAdapter.get(FutureAdapter.java:61)
14:52:25  		at hudson.FilePath.copyRecursiveTo(FilePath.java:2757)
14:52:25  		at hudson.FilePath.copyRecursiveTo(FilePath.java:2706)
14:52:25  		at jenkins.plugins.itemstorage.local.LocalObjectPath.copyRecursiveFrom(LocalObjectPath.java:81)
14:52:25  		at jenkins.plugins.jobcacher.arbitrary.SimpleArbitraryFileCacheStrategy.cache(SimpleArbitraryFileCacheStrategy.java:17)
14:52:25  		at jenkins.plugins.jobcacher.ArbitraryFileCache$SaverImpl.save(ArbitraryFileCache.java:375)
14:52:25  		at jenkins.plugins.jobcacher.CacheManager.save(CacheManager.java:96)
14:52:25  		at jenkins.plugins.jobcacher.pipeline.CacheStepExecution$ExecutionCallback.complete(CacheStepExecution.java:93)
14:52:25  		at jenkins.plugins.jobcacher.pipeline.CacheStepExecution$ExecutionCallback.onSuccess(CacheStepExecution.java:74)
14:52:25  		at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:371)
14:52:25  		at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:70)
14:52:25  		at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:149)
14:52:25  		at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:146)
14:52:25  		at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
14:52:25  		at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
14:52:25  		at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
14:52:25  		at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
14:52:25  		at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
14:52:25  		at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
14:52:25  		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
14:52:25  		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
14:52:25  		at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
14:52:25  		at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
14:52:25  		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
14:52:25  		at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
14:52:25  		at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
14:52:25  		at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
14:52:25  		at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
14:52:25  		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
14:52:25  		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
14:52:25  		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
14:52:25  		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
14:52:25  		at java.base/java.lang.Thread.run(Thread.java:829)
14:52:25  Caused by: java.lang.SecurityException: Sending hudson.FilePath$Exists from agent to controller is prohibited.
14:52:25  See https://www.jenkins.io/redirect/security-144 for more details
14:52:25  	at jenkins.security.s2m.CallableDirectionChecker.check(CallableDirectionChecker.java:55)
14:52:25  	at org.jenkinsci.remoting.RoleChecker.check(RoleChecker.java:39)
14:52:25  	at hudson.remoting.RequiredRoleCheckerWrapper.check(RequiredRoleCheckerWrapper.java:54)
14:52:25  	at jenkins.MasterToSlaveFileCallable.checkRoles(MasterToSlaveFileCallable.java:22)
14:52:25  	at hudson.FilePath$FileCallableWrapper.checkRoles(FilePath.java:3503)
14:52:25  	at hudson.remoting.ChannelBuilder$2.userRequest(ChannelBuilder.java:331)
14:52:25  	at hudson.remoting.CallableDecoratorList.wrapUserRequest(CallableDecoratorList.java:26)
14:52:25  	at hudson.remoting.UserRequest.perform(UserRequest.java:205)
14:52:25  	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
14:52:25  	at hudson.remoting.Request$2.run(Request.java:377)
14:52:25  	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
14:52:25  	at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
14:52:25  	at hudson.remoting.CallableDecoratorList.lambda$applyDecorator$0(CallableDecoratorList.java:19)
14:52:25  	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
14:52:25  	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
14:52:25  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
14:52:25  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
14:52:25  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
14:52:25  	at java.base/java.lang.Thread.run(Thread.java:829)
14:52:25  	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection to jks.thopiekar.eu/192.168.91.1:50000
14:52:25  		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
14:52:25  		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
14:52:25  		at hudson.remoting.Channel.call(Channel.java:1000)
14:52:25  		at hudson.FilePath.act(FilePath.java:1186)
14:52:25  		at hudson.FilePath.act(FilePath.java:1175)
14:52:25  		at hudson.FilePath.exists(FilePath.java:1740)
14:52:25  		at jenkins.plugins.itemstorage.local.LocalObjectPath$IsNotThereOrOlderVisitor.visit(LocalObjectPath.java:144)
14:52:25  		at hudson.util.DirScanner.scanSingle(DirScanner.java:51)
14:52:25  		at hudson.util.DirScanner$Glob.scan(DirScanner.java:146)
14:52:25  		at jenkins.plugins.itemstorage.local.LocalObjectPath$IsModifiedGlob.scan(LocalObjectPath.java:119)
14:52:25  		at hudson.FilePath.writeToTar(FilePath.java:2943)
14:52:25  		at hudson.FilePath$CopyRecursiveRemoteToLocal.invoke(FilePath.java:2908)
14:52:25  		at hudson.FilePath$CopyRecursiveRemoteToLocal.invoke(FilePath.java:2893)
14:52:25  		at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
14:52:25  		at hudson.remoting.UserRequest.perform(UserRequest.java:211)
14:52:25  		at hudson.remoting.UserRequest.perform(UserRequest.java:54)
14:52:25  		at hudson.remoting.Request$2.run(Request.java:377)
14:52:25  		at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
14:52:25  		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
14:52:25  		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
14:52:25  		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
14:52:25  		at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:125)
14:52:25  		at java.base/java.lang.Thread.run(Thread.java:829)
14:52:25  [Pipeline] // cache
14:52:26  [Pipeline] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants