Move Copy Promote process fails for Multibranch Pipeline jobs

Issue

  • Move/Copy/Promote fails for Multibranch Pipeline jobs when copying between different masters.
  • Moving a newly created Multibranch Pipeline job fails.
  • Move/Copy/Promote process for Multibranch Pipeline jobs fail throwing:
ERROR: Caught an exception
hudson.os.PosixException: Unable to get file permissions null
at hudson.util.IOUtils.mode(IOUtils.java:133)
at com.cloudbees.opscenter.replication.CustomTarArchiver.visit(CustomTarArchiver.java:75)
at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:3122)
at com.cloudbees.opscenter.dumbwaiter.Compression.tarGz(Compression.java:73)
at com.cloudbees.opscenter.replication.ComputedFolderReplicationFileSet.createArchive(ComputedFolderReplicationFileSet.java:104)
at com.cloudbees.opscenter.replication.ItemReplicationFileSet.createItemReplicationArchive(ItemReplicationFileSet.java:210)
at com.cloudbees.opscenter.replication.FolderReplicationFileSet.processChild(FolderReplicationFileSet.java:86)
at com.cloudbees.opscenter.replication.FolderReplicationFileSet.createArchive(FolderReplicationFileSet.java:72)
at com.cloudbees.opscenter.replication.ItemReplicationFileSet.createItemReplicationArchive(ItemReplicationFileSet.java:184)
at com.cloudbees.opscenter.replication.stages.SendFiles.apply(SendFiles.java:114)
at com.cloudbees.opscenter.replication.ItemReplicationTask.runStages(ItemReplicationTask.java:529)
at com.cloudbees.opscenter.replication.ItemReplicationTask._perform(ItemReplicationTask.java:475)
at com.cloudbees.opscenter.replication.ItemReplicationRecord.perform(ItemReplicationRecord.java:195)
at com.cloudbees.opscenter.replication.ItemReplicationRecord.run(ItemReplicationRecord.java:167)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
  • Checking Move/Copy/Promote history (Manage Jenkins > Move/Copy/Promote History) I can see the following stacktrace reported:
ERROR: Caught an exception
hudson.os.PosixException: native error calling stat: No such file or directory $JENKINS_HOME/jobs/multibranch-pipeline/indexing/indexing.log ENOENT
	at hudson.os.PosixAPI$1.error(PosixAPI.java:36)
	at jnr.posix.BaseNativePOSIX.stat(BaseNativePOSIX.java:309)
	at jnr.posix.CheckedPOSIX.stat(CheckedPOSIX.java:265)
	at jnr.posix.LazyPOSIX.stat(LazyPOSIX.java:267)
	at hudson.util.IOUtils.mode(IOUtils.java:128)
	at com.cloudbees.opscenter.replication.CustomTarArchiver.visit(CustomTarArchiver.java:76)
	at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
	at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2845)
	at com.cloudbees.opscenter.dumbwaiter.Compression.tarGz(Compression.java:74)
	at com.cloudbees.opscenter.replication.ComputedFolderReplicationFileSet.createArchive(ComputedFolderReplicationFileSet.java:107)
	at com.cloudbees.opscenter.replication.ItemReplicationFileSet.createItemReplicationArchive(ItemReplicationFileSet.java:140)
	at com.cloudbees.opscenter.replication.stages.SendFiles.apply(SendFiles.java:107)
	at com.cloudbees.opscenter.replication.ItemReplicationTask.runStages(ItemReplicationTask.java:515)
	at com.cloudbees.opscenter.replication.ItemReplicationTask._perform(ItemReplicationTask.java:473)
	at com.cloudbees.opscenter.replication.ItemReplicationRecord.perform(ItemReplicationRecord.java:191)
	at com.cloudbees.opscenter.replication.ItemReplicationRecord.run(ItemReplicationRecord.java:163)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)

Environment

Explanation

This is a known issue (filed as CTR-167 in our internal Jira) where the copy operation is trying to copy a file that does not exist. Specifically, it is indexing/indexing.log which corresponds to a “Scan Multibranch Pipeline Log” on the UI. The mentioned log is not there because there are no Branch Sources in your Multibranch Pipeline, therefore no scans are done.

Resolution

Upgrade to release 2.222.1.1 or newer which include Operations Center Context plugin 2.222.0.3 that delivered the fix for this issue.

Workaround

You have two options:

  • If the Multibranch Pipeline job is new, emtpy and unused, you can delete it to get rid of this error.
  • If you prefer to not delete it, you can just configure the Multibranch Pipeline job to add a Branch Source. After doing this, the Move/Copy/Promote process should work again:

Tested product/plugin versions

  • CloudBees Jenkins Platform - Client Master 2.164.3.2
  • Pipeline: Multibranch 2.20
  • Operations Center Context 2.150.2.8

References

Have more questions?

0 Comments

Please sign in to leave a comment.