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

Make "effective client name" unique for the buildNode, not for the slave host

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      any where more than 1 slave is running on a remote computer
    • Similar Issues:

      Description

      The "effective client name" of a remote slave is currently:
      p4Client

      {value of "Workspace (client)" in the GUI}

      + hostname

      P4 will behave badly if there is more than one slave running on that remote host that can execute a given job.

      Proposed fix is to insert the following line after 848 of PerforceSCM.java
      p4Client += "-" + buildNode.getNodeName().hashCode();

      This will guarantee a unique but repeatable client name for each slave running on a remote computer regardless of the number of slaves.

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          Why not use the node name? That's unique by definition, and is far more human readable than some long hash code.

          Show
          rpetti Rob Petti added a comment - Why not use the node name? That's unique by definition, and is far more human readable than some long hash code.
          Hide
          rpetti Rob Petti added a comment -

          Nevermind, it appears you can have spaces in node names...

          Show
          rpetti Rob Petti added a comment - Nevermind, it appears you can have spaces in node names...
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : rpetti
          Path:
          trunk/hudson/plugins/perforce/src/main/java/hudson/plugins/perforce/PerforceSCM.java
          trunk/hudson/plugins/perforce/src/main/webapp/help/p4Client.html
          http://jenkins-ci.org/commit/28532
          Log:
          [FIXED JENKINS-5917] append hashcode of slave name to the end of client workspace names instead of the hostname

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : rpetti Path: trunk/hudson/plugins/perforce/src/main/java/hudson/plugins/perforce/PerforceSCM.java trunk/hudson/plugins/perforce/src/main/webapp/help/p4Client.html http://jenkins-ci.org/commit/28532 Log: [FIXED JENKINS-5917] append hashcode of slave name to the end of client workspace names instead of the hostname
          Hide
          rpetti Rob Petti added a comment -

          I realize this is assigned to you, but I need to get this committed before the release today.

          Show
          rpetti Rob Petti added a comment - I realize this is assigned to you, but I need to get this committed before the release today.

            People

            • Assignee:
              mikeryan4 mikeryan4
              Reporter:
              mikeryan4 mikeryan4
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: