Skip to content

Commit 366458b

Browse files
authored
fix(openstack): killAwolServers BUILD NOSTATE (#5168)
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
1 parent b65c968 commit 366458b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/hatchery/openstack/openstack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func (h *HatcheryOpenstack) killAwolServers(ctx context.Context) {
232232
workerName, isWorker := s.Metadata["worker"]
233233
// if the vm is in BUILD state since > 15 min, we delete it
234234
if s.Status == "BUILD" {
235-
if isWorker && time.Since(s.Updated) > 15*time.Minute {
235+
if isWorker && time.Since(s.Created) > 15*time.Minute {
236236
log.Warning(ctx, "killAwolServers> Deleting server %s status: %s last update: %s", s.Name, s.Status, time.Since(s.Updated))
237237
if err := h.deleteServer(ctx, s); err != nil {
238238
log.Error(ctx, "killAwolServers> Error while deleting server %s not created status: %s last update: %s", s.Name, s.Status, time.Since(s.Updated))

0 commit comments

Comments
 (0)