Skip to content

Commit

Permalink
fix(openstack): killAwolServers BUILD NOSTATE (#5168)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored May 7, 2020
1 parent b65c968 commit 366458b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/hatchery/openstack/openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (h *HatcheryOpenstack) killAwolServers(ctx context.Context) {
workerName, isWorker := s.Metadata["worker"]
// if the vm is in BUILD state since > 15 min, we delete it
if s.Status == "BUILD" {
if isWorker && time.Since(s.Updated) > 15*time.Minute {
if isWorker && time.Since(s.Created) > 15*time.Minute {
log.Warning(ctx, "killAwolServers> Deleting server %s status: %s last update: %s", s.Name, s.Status, time.Since(s.Updated))
if err := h.deleteServer(ctx, s); err != nil {
log.Error(ctx, "killAwolServers> Error while deleting server %s not created status: %s last update: %s", s.Name, s.Status, time.Since(s.Updated))
Expand Down

0 comments on commit 366458b

Please sign in to comment.