diff --git a/heat/engine/resource.py b/heat/engine/resource.py index 70bc2be00d..6d68f28610 100644 --- a/heat/engine/resource.py +++ b/heat/engine/resource.py @@ -1745,7 +1745,7 @@ class Resource(object): rs = {'action': self.action, 'status': self.status, - 'status_reason': str(self.status_reason), + 'status_reason': six.text_type(self.status_reason), 'stack_id': self.stack.id, 'physical_resource_id': self.resource_id, 'name': self.name, diff --git a/heat/engine/service_software_config.py b/heat/engine/service_software_config.py index 5ea48fb6c8..6e07ffdf0a 100644 --- a/heat/engine/service_software_config.py +++ b/heat/engine/service_software_config.py @@ -257,7 +257,7 @@ class SoftwareConfigService(object): 'stack_user_project_id': stack_user_project_id, 'action': action, 'status': status, - 'status_reason': str(status_reason)}) + 'status_reason': six.text_type(status_reason)}) self._push_metadata_software_deployments( cnxt, server_id, stack_user_project_id) return api.format_software_deployment(sd) @@ -338,7 +338,7 @@ class SoftwareConfigService(object): if status: update_data['status'] = status if status_reason: - update_data['status_reason'] = str(status_reason) + update_data['status_reason'] = six.text_type(status_reason) if updated_at: update_data['updated_at'] = timeutils.normalize_time( timeutils.parse_isotime(updated_at)) diff --git a/heat/engine/stack.py b/heat/engine/stack.py index 9a58bcf66c..48fcda3823 100644 --- a/heat/engine/stack.py +++ b/heat/engine/stack.py @@ -606,7 +606,7 @@ class Stack(collections.Mapping): stack.update({ 'action': self.action, 'status': self.status, - 'status_reason': str(self.status_reason)}) + 'status_reason': six.text_type(self.status_reason)}) if only_db: stack['parent_resource_name'] = self.parent_resource_name @@ -949,7 +949,7 @@ class Stack(collections.Mapping): if stack is not None: values = {'action': self.action, 'status': self.status, - 'status_reason': str(self.status_reason)} + 'status_reason': six.text_type(self.status_reason)} self._send_notification_and_add_event() if self.convergence: # do things differently for convergence @@ -981,7 +981,7 @@ class Stack(collections.Mapping): if stack is not None: values = {'action': self.action, 'status': self.status, - 'status_reason': str(self.status_reason)} + 'status_reason': six.text_type(self.status_reason)} self._send_notification_and_add_event() stack.persist_state_and_release_lock(self.context, self.id, engine_id, values)