From 79432cbdc6546f66b2a641c5ac67da309f9b8d82 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 9 Nov 2017 17:50:45 -0500 Subject: [PATCH] Log contents of files created or modified by IPAChangeConf This will show the status of the files during an installation. This is particularly important during a replica install where default.conf gets written several times. Fixes: https://pagure.io/freeipa/issue/7218 Signed-off-by: Rob Crittenden Reviewed-By: Fraser Tweedale --- ipaclient/install/ipachangeconf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ipaclient/install/ipachangeconf.py b/ipaclient/install/ipachangeconf.py index 610cd5011..762661981 100644 --- a/ipaclient/install/ipachangeconf.py +++ b/ipaclient/install/ipachangeconf.py @@ -19,6 +19,7 @@ # import fcntl +import logging import os import shutil @@ -27,6 +28,8 @@ import six if six.PY3: unicode = str +logger = logging.getLogger(__name__) + def openLocked(filename, perms): fd = -1 try: @@ -506,6 +509,8 @@ class IPAChangeConf(object): f.close() except IOError: pass + logger.debug("Updating configuration file %s", file) + logger.debug(output) return True def newConf(self, file, options, file_perms=0o644): @@ -541,6 +546,8 @@ class IPAChangeConf(object): f.close() except IOError: pass + logger.debug("Writing configuration file %s", file) + logger.debug(output) return True @staticmethod