Fix reason column overflow
diff --git a/staffeln/conductor/backup.py b/staffeln/conductor/backup.py
index 3b80c3b..35925cc 100755
--- a/staffeln/conductor/backup.py
+++ b/staffeln/conductor/backup.py
@@ -179,7 +179,7 @@
task.save()
except OpenstackSDKException as e:
- reason = _("Backup %s deletion failed." "%s" % (task.backup_id, str(e)))
+ reason = _("Backup %s deletion failed." "%s" % (task.backup_id, str(e)[:128]))
LOG.info(reason)
task.reason = reason
task.backup_status = constants.BACKUP_FAILED
@@ -469,7 +469,7 @@
except OpenstackSDKException as error:
reason = _(
"Backup (name: %s) creation for the volume %s failled. %s"
- % (backup_name, task.volume_id, str(error))
+ % (backup_name, task.volume_id, str(error)[:128])
)
LOG.info(reason)
task.reason = reason
@@ -479,7 +479,7 @@
except Exception as error:
reason = _(
"Backup (name: %s) creation for the volume %s failled. %s"
- % (backup_name, task.volume_id, str(error))
+ % (backup_name, task.volume_id, str(error)[:128])
)
LOG.error(reason)
task.reason = reason