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

Promoted Builds Plugin - promotions are run on the slave(s) causing them to fail

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: promoted-builds-plugin
    • Labels:
      None

      Description

      I'm seeing the following problem with the latest version (i.e. 1.5) of the promoted builds plugin.
      Even though i tie a job on which promotions are defined to the master, Hudson is trying to execute some of the promotions on the slave(s) resulting in the following error.

      Started by user <abc>
      Building remotely on lnx-slave-1
      FATAL: Failed to mkdirs: /opt/hudson/conf/jobs/<job-name>/workspace
      java.io.IOException: Failed to mkdirs: /opt/hudson/conf/jobs/<job-name>/workspace
      at hudson.FilePath.mkdirs(FilePath.java:739)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:977)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:421)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:370)
      at hudson.model.Run.run(Run.java:1120)
      at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:74)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:123)

      Error seen in the hudson UI for a promotion failing due to above error is "promotion didn't happen.......re-execute the promotion"

      For now, "Andrew bayer" suggested the following workaround and it works nicely.

      a.) goto "/opt/hudson/conf/jobs/<job-name>/promotions/<promotion-name>
      b.) Open the "config.xml" and add the following 2 lines

      <assignedNode>master</assignedNode>
      <canRoam>false</canRoam>

      c.) Once you add these lines, goto "Hudson->Manage Hudson" and click on "Reload configuration from the disk".
      d.) Re-execute the promotion and it will work now.

        Issue Links

          Activity

          Hide
          abayer abayer added a comment -

          Moving to promoted-builds component.

          Show
          abayer abayer added a comment - Moving to promoted-builds component.
          Hide
          mindless Alan Harder added a comment -

          This looks similar to JENKINS-4635.
          Can you retest with promoted builds 1.6 and let us know if you still see a problem?

          Show
          mindless Alan Harder added a comment - This looks similar to JENKINS-4635 . Can you retest with promoted builds 1.6 and let us know if you still see a problem?
          Hide
          javadude Carl Quinn added a comment -

          I have tried this with plugin version 1.6 on Hudson 1.337 and I still see the failure. The promotion runs on one of the nodes in the group that the project is tied to, but not the one on which the build was run. And hence it fails to due to the workspace missing.

          Show
          javadude Carl Quinn added a comment - I have tried this with plugin version 1.6 on Hudson 1.337 and I still see the failure. The promotion runs on one of the nodes in the group that the project is tied to, but not the one on which the build was run. And hence it fails to due to the workspace missing.
          Hide
          mindless Alan Harder added a comment -

          ok, that makes sense.. need to tie to the exact node for that build when the job itself could run on several different nodes.

          Show
          mindless Alan Harder added a comment - ok, that makes sense.. need to tie to the exact node for that build when the job itself could run on several different nodes.

            People

            • Assignee:
              Unassigned
              Reporter:
              amarkanth1984 amarkanth1984
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: