summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-07-28 13:34:15 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-07-28 13:34:15 +0000
commit209841df3fbada4f15cdf36070c63e63c3ead6e5 (patch)
tree2d09359ce488b0fba84dac2aaa9539904097b679
parent1049d714925d88f33c9c22cfd43f95526b97f52d (diff)
downloadbcfg2-209841df3fbada4f15cdf36070c63e63c3ead6e5.tar.gz
bcfg2-209841df3fbada4f15cdf36070c63e63c3ead6e5.tar.bz2
bcfg2-209841df3fbada4f15cdf36070c63e63c3ead6e5.zip
bcfg2-server: Improve startup error handling (Patch from Mike McCallister) (Resolves Ticket #695)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5391 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Core.py1
-rwxr-xr-xsrc/sbin/bcfg2-server3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index 1360bdf23..434243c20 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -80,6 +80,7 @@ class Core(Component):
if len(mlist) == 1:
self.metadata = mlist[0]
else:
+ logger.error("No Metadata Plugin loaded; failed to instantiate Core")
raise CoreInitError, "No Metadata Plugin"
self.statistics = [plugin for plugin in self.plugins.values() if \
isinstance(plugin, Bcfg2.Server.Plugin.Statistics)]
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index 0439ab2e6..e5ea5c184 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -62,6 +62,9 @@ if __name__ == '__main__':
certfile=setup['cert'],
ca=setup['ca'],
)
+ except CoreInitError, msg:
+ logger.error(msg)
+ logger.error("exiting")
except KeyboardInterrupt:
sys.exit(1)
sys.exit(0)