summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-21 11:22:18 +0100
committerSimon Rettberg2018-03-21 11:22:18 +0100
commit651a4082d0d2d6cebfd3532ea6617dffdea2aec6 (patch)
treea0d6f3049efbac1490f8ec862546acd1110f225d /inc
parent[translation] Fix saving of multiline texts (diff)
downloadslx-admin-651a4082d0d2d6cebfd3532ea6617dffdea2aec6.tar.gz
slx-admin-651a4082d0d2d6cebfd3532ea6617dffdea2aec6.tar.xz
slx-admin-651a4082d0d2d6cebfd3532ea6617dffdea2aec6.zip
[vmstore] Add fields to specify mount options
Diffstat (limited to 'inc')
-rw-r--r--inc/taskmanagercallback.inc.php3
-rw-r--r--inc/trigger.inc.php7
2 files changed, 9 insertions, 1 deletions
diff --git a/inc/taskmanagercallback.inc.php b/inc/taskmanagercallback.inc.php
index 114530cf..55e01ba2 100644
--- a/inc/taskmanagercallback.inc.php
+++ b/inc/taskmanagercallback.inc.php
@@ -172,7 +172,8 @@ class TaskmanagerCallback
Property::setVmStoreConfig($args);
return;
}
- if ($task['data']['exitCode'] > 0) {
+ // If code is 99 then the script failed to even unmount -- don't change anything
+ if ($task['data']['exitCode'] != 99) {
// Manual mount failed with non-taskmanager related error - reset storage type to reflect situation
$data = Property::getVmStoreConfig();
if (isset($data['storetype'])) {
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index 2af73872..f055d384 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -127,14 +127,21 @@ class Trigger
}
if ($storetype === 'nfs') {
$addr = $vmstore['nfsaddr'];
+ $opts = 'nfsopts';
} elseif ($storetype === 'cifs') {
$addr = $vmstore['cifsaddr'];
+ $opts = 'cifsopts';
} else {
+ $opts = null;
$addr = 'null';
}
+ if (isset($vmstore[$opts])) {
+ $opts = $vmstore[$opts];
+ }
return Taskmanager::submit('MountVmStore', array(
'address' => $addr,
'type' => 'images',
+ 'opts' => $opts,
'username' => $vmstore['cifsuser'],
'password' => $vmstore['cifspasswd']
));