diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/taskmanagercallback.inc.php | 3 | ||||
-rw-r--r-- | inc/trigger.inc.php | 7 |
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'] )); |