summaryrefslogtreecommitdiffstats
path: root/inc/trigger.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/trigger.inc.php')
-rw-r--r--inc/trigger.inc.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index db4a2148..2af73872 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -111,7 +111,7 @@ class Trigger
* Mount the VM store into the server.
*
* @param array $vmstore VM Store configuration to use. If false, read from properties
- * @return array task status of mount procedure, or false on error
+ * @return array|false task status of mount procedure, or false on error
*/
public static function mount($vmstore = false)
{
@@ -125,12 +125,13 @@ class Trigger
} else {
$storetype = 'unknown';
}
- if ($storetype === 'nfs')
+ if ($storetype === 'nfs') {
$addr = $vmstore['nfsaddr'];
- if ($storetype === 'cifs')
+ } elseif ($storetype === 'cifs') {
$addr = $vmstore['cifsaddr'];
- if ($storetype === 'internal')
+ } else {
$addr = 'null';
+ }
return Taskmanager::submit('MountVmStore', array(
'address' => $addr,
'type' => 'images',
@@ -175,6 +176,16 @@ class Trigger
$taskids['dmsdid'] = $task['id'];
$parent = $task['id'];
}
+ $task = Taskmanager::submit('Systemctl', array(
+ 'operation' => $action,
+ 'service' => 'dnbd3-server',
+ 'parentTask' => $parent,
+ 'failOnParentFail' => false
+ ));
+ if (isset($task['id'])) {
+ $taskids['dnbd3id'] = $task['id'];
+ $parent = $task['id'];
+ }
return $parent;
}