From 83118331a5ef412d8f6a58df70e1186e6abfa970 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 27 Oct 2022 16:36:49 +0000 Subject: [PATCH] Wait longer for final poweroff and adjust msgs --- bootstrap-daemon/pvcbootstrapd/lib/lib.py | 2 +- bootstrap-daemon/pvcbootstrapd/lib/redfish.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bootstrap-daemon/pvcbootstrapd/lib/lib.py b/bootstrap-daemon/pvcbootstrapd/lib/lib.py index b5c1763..49dcacf 100755 --- a/bootstrap-daemon/pvcbootstrapd/lib/lib.py +++ b/bootstrap-daemon/pvcbootstrapd/lib/lib.py @@ -157,6 +157,6 @@ def host_checkin(config, data): host.set_completed(config, cspec, cspec_cluster) # Hosts will now power down ready for real activation in production - sleep(60) + sleep(300) cluster = db.update_cluster_state(config, cspec_cluster, "completed") notifications.send_webhook(config, "completed", f"Cluster {cspec_cluster}: PVC bootstrap deployment completed") diff --git a/bootstrap-daemon/pvcbootstrapd/lib/redfish.py b/bootstrap-daemon/pvcbootstrapd/lib/redfish.py index 6add090..ca6b740 100755 --- a/bootstrap-daemon/pvcbootstrapd/lib/redfish.py +++ b/bootstrap-daemon/pvcbootstrapd/lib/redfish.py @@ -953,7 +953,7 @@ def redfish_init(config, cspec, data): node = db.get_node(config, cspec_cluster, name=cspec_hostname) # Graceful shutdown of the machine - notifications.send_webhook(config, "info", f"Cluster {cspec_cluster}: Powering off host {cspec_fqdn}") + notifications.send_webhook(config, "info", f"Cluster {cspec_cluster}: Shutting down host {cspec_fqdn}") set_power_state(session, system_root, redfish_vendor, "GracefulShutdown") system_power_state = "On" while system_power_state != "Off": @@ -965,6 +965,8 @@ def redfish_init(config, cspec, data): # Turn off the indicator to indicate bootstrap has completed set_indicator_state(session, system_root, redfish_vendor, "off") + notifications.send_webhook(config, "success", f"Cluster {cspec_cluster}: Powered off host {cspec_fqdn}") + # We must delete the session del session return