Wait longer for final poweroff and adjust msgs
This commit is contained in:
		| @@ -157,6 +157,6 @@ def host_checkin(config, data): | |||||||
|             host.set_completed(config, cspec, cspec_cluster) |             host.set_completed(config, cspec, cspec_cluster) | ||||||
|  |  | ||||||
|             # Hosts will now power down ready for real activation in production |             # Hosts will now power down ready for real activation in production | ||||||
|             sleep(60) |             sleep(300) | ||||||
|             cluster = db.update_cluster_state(config, cspec_cluster, "completed") |             cluster = db.update_cluster_state(config, cspec_cluster, "completed") | ||||||
|             notifications.send_webhook(config, "completed", f"Cluster {cspec_cluster}: PVC bootstrap deployment completed") |             notifications.send_webhook(config, "completed", f"Cluster {cspec_cluster}: PVC bootstrap deployment completed") | ||||||
|   | |||||||
| @@ -953,7 +953,7 @@ def redfish_init(config, cspec, data): | |||||||
|         node = db.get_node(config, cspec_cluster, name=cspec_hostname) |         node = db.get_node(config, cspec_cluster, name=cspec_hostname) | ||||||
|  |  | ||||||
|     # Graceful shutdown of the machine |     # 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") |     set_power_state(session, system_root, redfish_vendor, "GracefulShutdown") | ||||||
|     system_power_state = "On" |     system_power_state = "On" | ||||||
|     while system_power_state != "Off": |     while system_power_state != "Off": | ||||||
| @@ -965,6 +965,8 @@ def redfish_init(config, cspec, data): | |||||||
|     # Turn off the indicator to indicate bootstrap has completed |     # Turn off the indicator to indicate bootstrap has completed | ||||||
|     set_indicator_state(session, system_root, redfish_vendor, "off") |     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 |     # We must delete the session | ||||||
|     del session |     del session | ||||||
|     return |     return | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user