Merge "Convert exceptions to strings when passing them to the Result class"
This commit is contained in:
@@ -17,6 +17,7 @@ import logging
|
||||
import ironic_inspector_client
|
||||
from mistral.workflow import utils as mistral_workflow_utils
|
||||
from oslo_utils import units
|
||||
import six
|
||||
|
||||
from tripleo_common.actions import base
|
||||
from tripleo_common import exception
|
||||
@@ -67,7 +68,7 @@ class RegisterOrUpdateNodes(base.TripleOAction):
|
||||
ramdisk_name=self.ramdisk_name)
|
||||
except Exception as err:
|
||||
LOG.exception("Error registering nodes with ironic.")
|
||||
return mistral_workflow_utils.Result(error=err)
|
||||
return mistral_workflow_utils.Result(error=six.text_type(err))
|
||||
|
||||
|
||||
class ConfigureBootAction(base.TripleOAction):
|
||||
@@ -130,7 +131,7 @@ class ConfigureBootAction(base.TripleOAction):
|
||||
LOG.debug("Configuring boot option for Node %s", self.node_uuid)
|
||||
except Exception as err:
|
||||
LOG.exception("Error configuring node boot options with Ironic.")
|
||||
return mistral_workflow_utils.Result(error=err)
|
||||
return mistral_workflow_utils.Result(error=six.text_type(err))
|
||||
|
||||
|
||||
class ConfigureRootDeviceAction(base.TripleOAction):
|
||||
|
@@ -153,7 +153,7 @@ class GeneratePasswordsAction(base.TripleOAction):
|
||||
except Exception:
|
||||
msg = "Error retrieving mistral environment: %s" % self.container
|
||||
LOG.exception(msg)
|
||||
return mistral_workflow_utils.Result("", msg)
|
||||
return mistral_workflow_utils.Result(error=msg)
|
||||
|
||||
try:
|
||||
stack_env = orchestration.stacks.environment(
|
||||
|
Reference in New Issue
Block a user