From 4084af390ae8dc7f24d5a3a8bcc46146ed89fb76 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 23 Sep 2015 18:02:06 +0200 Subject: [server] Periodically report that we're still waiting for the vm storage --- dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java | 2 +- .../src/main/java/org/openslx/bwlp/sat/util/FileSystem.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'dozentenmodulserver/src/main/java') diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java index 34f0bf38..97029e55 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java @@ -166,7 +166,7 @@ public class App { @Override public void run() { QuickTimer.cancel(); - LOGGER.info(new Date() + " - all Servers shut down, exiting...\n"); + LOGGER.info("All services and workers shut down, exiting..."); } }); } diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/util/FileSystem.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/util/FileSystem.java index 31ea52c0..fa72056a 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/util/FileSystem.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/util/FileSystem.java @@ -78,6 +78,7 @@ public class FileSystem { return true; LOGGER.warn("VM storage gone, waiting for it to reappear..."); int intrCount = 0; + long lastComplain = System.currentTimeMillis(); do { try { Thread.sleep(10000); @@ -89,6 +90,10 @@ public class FileSystem { return false; } } + if (System.currentTimeMillis() - lastComplain > 600000) { + lastComplain = System.currentTimeMillis(); + LOGGER.warn("Still waiting for storage..."); + } } while (!isStorageMounted()); } LOGGER.info("VM storage back online"); -- cgit v1.2.3-55-g7522