-
Bug
-
Resolution: Fixed
-
Major
-
None
Hello,
We are experiencing an issue where Jenkins fails builds for no discernible reasons. Apparently, other people came across the same issue.
I quote from 2 relevant posts to jenkinsci-users: link 1, link 2.
We use DSL in a Build Flow project to trigger around 50 parallel builds on 2 slave nodes. However, some of the triggered jobs fail for no apparent reason. The only message in the Jenkins log file is:
Aug 20, 2014 12:38:41 AM hudson.model.Run execute
INFO: <my_triggered_build_name> #9288 main build action completed: FAILURE
We trigger a parallel batch of roughly 30 parametrized MultiJobs. The triggering job and each of the phases of the MultiJob can run on one of 2 slave nodes. This is specified via the "Restrict where this job can run" option.
About 1 in 15 times a phase (mostly the first one) of the MultiJob is silently skipped. Jenkins simply states "Not Built" next to the job phase, that's it - the next phase proceeds even though according to the job setup it should only execute if the previous phase was successful.
This appears to be an issue using the MultiPhase job plugin + "Allow
Concurrent Builds" + "restrict where this job can be run", and is a blocking
issue for myself and my team. Any insight into a fix for this would be
greatly appreciated.
I have not been able to reproduce the problem using a basic build setup but for what it's worth I include the XML for what I used for testing. Below, DEBUG_SkippedBuilds is a BuildFlow job which triggers a MultiPhase job DEBUG_MultiJobProject which in turn runs a shell command and a job called DEBUG_FakeJobPhase.
<?xml version='1.0' encoding='UTF-8'?> <com.cloudbees.plugins.flow.BuildFlow plugin="build-flow-plugin@0.12"> <actions/> <description>Debug.</description> <keepDependencies>false</keepDependencies> <properties> <com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.21"> <autoRebuild>false</autoRebuild> </com.sonyericsson.rebuild.RebuildSettings> </properties> <scm class="hudson.scm.NullSCM"/> <canRoam>true</canRoam> <disabled>false</disabled> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <triggers/> <concurrentBuild>false</concurrentBuild> <builders/> <publishers/> <buildWrappers/> <icon/> <dsl>ignore(FAILURE){ parallel( { build("DEBUG_MultiJobProject", MY_ID: "01") }, { build("DEBUG_MultiJobProject", MY_ID: "02") }, { build("DEBUG_MultiJobProject", MY_ID: "03") }, { build("DEBUG_MultiJobProject", MY_ID: "04") }, { build("DEBUG_MultiJobProject", MY_ID: "05") }, { build("DEBUG_MultiJobProject", MY_ID: "06") }, { build("DEBUG_MultiJobProject", MY_ID: "07") }, { build("DEBUG_MultiJobProject", MY_ID: "08") }, { build("DEBUG_MultiJobProject", MY_ID: "09") }, { build("DEBUG_MultiJobProject", MY_ID: "10") }, { build("DEBUG_MultiJobProject", MY_ID: "11") }, { build("DEBUG_MultiJobProject", MY_ID: "12") }, { build("DEBUG_MultiJobProject", MY_ID: "13") }, { build("DEBUG_MultiJobProject", MY_ID: "14") }, { build("DEBUG_MultiJobProject", MY_ID: "15") }, { build("DEBUG_MultiJobProject", MY_ID: "16") }, { build("DEBUG_MultiJobProject", MY_ID: "17") }, { build("DEBUG_MultiJobProject", MY_ID: "18") }, { build("DEBUG_MultiJobProject", MY_ID: "19") }, { build("DEBUG_MultiJobProject", MY_ID: "20") }, { build("DEBUG_MultiJobProject", MY_ID: "21") }, { build("DEBUG_MultiJobProject", MY_ID: "22") }, { build("DEBUG_MultiJobProject", MY_ID: "23") }, { build("DEBUG_MultiJobProject", MY_ID: "24") }, { build("DEBUG_MultiJobProject", MY_ID: "25") }, { build("DEBUG_MultiJobProject", MY_ID: "26") }, { build("DEBUG_MultiJobProject", MY_ID: "27") }, { build("DEBUG_MultiJobProject", MY_ID: "28") }, { build("DEBUG_MultiJobProject", MY_ID: "29") }, { build("DEBUG_MultiJobProject", MY_ID: "30") }, { build("DEBUG_MultiJobProject", MY_ID: "31") }, { build("DEBUG_MultiJobProject", MY_ID: "32") }, { build("DEBUG_MultiJobProject", MY_ID: "33") }, { build("DEBUG_MultiJobProject", MY_ID: "33") }, { build("DEBUG_MultiJobProject", MY_ID: "34") }, { build("DEBUG_MultiJobProject", MY_ID: "35") }, { build("DEBUG_MultiJobProject", MY_ID: "36") }, { build("DEBUG_MultiJobProject", MY_ID: "37") }, { build("DEBUG_MultiJobProject", MY_ID: "38") }, { build("DEBUG_MultiJobProject", MY_ID: "39") }, { build("DEBUG_MultiJobProject", MY_ID: "40") }, { build("DEBUG_MultiJobProject", MY_ID: "41") }, { build("DEBUG_MultiJobProject", MY_ID: "42") }, { build("DEBUG_MultiJobProject", MY_ID: "43") }, { build("DEBUG_MultiJobProject", MY_ID: "44") }, { build("DEBUG_MultiJobProject", MY_ID: "45") }, { build("DEBUG_MultiJobProject", MY_ID: "46") }, { build("DEBUG_MultiJobProject", MY_ID: "47") }, { build("DEBUG_MultiJobProject", MY_ID: "48") }, { build("DEBUG_MultiJobProject", MY_ID: "49") }, { build("DEBUG_MultiJobProject", MY_ID: "50") }, ) }</dsl> <buildNeedsWorkspace>false</buildNeedsWorkspace> </com.cloudbees.plugins.flow.BuildFlow>
<?xml version='1.0' encoding='UTF-8'?> <com.tikal.jenkins.plugins.multijob.MultiJobProject plugin="jenkins-multijob-plugin@1.13"> <actions/> <description>Debug.</description> <keepDependencies>false</keepDependencies> <properties> <hudson.model.ParametersDefinitionProperty> <parameterDefinitions> <hudson.model.StringParameterDefinition> <name>MY_ID</name> <description></description> <defaultValue></defaultValue> </hudson.model.StringParameterDefinition> </parameterDefinitions> </hudson.model.ParametersDefinitionProperty> <com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.21"> <autoRebuild>false</autoRebuild> </com.sonyericsson.rebuild.RebuildSettings> </properties> <scm class="hudson.scm.NullSCM"/> <canRoam>true</canRoam> <disabled>false</disabled> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <triggers/> <concurrentBuild>true</concurrentBuild> <builders> <hudson.tasks.Shell> <command>echo "Launching step 1 as ${MY_ID} ${BUILD_NUMBER} on ${NODE_NAME}"</command> </hudson.tasks.Shell> <com.tikal.jenkins.plugins.multijob.MultiJobBuilder> <phaseName>Step 2</phaseName> <phaseJobs> <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig> <jobName>DEBUG_FakeJobPhase</jobName> <currParams>true</currParams> <exposedSCM>false</exposedSCM> <disableJob>false</disableJob> <configs class="empty-list"/> <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition> </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig> </phaseJobs> <continuationCondition>SUCCESSFUL</continuationCondition> </com.tikal.jenkins.plugins.multijob.MultiJobBuilder> </builders> <publishers/> <buildWrappers> <org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin="build-name-setter@1.3"> <template>#${BUILD_NUMBER} ${ENV,var="MY_ID"} ${ENV,var="NODE_NAME"}</template> </org.jenkinsci.plugins.buildnamesetter.BuildNameSetter> </buildWrappers> </com.tikal.jenkins.plugins.multijob.MultiJobProject>
<?xml version='1.0' encoding='UTF-8'?> <project> <actions/> <description>Debug.</description> <keepDependencies>false</keepDependencies> <properties> <com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.21"> <autoRebuild>false</autoRebuild> </com.sonyericsson.rebuild.RebuildSettings> </properties> <scm class="hudson.scm.NullSCM"/> <canRoam>true</canRoam> <disabled>false</disabled> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <triggers/> <concurrentBuild>false</concurrentBuild> <builders> <hudson.tasks.Shell> <command>echo "Launching step 2 as ${MY_ID} ${BUILD_NUMBER} on ${NODE_NAME}"</command> </hudson.tasks.Shell> </builders> <publishers/> <buildWrappers> <org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin="build-name-setter@1.3"> <template>#${BUILD_NUMBER} ${ENV,var="MY_ID"} ${ENV,var="NODE_NAME"}</template> </org.jenkinsci.plugins.buildnamesetter.BuildNameSetter> </buildWrappers> </project>