sardinasystems / fleeting-plugin-openstack

GitLab fleeting plugin for OpenStack
Apache License 2.0
11 stars 6 forks source link

Stop explicitly tracking number of instances provisioned #16

Closed sersorrel closed 4 months ago

sersorrel commented 4 months ago

Fleeting doesn't need plugins to keep track of this count (I believe it already has handling for things like "an instance wasn't deleted when it should have been" and "additional instances were unexpectedly provisioned"), and I suspect it could lead to concurrency-related bugs if Fleeting invokes plugin methods on multiple goroutines simultaneously.

In any case, it leads to frequent "ERROR: out-of-sync capacity" log messages which are actually entirely harmless. For example, after you ask OpenStack to destroy an instance, it takes a few moments before the instance is actually listed as deleted – if Fleeting calls Update() during that time, two such log messages would be emitted: