Cloud support : API usage for "mark for termination" ?

Hello,

I'm working on yandex-qatools/teamcity-openstack-plugin, the TeamCity OpenStack Cloud Support.
I'm trying to improve the configuration reload mechanism (when image or some properties like 'Instance Cap' update), which currently terminate all running instances (=> #2).

When this method is called (because configuration is reloaded):

jetbrains.buildServer.clouds.CloudClientEx.dispose()

All resources (=> images & instances) are "disposed" too. This instance terminaison  is a little violent :-).

Without going to an high-level implementation like the native AWS, a improvement could be to "mark for termination after current build finishes" these agents.
With that, on any configuration change, current build finish (and is not stopped) and agent is deleted.

Is there a way to set this property (mark agent for termination) from CloudClientEx / CloudImage / CloudInstance interfaces ?

Thanks in advance.
Best regards

Please sign in to leave a comment.