Skip to content

Commit

Permalink
manager: remove also taken resources that fail livecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Jan 23, 2023
1 parent 43fdaee commit 1d774dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions resallocserver/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ def check_failure_candidates(self):
"""
return (
self.up()
# isn't it still used?
.filter(models.Resource.ticket_id.is_(None))
.filter(models.Resource.check_failed_count > 0)
)

Expand Down
3 changes: 2 additions & 1 deletion resallocserver/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,8 @@ def _request_resource_removal(self):
app.log.warning(
"Requesting %s removal for continuous failures",
res.name)
res.state = RState.DELETE_REQUEST
# Not just DELETE_REQUEST, we need to mark the ticket FAILED
QResources(session).kill(res.id)
continue

for res in qres.clean_candidates():
Expand Down

0 comments on commit 1d774dc

Please sign in to comment.