diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-03-25 13:31:21 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-03-25 13:31:21 -0400 |
commit | 9c603d8267c0a511968a8a553d7fa0b2d5bf9b73 (patch) | |
tree | c473a7615586dc22d585bda67e118ed2fe535754 /src/lib/Bcfg2/Server/Core.py | |
parent | 3dc289678812238c2fcc54098b1d8de9bf64f900 (diff) | |
download | bcfg2-9c603d8267c0a511968a8a553d7fa0b2d5bf9b73.tar.gz bcfg2-9c603d8267c0a511968a8a553d7fa0b2d5bf9b73.tar.bz2 bcfg2-9c603d8267c0a511968a8a553d7fa0b2d5bf9b73.zip |
Handle FAM monitor failures more gracefully:
* Where possible, create the file or directory that is about to be
monitored. This ensures that content can be added later without
need to restart Bcfg2. (Otherwise, adding the monitor would fail,
and so when you did create the file in question, bcfg2-server would
never be notified of it.)
* When not possible, give better error messages.
Diffstat (limited to 'src/lib/Bcfg2/Server/Core.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Core.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py index 382f11e50..8ceb8cfc1 100644 --- a/src/lib/Bcfg2/Server/Core.py +++ b/src/lib/Bcfg2/Server/Core.py @@ -420,6 +420,10 @@ class BaseCore(object): except PluginInitError: self.logger.error("Failed to instantiate plugin %s" % plugin, exc_info=1) + except OSError: + err = sys.exc_info()[1] + self.logger.error("Failed to add a file monitor while " + "instantiating plugin %s: %s" % (plugin, err)) except: self.logger.error("Unexpected instantiation failure for plugin %s" % plugin, exc_info=1) |