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

Swarm Client should not restart when labelsFile changes

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: swarm-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.90
      Swarm Plugin and Jar: 3.6
    • Similar Issues:

      Description

      Currently when -labelsFile file changes, the client is blindly restarted, interrupting any running jobs.  In my opinion, the only advantage of -labelsFile flag is to eliminate the need to restart the client for label changes and therefore avoid interrupting jobs.

      Currently my puppet instrumentation updates the init.d script with any changes to the -labels parameter and then restarts the system service.  In order to avoid job interruptions I had to write my own logic that detects the number of running jobs, sets the slave temporarily offline, restarts it once jobs finish, etc.  I doubt that my needs are unusual.  In this context, the new -labelsFile parameter is not a useful addition unless it can handle all of that.

      In other words, it should either:

      1. Not restart the client but update labels on the fly.
      2. Restart the client gracefully (when no jobs are running).

       (Note that this is different from JENKINS-45295 where the client stays down for some reason)

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            KK does not maintain this plugin anymore. Moving to unassigned to set the expectation

            Show
            oleg_nenashev Oleg Nenashev added a comment - KK does not maintain this plugin anymore. Moving to unassigned to set the expectation
            Hide
            basil Basil Crow added a comment -

            Duplicate of JENKINS-45295.

            Show
            basil Basil Crow added a comment - Duplicate of JENKINS-45295 .
            Hide
            basil Basil Crow added a comment -

            Can you try using -disableClientsUniqueId as a temporary workaround?

            Show
            basil Basil Crow added a comment - Can you try using -disableClientsUniqueId as a temporary workaround?
            Hide
            basil Basil Crow added a comment -

            Fixed in #110 and will be released in 3.17.

            Show
            basil Basil Crow added a comment - Fixed in #110 and will be released in 3.17.
            Hide
            basil Basil Crow added a comment -

            Released in 3.17.

            Show
            basil Basil Crow added a comment - Released in 3.17.
            Hide
            akom Alexander Komarov added a comment -

            Thanks Basil Crow!
            I am in fact using -disableClientsUniqueId, but I must not have been when I tested this behavior back in 2017.
            I just tested and reloading the file works correctly even in 3.15 with that switch, as you pointed out in the PR.

            Show
            akom Alexander Komarov added a comment - Thanks Basil Crow ! I am in fact using -disableClientsUniqueId , but I must not have been when I tested this behavior back in 2017. I just tested and reloading the file works correctly even in 3.15 with that switch, as you pointed out in the PR.

              People

              • Assignee:
                Unassigned
                Reporter:
                akom Alexander Komarov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: