Browse Source

Merge "Trivial: clarify usage of AgentCommandTimeout in _wait_for_command"

tags/15.1.0
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
c4092b27bd
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      ironic/drivers/modules/agent_client.py

+ 5
- 0
ironic/drivers/modules/agent_client.py View File

@@ -77,12 +77,17 @@ class AgentClient(object):

:param node: A Node object.
:param method: A string represents the command executed by agent.
:raises: AgentCommandTimeout if timeout is reached.
"""
try:
method = method.split('.', 1)[1]
except IndexError:
pass

# NOTE(dtantsur): this function uses AgentCommandTimeout on every
# failure, but unless the timeout is reached, the exception is caught
# and retried by the @retry decorator above.

commands = self.get_commands_status(node)
try:
result = next(c for c in reversed(commands)


Loading…
Cancel
Save