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

use IP address when cannot resolve hostname for slaves

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin
    • None
    • Perforce plugin 1.3.35 (current latest for July 30 2015)
      Jenkins 1.580.3

      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

          [JENKINS-29734] use IP address when cannot resolve hostname for slaves

          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"?

          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"?

          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.

          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.

          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.

          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.

          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

          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

          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.

          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.

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

              Created:
              Updated: