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

On-Prem: Jenkins in K8S with workers in K8S File System Exception with file type credentials

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Raspberry PI 4 8gb
      Ubuntu 21.04 armhf
      Jenkins 2.276
      GCP Secreet Manager plugin 0.2.6
      Kubernetes Plugin 1.28.7

      I am running jobs usin DSL pipeline.

      The job uses a file type credential in it's config:

      withCredentials([file(credentialsId: 'jenkins-test-project', variable: 'GOOGLE_APPLICATION_CREDENTIALS')])
      

      The job fails with:

      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to terratest-ss060
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800)
      		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      		at hudson.remoting.Channel.call(Channel.java:1001)
      		at hudson.FilePath.act(FilePath.java:1158)
      		at hudson.FilePath.act(FilePath.java:1147)
      		at hudson.FilePath.write(FilePath.java:2311)
      		at hudson.FilePath.copyFrom(FilePath.java:1072)
      		at org.jenkinsci.plugins.credentialsbinding.impl.FileBinding.write(FileBinding.java:54)
      		at org.jenkinsci.plugins.credentialsbinding.impl.FileBinding.write(FileBinding.java:42)
      		at org.jenkinsci.plugins.credentialsbinding.impl.AbstractOnDiskBinding.bindSingle(AbstractOnDiskBinding.java:39)
      		at org.jenkinsci.plugins.credentialsbinding.Binding.bind(Binding.java:150)
      		at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Execution2.doStart(BindingStep.java:135)
      		at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
      		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      java.nio.file.FileSystemException: /home/jenkins/agent/workspace/terratest/terratest-service-account@tmp/secretFiles/b966c0d5-011a-4121-bfa7-38ca17a568e9: Is a directory
      	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
      	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
      	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
      	at java.nio.file.Files.newOutputStream(Files.java:216)
      	at hudson.FilePath$WritePipe.invoke(FilePath.java:2319)
      	at hudson.FilePath$WritePipe.invoke(FilePath.java:2313)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3314)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:376)
      	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:119)
      	at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE
      

            mdaugherty6 Michael Daugherty
            cockers_97 Andrew Cockerill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: