-
Bug
-
Resolution: Duplicate
-
Major
-
None
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.
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.