From dbc0d9614421e064cc62aacf116ebb783c83f2f3 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 1 Apr 2016 16:50:13 +0200 Subject: [merge] merging c3sl / fr - initial commit --- inc/event.inc.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'inc/event.inc.php') diff --git a/inc/event.inc.php b/inc/event.inc.php index e014666a..01a148b0 100644 --- a/inc/event.inc.php +++ b/inc/event.inc.php @@ -26,7 +26,8 @@ class Event $mountId = Trigger::mount(); $autoIp = Trigger::autoUpdateServerIp(); $ldadpId = Trigger::ldadp(); - + $ipxeId = Trigger::ipxe(); + Taskmanager::submit('DozmodLauncher', array( 'operation' => 'start' )); @@ -59,6 +60,17 @@ class Event EventLog::failure("The server's IP address could not be determined automatically, and there is no valid address configured."); $everythingFine = false; } + // iPXE generation + if ($ipxeId === false) { + EventLog::failure('Cannot generate PXE menu: Taskmanager unreachable!'); + $everythingFine = false; + } else { + $res = Taskmanager::waitComplete($ipxeId, 5000); + if (Taskmanager::isFailed($res)) { + EventLog::failure('Update PXE Menu failed', $res['data']['error']); + $everythingFine = false; + } + } // Just so we know booting is done (and we don't expect any more errors from booting up) if ($everythingFine) { @@ -73,11 +85,9 @@ class Event */ public static function serverIpChanged() { + error_log('Server ip changed'); global $tidIpxe; $tidIpxe = Trigger::ipxe(); - if (is_string($tidIpxe)) { - TaskmanagerCallback::addCallback($tidIpxe, 'cbIpxeBuilt'); - } ConfigModule::serverIpChanged(); } @@ -86,6 +96,7 @@ class Event */ public static function activeConfigChanged() { + error_log('Active config changed'); $task = Trigger::ldadp(); TaskmanagerCallback::addCallback($task, 'ldadpStartup'); } -- cgit v1.2.3-55-g7522