From 1d7f30a13e156ee1a359f6f59a4ff994eac1ca90 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 12 Nov 2021 15:55:54 +0100 Subject: [mount-store] Take greater care where the .notmounted flag is written While the task manager should make sure only one invocation if mount-store is running, add a few extra checks whether a mount-point is pulled under our feet, or mounted when we don't expect it. This includes making sure dmsd is not accessing the share while we're trying to manipulate it. --- src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java b/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java index d0530cc..791fcad 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java +++ b/src/main/java/org/openslx/taskmanager/tasks/MountVmStore.java @@ -47,7 +47,7 @@ public class MountVmStore extends SystemCommandTask @Override protected String[] initCommandLine() { - if ( !isRunning.compareAndSet( null, this ) ) { + while ( !isRunning.compareAndSet( null, this ) ) { MountVmStore current = isRunning.get(); if ( current != null ) { if ( current.equals( this ) ) { -- cgit v1.2.3-55-g7522