summaryrefslogtreecommitdiffstats
path: root/inc/taskmanagercallback.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-29 15:22:07 +0200
committerSimon Rettberg2015-09-29 15:22:07 +0200
commit9d0f2ffbd0700e7ad31e41657794592feef83500 (patch)
tree3b18f7b4ed3a0d05e96a6f946985a1d2f5654c6e /inc/taskmanagercallback.inc.php
parent[baseconfig] Mask root password if applicable (diff)
downloadslx-admin-9d0f2ffbd0700e7ad31e41657794592feef83500.tar.gz
slx-admin-9d0f2ffbd0700e7ad31e41657794592feef83500.tar.xz
slx-admin-9d0f2ffbd0700e7ad31e41657794592feef83500.zip
[vmstore] Only save config if mounting succeeded
Diffstat (limited to 'inc/taskmanagercallback.inc.php')
-rw-r--r--inc/taskmanagercallback.inc.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/inc/taskmanagercallback.inc.php b/inc/taskmanagercallback.inc.php
index ba589469..cec763fb 100644
--- a/inc/taskmanagercallback.inc.php
+++ b/inc/taskmanagercallback.inc.php
@@ -145,5 +145,25 @@ class TaskmanagerCallback
ConfigTgz::generateSucceeded($args);
}
}
+
+ public static function manualMount($task, $args)
+ {
+ if (!isset($task['data']['exitCode']))
+ return;
+ if ($task['data']['exitCode'] == 0) {
+ // Success - store configuration
+ Property::setVmStoreConfig($args);
+ return;
+ }
+ if ($task['data']['exitCode'] > 0) {
+ // Manual mount failed with non-taskmanager related error - reset storage type to reflect situation
+ $data = Property::getVmStoreConfig();
+ if (isset($data['storetype'])) {
+ unset($data['storetype']);
+ Property::setVmStoreConfig($data);
+ }
+ return;
+ }
+ }
}