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

use IP address when cannot resolve hostname for slaves

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      Perforce plugin 1.3.35 (current latest for July 30 2015)
      Jenkins 1.580.3
    • Similar Issues:

      Description

      I'm running into these issues: JENKINS-6257 JENKINS-15698

      I'm using dynamic workers allocation in our private openstack cluster through Openstack Cloud plugin 1.8.

      I see Perforce Plugin cannot resolve host names of those new workers. I suspect it fails with NPE or something because it cannot checkout files to the new worker.
      I have to delete the old workspace (leftover from another worker) and restart the build. this time it will work.
      but if next build happens on a yet another new worker, I have to repeat this: delete the workspace and re-run the build.

      so.. why not use IP address if hostname cannot be resolved? or just always use IP address for perforce workspaces. maybe transform it to something Perforce-friendly like 192-168-1-123.

      this bug blocks us from using dynamic openstack workers with Perforce plugin

        Attachments

          Issue Links

            Activity

            alskor Alex Java created issue -
            alskor Alex Java made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-6257 [ JENKINS-6257 ]
            alskor Alex Java made changes -
            Link This issue is related to JENKINS-15698 [ JENKINS-15698 ]
            alskor Alex Java made changes -
            Environment Perforce plugin 1.3.35 (current latest for July 30 2015)
            Jenkins 1.580.3
            Priority Minor [ 4 ] Major [ 3 ]
            Hide
            alskor Alex Java added a comment -

            btw, what's the deal with P4 Plugin? should I just migrate to that one instead of using "Perforce Plugin"?

            Show
            alskor Alex Java added a comment - btw, what's the deal with P4 Plugin? should I just migrate to that one instead of using "Perforce Plugin"?
            Hide
            rpetti Rob Petti added a comment -

            I don't believe this is a good idea. A temporary name resolution failure will result in a new client being created, and thus introduce syncing inconsistencies.

            If you are having trouble using ${hostname}, then you should simply use something else, such as ${hash} as recommended by the documentation.

            Show
            rpetti Rob Petti added a comment - I don't believe this is a good idea. A temporary name resolution failure will result in a new client being created, and thus introduce syncing inconsistencies. If you are having trouble using ${hostname}, then you should simply use something else, such as ${hash} as recommended by the documentation.
            Hide
            rpetti Rob Petti added a comment -

            As for the p4-plugin, that is the official plugin by perforce that should be used going forward. This plugin isn't really being maintained.

            Show
            rpetti Rob Petti added a comment - As for the p4-plugin, that is the official plugin by perforce that should be used going forward. This plugin isn't really being maintained.
            rpetti Rob Petti made changes -
            Assignee Rob Petti [ rpetti ]
            Hide
            alskor Alex Java added a comment -

            alright, thank you. I use ${JOB_NAME} for the workspace name, not $hostname. I tried P4 plugin and it did not have troubles with host name resolution, so I will just migrate to that one

            Show
            alskor Alex Java added a comment - alright, thank you. I use ${JOB_NAME} for the workspace name, not $hostname. I tried P4 plugin and it did not have troubles with host name resolution, so I will just migrate to that one
            Hide
            rpetti Rob Petti added a comment -

            ${JOB_NAME} isn't resolved in the client name for slaves field... I think you are misunderstanding what hostname resolution is used for.

            Unless you have explicitly changed your client name for slaves setting to use ${hostname} instead of the recommended default, then a failure to resolve the name will never result in a failed build.

            If you are experiencing adverse behaviour, then you should post a full log.

            Show
            rpetti Rob Petti added a comment - ${JOB_NAME} isn't resolved in the client name for slaves field... I think you are misunderstanding what hostname resolution is used for. Unless you have explicitly changed your client name for slaves setting to use ${hostname} instead of the recommended default, then a failure to resolve the name will never result in a failed build. If you are experiencing adverse behaviour, then you should post a full log.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 164717 ] JNJira + In-Review [ 181695 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                alskor Alex Java
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: