• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Windows Server 2003 master and slaves

      I was trying to setup my Clearcase views for my nodes based on the ${NODE_NAME} variable, so that each slave would have a unique view name. ${NODE_NAME} is empty on the master, so I cannot use it to create view on the master and have to hard code the view path for each slave, making it so I can't move builds between nodes easily. I have specific requirements to set a custom workspace based on the NODE_NAME.

          [JENKINS-9671] NODE_NAME not defined for master node

          Alex Earl added a comment -

          Looks like the way environment variables are gathered is now different with the new EnvironmentContributor. Though I am not sure why it would be missing, the same code as was used to set it from before has been moved to CoreEnvironmentContributor, so it should still be adding it.

          Alex Earl added a comment - Looks like the way environment variables are gathered is now different with the new EnvironmentContributor. Though I am not sure why it would be missing, the same code as was used to set it from before has been moved to CoreEnvironmentContributor, so it should still be adding it.

          Alex Earl added a comment -

          Also, I am using 1.465 and don't see this issue.

          Alex Earl added a comment - Also, I am using 1.465 and don't see this issue.

          Owen Mehegan added a comment -

          I should have mentioned that I'm on Linux. Didn't notice that the env for this bug is described as Windows Server.

          I verified that I'm seeing the incorrect behavior. I created a matrix job, and assigned it to run on the master and a slave node. The job just runs 'echo "Node name is $NODE_NAME"'

          On the master:
          Building on master in workspace /home/br/hudson/hudson-data/jobs/matrix_test/workspace/label/lenny_32bit
          [lenny_32bit] $ /bin/sh -xe /tmp/hudson6521396441231883115.sh
          + echo 'Node name is '
          Node name is
          Finished: SUCCESS

          On the slave:
          Building remotely on jenkins-precise-64 in workspace /home/br/hudson-data/workspace/matrix_test/label/precise_64bit
          [precise_64bit] $ /bin/sh -xe /tmp/hudson5676803587228444916.sh
          + echo Node name is jenkins-precise-64
          Node name is jenkins-precise-64
          Finished: SUCCESS

          Owen Mehegan added a comment - I should have mentioned that I'm on Linux. Didn't notice that the env for this bug is described as Windows Server. I verified that I'm seeing the incorrect behavior. I created a matrix job, and assigned it to run on the master and a slave node. The job just runs 'echo "Node name is $NODE_NAME"' On the master: Building on master in workspace /home/br/hudson/hudson-data/jobs/matrix_test/workspace/label/lenny_32bit [lenny_32bit] $ /bin/sh -xe /tmp/hudson6521396441231883115.sh + echo 'Node name is ' Node name is Finished: SUCCESS On the slave: Building remotely on jenkins-precise-64 in workspace /home/br/hudson-data/workspace/matrix_test/label/precise_64bit [precise_64bit] $ /bin/sh -xe /tmp/hudson5676803587228444916.sh + echo Node name is jenkins-precise-64 Node name is jenkins-precise-64 Finished: SUCCESS

          Owen Mehegan added a comment -

          I don't know when this was fixed, but it's working now in 1.514 on Linux.

          Owen Mehegan added a comment - I don't know when this was fixed, but it's working now in 1.514 on Linux.

          Owen Mehegan added a comment -

          This is broken again as of Jenkins 1.529. In a build on master where I do 'echo $NODE_NAME' I get:

          Building on master in workspace /home/us/jenkins/jenkins-data/jobs/matrix_test/workspace/label/lenny_32bit
          [lenny_32bit] $ /bin/sh -xe /tmp/hudson4009189070701021604.sh
          + echo

          Finished: SUCCESS

          On a slave I get the slave's label. This is breaking some builds where I gate stuff on master.

          Owen Mehegan added a comment - This is broken again as of Jenkins 1.529. In a build on master where I do 'echo $NODE_NAME' I get: Building on master in workspace /home/us/jenkins/jenkins-data/jobs/matrix_test/workspace/label/lenny_32bit [lenny_32bit] $ /bin/sh -xe /tmp/hudson4009189070701021604.sh + echo Finished: SUCCESS On a slave I get the slave's label. This is breaking some builds where I gate stuff on master.

          Alex Earl added a comment -

          I am seeing this issue again as well. I'll see what I can do to dig up the reason.

          Alex Earl added a comment - I am seeing this issue again as well. I'll see what I can do to dig up the reason.

          Alex Earl added a comment -

          Seems like it was probably something in 9b74a88 that caused the issue

          Alex Earl added a comment - Seems like it was probably something in 9b74a88 that caused the issue

          Dirk Kuypers added a comment -

          Ok, I am back from almost no internet holidays and as I don't understand how to interpret Alex' 9b74a88 (and as I do not know if my personal response email reached him) I will write a small comment here: I think the problem was introduced with 1.527, at least since then I am stuck with 1.526. I opened JENKINS-19222 describing my problems. From the changelog of 1.527 I guess the cause could be JENKINS-19042.

          Dirk Kuypers added a comment - Ok, I am back from almost no internet holidays and as I don't understand how to interpret Alex' 9b74a88 (and as I do not know if my personal response email reached him) I will write a small comment here: I think the problem was introduced with 1.527, at least since then I am stuck with 1.526. I opened JENKINS-19222 describing my problems. From the changelog of 1.527 I guess the cause could be JENKINS-19042 .

          Alex Earl added a comment -

          @Dirk, the value I posted is the commit ID in Git that I think possibly caused the issue.

          Alex Earl added a comment - @Dirk, the value I posted is the commit ID in Git that I think possibly caused the issue.

          Daniel Beck added a comment -

          Resolving this as fixed again. Whatever goes on with 1.52x+ is a different issue with the same symptoms – it doesn't happen on a pristine instance – and seems better tracked as JENKINS-19222.

          Daniel Beck added a comment - Resolving this as fixed again. Whatever goes on with 1.52x+ is a different issue with the same symptoms – it doesn't happen on a pristine instance – and seems better tracked as JENKINS-19222 .

            kohsuke Kohsuke Kawaguchi
            slide_o_mix Alex Earl
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: