summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-29 18:37:20 +0200
committerSimon Rettberg2015-09-29 18:37:20 +0200
commitb45db96450c314d9842e160225b49190d509a1a8 (patch)
treebf4a76ad7aa42bbf1316d6466686e9dac930cdd7
parentUpdate dozmod-upgrade.sql (diff)
downloadtmlite-bwlp-b45db96450c314d9842e160225b49190d509a1a8.tar.gz
tmlite-bwlp-b45db96450c314d9842e160225b49190d509a1a8.tar.xz
tmlite-bwlp-b45db96450c314d9842e160225b49190d509a1a8.zip
[MountVmStore] Timeout quicker, return exit code in status
-rwxr-xr-xscripts/mount-store2
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java4
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/mount-store b/scripts/mount-store
index cb6b769..e0ce839 100755
--- a/scripts/mount-store
+++ b/scripts/mount-store
@@ -117,7 +117,7 @@ if grep -E -q '^[^/].+:.+' <<<$SOURCE; then
# seems to be NFS
for opt in vers=4 vers=3; do
echo " * Trying ${opt}..."
- mount -v -t nfs -o rw,noatime,noexec,nodev,async,nolock,$opt,fg,ac,retry=1,timeo=150,sec=sys "$SOURCE" "$DEST"
+ mount -v -t nfs -o rw,noatime,noexec,nodev,async,nolock,$opt,fg,ac,retry=0,timeo=200,sec=sys "$SOURCE" "$DEST"
RET=$?
[ "$RET" -ne "0" ] && continue
echo "Mount succeeded, checking write permissions...."
diff --git a/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java b/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java
index 5d075d6..ba6e4b1 100644
--- a/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java
+++ b/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java
@@ -63,6 +63,7 @@ public class MountVmStore extends SystemCommandTask
isRunning.set( false );
if ( exitCode != 0 )
status.addMessage( "Failed with exit code " + exitCode );
+ status.exitCode = exitCode;
return exitCode == 0;
}
@@ -80,7 +81,8 @@ public class MountVmStore extends SystemCommandTask
class Output
{
- private String messages = null;
+ public String messages = null;
+ public int exitCode = -111;
private void addMessage( String str )
{