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

GCE plugin shouldn't cleanup nodes from different jenkins masters

    Details

    • Similar Issues:

      Description

      Upgrade of plugin google-compute-engine-plugin to version 1.0.10 causes that vm instances created in this same GCP project but from different Jenkins Master are removed.

      It looks that these changes https://github.com/jenkinsci/google-compute-engine-plugin/blob/7ee660eae173d1010388c557c378f2b7f8bdd105/src/main/java/com/google/jenkins/plugins/computeengine/CleanLostNodesWork.java#L66 trying to cleanup all nodes with this same instanceUniqueId which is resolved only from cloud name. I think it is quite possible that for simplicity cloud name in most cases is identical with project id.

      So detection of unique instances should probably ensure that vm instances comes from this same jenkins master before they are deleted.

      As workaround different cloud names could be used on each jenkins master.

        Attachments

          Activity

          Hide
          ingwar Karol Lassak added a comment -

          At the moment slaves dont have any connection with "jenkins master", except instanceUniqueId so its not possible to distinguish from what master they were created..

           

          There is another issue with that that all jenskins instances with same cloud name uses same pool (limit) of instances as mentioned here.

          https://issues.jenkins-ci.org/browse/JENKINS-52649

           

          There are two options:

          1. Either use different cloud name for each cloud (Info how to use it should be added to help), It allows of creating shared pools of slaves, but cleaning needs to be fixed somehow (probably by adding extra ID mentioned in point 2)

          2. Another solution would be to just generate some random instance ID and use it as id.

           

          Show
          ingwar Karol Lassak added a comment - At the moment slaves dont have any connection with "jenkins master", except instanceUniqueId  so its not possible to distinguish from what master they were created..   There is another issue with that that all jenskins instances with same cloud name uses same pool (limit) of instances as mentioned here. https://issues.jenkins-ci.org/browse/JENKINS-52649   There are two options: 1. Either use different cloud name for each cloud (Info how to use it should be added to help), It allows of creating shared pools of slaves, but cleaning needs to be fixed somehow (probably by adding extra ID mentioned in point 2) 2. Another solution would be to just generate some random instance ID and use it as id.  
          Hide
          zombiemoose Rachel Yen added a comment -

          Thanks to Karol Lassak, we'll have unique identifiers for the different clouds. I'll resolve this with our next release.

          Show
          zombiemoose Rachel Yen added a comment - Thanks to Karol Lassak , we'll have unique identifiers for the different clouds. I'll resolve this with our next release.
          Hide
          mjanczuk Mateusz Janczuk added a comment -

          Great news! thanks Karol Lassak, Rachel Yen

           

          Show
          mjanczuk Mateusz Janczuk added a comment - Great news! thanks Karol Lassak , Rachel Yen  
          Show
          craigbarber Craig Barber added a comment - Migrated to: https://github.com/jenkinsci/google-compute-engine-plugin/issues/74

            People

            • Assignee:
              zombiemoose Rachel Yen
              Reporter:
              mjanczuk Mateusz Janczuk
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: