summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Client/Tools/Chkconfig.py1
-rw-r--r--src/lib/Bcfg2/Options.py2
-rw-r--r--src/lib/Bcfg2/Proxy.py2
-rw-r--r--src/lib/Bcfg2/Server/Plugin/helpers.py18
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py4
-rwxr-xr-xsrc/sbin/bcfg2-server6
6 files changed, 18 insertions, 15 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/Chkconfig.py b/src/lib/Bcfg2/Client/Tools/Chkconfig.py
index c3dcf7796..1fce5515b 100644
--- a/src/lib/Bcfg2/Client/Tools/Chkconfig.py
+++ b/src/lib/Bcfg2/Client/Tools/Chkconfig.py
@@ -21,6 +21,7 @@ class Chkconfig(Bcfg2.Client.Tools.SvcTool):
def VerifyService(self, entry, _):
"""Verify Service status for entry."""
+ entry.set('target_status', entry.get('status'))
if entry.get('status') == 'ignore':
return True
diff --git a/src/lib/Bcfg2/Options.py b/src/lib/Bcfg2/Options.py
index fd7c4421a..243c4ed2a 100644
--- a/src/lib/Bcfg2/Options.py
+++ b/src/lib/Bcfg2/Options.py
@@ -579,7 +579,7 @@ SERVER_PASSWORD = \
SERVER_PROTOCOL = \
Option('Server Protocol',
default='xmlrpc/ssl',
- cf=('communication', 'procotol'))
+ cf=('communication', 'protocol'))
SERVER_BACKEND = \
Option('Server Backend',
default='best',
diff --git a/src/lib/Bcfg2/Proxy.py b/src/lib/Bcfg2/Proxy.py
index 9246c0f87..f6db66a93 100644
--- a/src/lib/Bcfg2/Proxy.py
+++ b/src/lib/Bcfg2/Proxy.py
@@ -314,7 +314,7 @@ class XMLRPCTransport(xmlrpclib.Transport):
errcode = response.status
errmsg = response.reason
headers = response.msg
- except (socket.error, SSL_ERROR):
+ except (socket.error, SSL_ERROR, httplib.BadStatusLine):
err = sys.exc_info()[1]
raise ProxyError(xmlrpclib.ProtocolError(host + handler,
408,
diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py
index b14968d77..81dc1d736 100644
--- a/src/lib/Bcfg2/Server/Plugin/helpers.py
+++ b/src/lib/Bcfg2/Server/Plugin/helpers.py
@@ -41,15 +41,15 @@ del DEFAULT_FILE_METADATA['configfile']
LOGGER = logging.getLogger(__name__)
#: a compiled regular expression for parsing info and :info files
-INFO_REGEX = re.compile(r'owner:(\s)*(?P<owner>\S+)|' +
- r'group:(\s)*(?P<group>\S+)|' +
- r'mode:(\s)*(?P<mode>\w+)|' +
- r'secontext:(\s)*(?P<secontext>\S+)|' +
- r'paranoid:(\s)*(?P<paranoid>\S+)|' +
- r'sensitive:(\s)*(?P<sensitive>\S+)|' +
- r'encoding:(\s)*(?P<encoding>\S+)|' +
- r'important:(\s)*(?P<important>\S+)|' +
- r'mtime:(\s)*(?P<mtime>\w+)|')
+INFO_REGEX = re.compile(r'owner:\s*(?P<owner>\S+)|' +
+ r'group:\s*(?P<group>\S+)|' +
+ r'mode:\s*(?P<mode>\w+)|' +
+ r'secontext:\s*(?P<secontext>\S+)|' +
+ r'paranoid:\s*(?P<paranoid>\S+)|' +
+ r'sensitive:\s*(?P<sensitive>\S+)|' +
+ r'encoding:\s*(?P<encoding>\S+)|' +
+ r'important:\s*(?P<important>\S+)|' +
+ r'mtime:\s*(?P<mtime>\w+)')
def bind_info(entry, metadata, infoxml=None, default=DEFAULT_FILE_METADATA):
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py b/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py
index ffe93c25b..c6ac9d8dc 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py
@@ -520,7 +520,9 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet,
return
elif hdlr.ignore(event, basename=self.path):
return
- elif action == 'changed':
+ # we only get here if event.filename in self.entries, so handle
+ # created event like changed
+ elif action == 'changed' or action == 'created':
self.entries[event.filename].handle_event(event)
return
elif action == 'deleted':
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index 21f7842ec..4c4a71fa7 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -37,8 +37,8 @@ def main():
coremodule = backends[setup['backend']]
try:
- Core = getattr(__import__("Bcfg2.Server.%s" % coremodule).Server,
- coremodule).Core
+ corecls = getattr(__import__("Bcfg2.Server.%s" % coremodule).Server,
+ coremodule).Core
except ImportError:
err = sys.exc_info()[1]
print("Unable to import %s server core: %s" % (setup['backend'], err))
@@ -49,7 +49,7 @@ def main():
raise
try:
- core = Core(setup)
+ core = corecls(setup)
core.run()
except CoreInitError:
msg = sys.exc_info()[1]