ironic/releasenotes/notes/fail-fast-on-lookup-lock-a408feac87890050.yaml
Julia Kreger 2fd3d8f01e Fail on node lookup if it is locked
In the agent token mechanism, restrictions exist when a an agent
token can be generated, and unfortunately this has to be done on
the conductor side involving a lock and a task because we need to
save the state of the node.

As such, we were in a situation where we were waiting on DB node
locking, which would prevent the agent from getting a node, and
potentially causing the lookup operation to fail, eventually.

We now quickly return NodeLocked which shouldn't cause the agent
any issues, although we need to improve error handling there as
well.

Change-Id: Ice335eed82b936753be99eedb16ceccf8a9a86a8
2023-08-23 13:18:43 -07:00

8 lines
308 B
YAML

---
fixes:
- |
Fixes an issue where lookups to generate an agent token would stack up as
the internal lock upgrade logic silently holds on to the request while trying
to obtain a lock. The task creation will now immediately fail with a
``NodeLocked`` exception, which the agent will retry.