summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-11-13 17:13:37 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-11-13 17:13:37 +0000
commit2d772485a34d9076ed60e0e591346cd2d01fb46f (patch)
tree16fd2dfc56cac16c20084327be68833c8dbd9c9b /src
parent01a0b843e7056200761e746e5652d014e72be76c (diff)
downloadbcfg2-2d772485a34d9076ed60e0e591346cd2d01fb46f.tar.gz
bcfg2-2d772485a34d9076ed60e0e591346cd2d01fb46f.tar.bz2
bcfg2-2d772485a34d9076ed60e0e591346cd2d01fb46f.zip
Harden file monitoring option handling (Resolves Ticket #611 and reresolves #536)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4973 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Options.py2
-rw-r--r--src/lib/Server/Core.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py
index 54ff8bbcb..43f86956e 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -186,7 +186,7 @@ SERVER_GENERATORS = Option('Server generator list', cf=('server', 'generators'),
SERVER_STRUCTURES = Option('Server structure list', cf=('server', 'structures'),
default=['Bundler', 'Base'], cook=list_split)
SERVER_FILEMONITOR = Option('Server file monitor', cf=('server', 'filemonitor'),
- default='default')
+ default='default', odesc='File monitoring driver')
SERVER_LOCATION = Option('Server Location', cf=('components', 'bcfg2'),
default='https://localhost:6789', cmd='-S',
odesc='https://server:port')
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index e6d71c3bd..bd09dc53b 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -28,6 +28,9 @@ class Core(object):
encoding, filemonitor='default'):
object.__init__(self)
self.datastore = repo
+ if filemonitor not in Bcfg2.Server.FileMonitor.available:
+ logger.error("File monitor driver %s not available; forcing to default" % filemonitor)
+ filemonitor = 'default'
try:
self.fam = Bcfg2.Server.FileMonitor.available[filemonitor]()
except IOError: