Quote error in messages

This commit is contained in:
Joshua Boniface 2022-07-07 20:26:50 +00:00
parent 0ca705ddd9
commit 75de65fe71
2 changed files with 2 additions and 2 deletions

View File

@ -83,4 +83,4 @@ def run_bootstrap(config, cspec, cluster, nodes):
notifications.send_webhook(config, "failure", f"Cluster {cluster.name}: Failed Ansible bootstrap; check pvcbootstrapd logs")
except Exception as e:
logger.warning(f"Error: {e}")
notifications.send_webhook(config, "failure", f"Cluster {cluster.name}: Failed Ansible bootstrap with error {e}; check pvcbootstrapd logs")
notifications.send_webhook(config, "failure", f"Cluster {cluster.name}: Failed Ansible bootstrap with error '{e}'; check pvcbootstrapd logs")

View File

@ -349,7 +349,7 @@ def run_hooks(config, cspec, cluster, nodes):
notifications.send_webhook(config, "success", f"Cluster {cluster.name}: Completed hook task '{hook_name}'")
except Exception as e:
logger.warning(f"Error running hook: {e}")
notifications.send_webhook(config, "failure", f"Cluster {cluster.name}: Failed hook task '{hook_name}' with error {e}")
notifications.send_webhook(config, "failure", f"Cluster {cluster.name}: Failed hook task '{hook_name}' with error '{e}'")
# Wait 5s between hooks
sleep(5)