You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be some race conditions possible when creating and tagging spot instance requests which can lead to a Windows spot instance being created with name ${cluster}_LINUX_SPOT_INSTANCE despite being a Windows instance.
At root this seems to be due to the LINUX fallback at
LOG.debug("[server-ping] There are total of: '{}' Spot Requests with Spot-Request-Ids: '{}' which have a running Spot Instance. Starting tagging of Spot Instance.",
Somewhere along the line, the platform tag is either empty (rather than not found?) or has got some default value of Linux set. Not quite sure of the root here, but likely some kind of race condition when creating new spot requests and/or tagging untagged instances via the server ping.
There is also some hard-to-grok code here that is outside the synchronized block and suspicious looking synchronization in general:
There seems to be some race conditions possible when creating and tagging spot instance requests which can lead to a Windows spot instance being created with name
${cluster}_LINUX_SPOT_INSTANCE
despite being a Windows instance.At root this seems to be due to the LINUX fallback at
gocd-ecs-elastic-agent/src/main/java/com/thoughtworks/gocd/elasticagent/ecs/domain/Platform.java
Line 25 in b1be8c3
This seems to be used by the code here during server ping
gocd-ecs-elastic-agent/src/main/java/com/thoughtworks/gocd/elasticagent/ecs/aws/SpotInstanceService.java
Lines 136 to 148 in b1be8c3
Somewhere along the line, the platform tag is either empty (rather than not found?) or has got some default value of Linux set. Not quite sure of the root here, but likely some kind of race condition when creating new spot requests and/or tagging untagged instances via the server ping.
There is also some hard-to-grok code here that is outside the synchronized block and suspicious looking synchronization in general:
gocd-ecs-elastic-agent/src/main/java/com/thoughtworks/gocd/elasticagent/ecs/aws/SpotInstanceService.java
Lines 124 to 131 in b1be8c3
The text was updated successfully, but these errors were encountered: