summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-12-16 18:52:43 +0100
committerSimon Rettberg2019-12-16 18:52:43 +0100
commit85a5abee202ff8e5fa21334aeaba15d6a4e31c10 (patch)
tree28999325c49baf88190ad175c254e093d38b9ac2
parentUpdate gitignore (diff)
downloadtmlite-bwlp-85a5abee202ff8e5fa21334aeaba15d6a4e31c10.tar.gz
tmlite-bwlp-85a5abee202ff8e5fa21334aeaba15d6a4e31c10.tar.xz
tmlite-bwlp-85a5abee202ff8e5fa21334aeaba15d6a4e31c10.zip
[MountVmStore] Add support for dnbd3 with no NFS fallback
Don't enable the /srv/openslx/nfs export on the server if internal storage is being used, but NFS fallback is disabled.
-rwxr-xr-xscripts/mount-store4
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java3
2 files changed, 7 insertions, 0 deletions
diff --git a/scripts/mount-store b/scripts/mount-store
index b19ec83..3c25e27 100755
--- a/scripts/mount-store
+++ b/scripts/mount-store
@@ -68,6 +68,10 @@ storage_test () {
}
enable_nfs_export () {
+ if [ -n "$TM_NOLOCALNFS" ]; then
+ disable_nfs_export
+ return
+ fi
# Enable nfs server
systemctl enable nfs-kernel-server.service
# Enable our export
diff --git a/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java b/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java
index 11c15db..e0a998a 100644
--- a/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java
+++ b/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java
@@ -22,6 +22,8 @@ public class MountVmStore extends SystemCommandTask
private String username = null;
@Expose
private String password = null;
+ @Expose
+ private boolean localNfs = true;
private Output status = new Output();
@@ -65,6 +67,7 @@ public class MountVmStore extends SystemCommandTask
{
environment.put( "TM_USERNAME", this.username );
environment.put( "TM_PASSWORD", this.password );
+ environment.put( "TM_NOLOCALNFS", this.localNfs ? "" : "1" );
if ( !Util.isEmpty( this.opts ) ) {
environment.put( "TM_MOUNT_OPTIONS", this.opts );
}