From 61f7f33c9205f4b05d569259068b8d6f98ff908b Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 6 Jul 2022 18:49:29 +0000 Subject: [PATCH] Adjust some completion messages --- bootstrap-daemon/pvcbootstrapd/Daemon.py | 2 +- bootstrap-daemon/pvcbootstrapd/lib/lib.py | 2 +- bootstrap-daemon/pvcbootstrapd/lib/redfish.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bootstrap-daemon/pvcbootstrapd/Daemon.py b/bootstrap-daemon/pvcbootstrapd/Daemon.py index 6a70769..01559b6 100755 --- a/bootstrap-daemon/pvcbootstrapd/Daemon.py +++ b/bootstrap-daemon/pvcbootstrapd/Daemon.py @@ -274,7 +274,7 @@ def entrypoint(): def term(signum="", frame=""): print("Received TERM, exiting.") - notifications.send_webhook(config, "begin", "Received TERM, exiting pvcbootstrapd") + notifications.send_webhook(config, "completed", "Received TERM, exiting pvcbootstrapd") cleanup(0) signal.signal(signal.SIGTERM, term) diff --git a/bootstrap-daemon/pvcbootstrapd/lib/lib.py b/bootstrap-daemon/pvcbootstrapd/lib/lib.py index 841bcfb..275fd75 100755 --- a/bootstrap-daemon/pvcbootstrapd/lib/lib.py +++ b/bootstrap-daemon/pvcbootstrapd/lib/lib.py @@ -98,7 +98,7 @@ def host_checkin(config, data): elif data["action"] in ["install-complete"]: # Node install has finished logger.info(f"Registering install complete for host {data['hostname']}") - notifications.send_webhook(config, "begin", f"Cluster {cspec_cluster}: Registering install complete for host {data['hostname']}") + notifications.send_webhook(config, "success", f"Cluster {cspec_cluster}: Registering install complete for host {data['hostname']}") host.installer_complete(config, cspec, data) elif data["action"] in ["system-boot_initial"]: diff --git a/bootstrap-daemon/pvcbootstrapd/lib/redfish.py b/bootstrap-daemon/pvcbootstrapd/lib/redfish.py index 7dd1afa..95af734 100755 --- a/bootstrap-daemon/pvcbootstrapd/lib/redfish.py +++ b/bootstrap-daemon/pvcbootstrapd/lib/redfish.py @@ -849,13 +849,15 @@ def redfish_init(config, cspec, data): logger.info("Setting temporary PXE boot...") set_boot_override(session, system_root, redfish_vendor, "Pxe") + notifications.send_webhook(config, "success", f"Cluster {cspec_cluster}: Completed Redfish initialization of host {cspec_hostname}") + # Turn on the system logger.info("Powering on node...") set_power_state(session, system_root, redfish_vendor, "on") + notifications.send_webhook(config, "begin", f"Cluster {cspec_cluster}: Powering on host {cspec_hostname}") node = db.update_node_state(config, cspec_cluster, cspec_hostname, "pxe-booting") - notifications.send_webhook(config, "success", f"Cluster {cspec_cluster}: Completed Redfish initialization of host {cspec_hostname}") logger.info("Waiting for completion of node and cluster installation...") # Wait for the system to install and be configured while node.state != "booted-completed":