mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-09 16:51:35 +00:00
filter out deleted nodes as to prevent them from being saved later (#391)
In `Scaleset.cleanup_nodes`, nodes that are no longer part of the scaleset should get deleted. Without filtering the list, the nodes could get re-saved to the Node table later on.
This commit is contained in:
parent
4c2679d61e
commit
29c7cfbd5d
@ -790,6 +790,7 @@ class Scaleset(BASE_SCALESET, ORMMixin):
|
||||
"no longer in scaleset: %s:%s", self.scaleset_id, node.machine_id
|
||||
)
|
||||
node.delete()
|
||||
nodes = [x for x in nodes if x.machine_id in azure_nodes]
|
||||
|
||||
nodes_to_reset = [x for x in nodes if x.state in NodeState.ready_for_reset()]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user