diff options
author | Vladyslav Drok <vdrok@mirantis.com> | 2016-09-22 20:31:19 +0300 |
---|---|---|
committer | Xavier <marcusrafael@lsd.ufcg.edu.br> | 2016-11-10 20:54:52 +0000 |
commit | 45e954d0573dbd6cabdfb6073f7677b328ade665 (patch) | |
tree | 5c5ccda055047b3e668275ffee9967cbc05e72b9 /ironic/drivers/modules | |
parent | fd2e2fa310890a8614db7f8c5e0e1f9037d5d14c (diff) | |
download | ironic-45e954d0573dbd6cabdfb6073f7677b328ade665.tar.gz |
Avoid name errors in oneview periodics
Solves a bug that can brake the periodic task execution in
oneview drivers. The problem occurs when the method to check
if a node is in use by oneview raise an exception.
When that happens, the periodic task will break its execution,
leaving the node with a wrong provision state and wrong
maintenance mode too. The expected behavior when this occurs
is skip processing the current node, iterate over the next
node and process it.
This patch changes the periodic task execution flow, ignoring
the exception and processing the next node. In the next
periodic task execution, the not processed node can be
processed and updated accordingly.
Co-Authored-By: Xavier <marcusrafael@lsd.ufcg.edu.br>
Change-Id: I4b4b350d82d9e6863e8a4f334d2f9e7f7c192c6e
Closes-Bug: 1629051
(cherry picked from commit 53521b6fd8bf01d8137b0a7cdb6504b3faf0b9ed)
Diffstat (limited to 'ironic/drivers/modules')
-rw-r--r-- | ironic/drivers/modules/oneview/deploy.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ironic/drivers/modules/oneview/deploy.py b/ironic/drivers/modules/oneview/deploy.py index 19262ca4c..73b241c62 100644 --- a/ironic/drivers/modules/oneview/deploy.py +++ b/ironic/drivers/modules/oneview/deploy.py @@ -70,11 +70,17 @@ class OneViewPeriodicTasks(object): try: oneview_using = deploy_utils.is_node_in_use_by_oneview(node) except exception.OneViewError as e: + # NOTE(xavierr): Skip this node and process the + # remaining nodes. This node will be checked in + # the next periodic call. + LOG.error(_LE("Error while determining if node " "%(node_uuid)s is in use by OneView. " "Error: %(error)s"), {'node_uuid': node.uuid, 'error': e}) + continue + if oneview_using: purpose = (_LI('Updating node %(node_uuid)s in use ' 'by OneView from %(provision_state)s state ' @@ -126,11 +132,17 @@ class OneViewPeriodicTasks(object): node ) except exception.OneViewError as e: + # NOTE(xavierr): Skip this node and process the + # remaining nodes. This node will be checked in + # the next periodic call. + LOG.error(_LE("Error while determining if node " "%(node_uuid)s is in use by OneView. " "Error: %(error)s"), {'node_uuid': node.uuid, 'error': e}) + continue + if not oneview_using: purpose = (_LI('Bringing node %(node_uuid)s back from ' 'use by OneView from %(provision_state)s ' |