diff options
author | Simon Rettberg | 2016-01-13 14:44:21 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-01-13 14:44:21 +0100 |
commit | 07760c3139584e4a93fc4e4b20fcb43ad1cc84cf (patch) | |
tree | 42cdebd6b9d7aa62989cf928c778ab5b5a36798e /dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java | |
parent | [client] also check if the return list of location is empty (diff) | |
download | tutor-module-07760c3139584e4a93fc4e4b20fcb43ad1cc84cf.tar.gz tutor-module-07760c3139584e4a93fc4e4b20fcb43ad1cc84cf.tar.xz tutor-module-07760c3139584e4a93fc4e4b20fcb43ad1cc84cf.zip |
[server] Make sure meta data is present at first startup
This prevents issues where only part of the meta data would be fetched
on startup, causing inconsistent behaviour. (Eg we have the OS list,
but not the virtualizer list)
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java')
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java | 20 |
1 files changed, 16 insertions, 4 deletions
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 66062303..2d9e73c9 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java @@ -57,7 +57,7 @@ public class App { LOGGER.fatal("Could not load configuration", e1); System.exit(1); } - + if (Identity.loadCertificate() == null) { LOGGER.error("Could not set up TLS/SSL requirements, exiting"); System.exit(1); @@ -96,9 +96,21 @@ public class App { Configuration.getMasterServerPort(), 30000); // Load useful things from master server - VirtualizerList.get(); - OrganizationList.get(); - OperatingSystemList.get(); + if (VirtualizerList.get() == null || VirtualizerList.get().isEmpty()) { + LOGGER.fatal("Could not get initial virtualizer list from master server." + + " Please make sure this server can connect to the internet."); + return; + } + if (OrganizationList.get() == null || OrganizationList.get().isEmpty()) { + LOGGER.fatal("Could not get initial organization list from master server." + + " Please make sure this server can connect to the internet."); + return; + } + if (OperatingSystemList.get() == null || OperatingSystemList.get().isEmpty()) { + LOGGER.fatal("Could not get initial operating system list from master server." + + " Please make sure this server can connect to the internet."); + return; + } // Start file transfer server if (!FileServer.instance().start()) { |