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

Master Executor Needed for SCM polling even with slaves

    XMLWordPrintable

Details

    Description

      At work, in my configuration, the master only do balancing stuff. The master as no executor, but many slaves do the builds.

      When the plugin do a scm-polling, if no executor was set to the master (0 executor) the plugin does not append path to cleartool command. In my configuration, it fail because cleartool is not in the PATH. (i have not the rights to define env variable in the system)

      If i set an executor on the master, the path set in the clearcase installation field is taken. (even if the job is forced to run on a slave)

      Even if i try to manualy set clearcase path on slaves, in clearcase installation field, or in PATH variable, it does not work.

      Here the trace when an executor is setted :

      Started on Jun 28, 2012 4:37:12 PM
      [im_test_ass_build] $ /produits/clearcase/opt_ibm/RationalSDLC/clearcase/bin/cleartool desc -fmt %[found_bls]Xp\n stream:IM_Ass@/vobs/pvob_ati
      baseline:intg-metier_INITIAL@/vobs/pvob_ati
      [im_test_ass_build] $ /produits/clearcase/opt_ibm/RationalSDLC/clearcase/bin/cleartool desc -fmt %[component]Xp\n baseline:intg-metier_INITIAL@/vobs/pvob_ati
      component:intg-metier@/vobs/pvob_ati
      [jenkins_im_test-ass_dyn] $ /produits/clearcase/opt_ibm/RationalSDLC/clearcase/bin/cleartool pwv -root
      /view/jenkins_im_test-ass_dyn
      [im_test_ass_build] $ /produits/clearcase/opt_ibm/RationalSDLC/clearcase/bin/cleartool lsview jenkins_im_test-ass_dyn

      • jenkins_im_test-ass_dyn /Clearcase/views/siciceda/jenkins_im_test-ass_dyn.vws
        [im_test_ass_build] $ /produits/clearcase/opt_ibm/RationalSDLC/clearcase/bin/cleartool startview jenkins_im_test-ass_dyn
        [jenkins_im_test-ass_dyn] $ /produits/clearcase/opt_ibm/RationalSDLC/clearcase/bin/cleartool lshistory -all -since 28-jun-12.14:12:10utc+0000 -fmt '\"%Nd\" \"%u\" \"%En\" \"%Vn\" \"%e\" \"%o\" \"%[activity]Xp\" \n%c\n' -branch brtype:IM_Ass -nco vobs/vob_ati/intg-metier
        [im_test_ass_build] $ /produits/clearcase/opt_ibm/RationalSDLC/clearcase/bin/cleartool desc -fmt %[found_bls]Xp\n stream:IM_Ass@/vobs/pvob_ati
        baseline:intg-metier_INITIAL@/vobs/pvob_ati
        [im_test_ass_build] $ /produits/clearcase/opt_ibm/RationalSDLC/clearcase/bin/cleartool desc -fmt %[component]Xp\n baseline:intg-metier_INITIAL@/vobs/pvob_ati
        component:intg-metier@/vobs/pvob_ati
        Done. Took 2.2 sec
        No changes

      Here a trace when no master executor is set :

      Started on Jun 28, 2012 4:39:12 PM
      [im_test_ass_build] $ cleartool desc -fmt %[found_bls]Xp\n stream:IM_Ass@/vobs/pvob_ati
      FATAL: Cannot run program "cleartool" (in directory "/applis/iced/jenkins/shared/slave0001/workspace/im_test_ass_build"): java.io.IOException: error=2, No such file or directory
      java.io.IOException: Cannot run program "cleartool" (in directory "/applis/iced/jenkins/shared/slave0001/workspace/im_test_ass_build"): java.io.IOException: error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
      at hudson.Proc$LocalProc.<init>(Proc.java:244)
      at hudson.Proc$LocalProc.<init>(Proc.java:216)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
      at hudson.Launcher$ProcStarter.start(Launcher.java:338)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:287)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
      at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
      at java.lang.ProcessImpl.start(ProcessImpl.java:65)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
      ... 15 more
      Done. Took 0.13 sec
      No changes

      Attachments

        Issue Links

          Activity

            I have a similar setup (no executors on the master node) and am not seeing this problem.

            jbentley Jordan Bentley added a comment - I have a similar setup (no executors on the master node) and am not seeing this problem.

            If i define a system environment variable PATH with cleartool the problem is resolved. Tested on a test platform.
            But on my production network, i have no rights. I can't extend PATH and i face this problem.

            hicwic Steve Eckerlein added a comment - If i define a system environment variable PATH with cleartool the problem is resolved. Tested on a test platform. But on my production network, i have no rights. I can't extend PATH and i face this problem.

            in hudson.plugins.clearcase.ClearCaseSCM.ClearCaseScmDescriptor#getCleartoolExe

            Computer.currentComputer() returns null when invoked from createRevisionState and master have no executor set

            ndeloof Nicolas De Loof added a comment - in hudson.plugins.clearcase.ClearCaseSCM.ClearCaseScmDescriptor#getCleartoolExe Computer.currentComputer() returns null when invoked from createRevisionState and master have no executor set

            Code changed in jenkins
            User: Nicolas De Loof
            Path:
            src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java
            src/main/java/hudson/plugins/clearcase/ClearCaseUcmSCM.java
            http://jenkins-ci.org/commit/clearcase-plugin/bfee5ed189d86ed5d03b3f196b4a5a8dd8a41f01
            Log:
            JENKINS-14247 retrieve polling node from Launcher
            hudson.model.Computer#currentComputer resolves to master during polling
            hudson.Launcher#getComputer is deprecated and unsafe but seem to work in this context

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java src/main/java/hudson/plugins/clearcase/ClearCaseUcmSCM.java http://jenkins-ci.org/commit/clearcase-plugin/bfee5ed189d86ed5d03b3f196b4a5a8dd8a41f01 Log: JENKINS-14247 retrieve polling node from Launcher hudson.model.Computer#currentComputer resolves to master during polling hudson.Launcher#getComputer is deprecated and unsafe but seem to work in this context

            Code changed in jenkins
            User: Vincent Latombe
            Path:
            pom.xml
            src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java
            src/main/java/hudson/plugins/clearcase/ClearCaseInstallation.java
            src/main/java/hudson/plugins/clearcase/ClearCaseSCM.java
            src/main/java/hudson/plugins/clearcase/ClearCaseUcmSCM.java
            src/main/java/hudson/plugins/clearcase/ucm/UcmMakeBaseline.java
            http://jenkins-ci.org/commit/clearcase-plugin/c7adb78fff05f427aa1e514122453761be07a274
            Log:
            Merge pull request #16 from ndeloof/master

            JENKINS-14247

            Compare: https://github.com/jenkinsci/clearcase-plugin/compare/35996f3090bc...c7adb78fff05

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: pom.xml src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java src/main/java/hudson/plugins/clearcase/ClearCaseInstallation.java src/main/java/hudson/plugins/clearcase/ClearCaseSCM.java src/main/java/hudson/plugins/clearcase/ClearCaseUcmSCM.java src/main/java/hudson/plugins/clearcase/ucm/UcmMakeBaseline.java http://jenkins-ci.org/commit/clearcase-plugin/c7adb78fff05f427aa1e514122453761be07a274 Log: Merge pull request #16 from ndeloof/master JENKINS-14247 Compare: https://github.com/jenkinsci/clearcase-plugin/compare/35996f3090bc...c7adb78fff05

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/hudson/plugins/mercurial/MercurialSCM.java
            http://jenkins-ci.org/commit/mercurial-plugin/999b61c43f86e560e3361ddfae599fa0683de041
            Log:
            Consider using alternate workaround from JENKINS-14247.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/mercurial/MercurialSCM.java http://jenkins-ci.org/commit/mercurial-plugin/999b61c43f86e560e3361ddfae599fa0683de041 Log: Consider using alternate workaround from JENKINS-14247 .

            Fixed since 1.3.12

            vlatombe Vincent Latombe added a comment - Fixed since 1.3.12

            People

              vlatombe Vincent Latombe
              hicwic Steve Eckerlein
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: