URL: https://github.com/freeipa/freeipa/pull/2733
Author: tiran
 Title: #2733: Use debug logger in ntpd_cleanup()
Action: opened

PR body:
"""
ipa-server-update shows spurious warnings when updating a server, e.g.

  No such file name in the index

  Warning: NTP service entry was not found in LDAP.

Lower all log levels in ntpd_cleanup() to debug to not confuse the user.

Fixes: https://pagure.io/freeipa/issue/7829
Signed-off-by: Christian Heimes <chei...@redhat.com>
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2733/head:pr2733
git checkout pr2733
From e4f4989c3e9c91cfe1fa0154a697a20c88214152 Mon Sep 17 00:00:00 2001
From: Christian Heimes <chei...@redhat.com>
Date: Tue, 8 Jan 2019 10:52:26 +0100
Subject: [PATCH] Use debug logger in ntpd_cleanup()

ipa-server-update shows spurious warnings when updating a server, e.g.

  No such file name in the index

  Warning: NTP service entry was not found in LDAP.

Lower all log levels in ntpd_cleanup() to debug to not confuse the user.

Fixes: https://pagure.io/freeipa/issue/7829
Signed-off-by: Christian Heimes <chei...@redhat.com>
---
 ipaserver/install/server/upgrade.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
index 18c2583557..ae6fcc77e7 100644
--- a/ipaserver/install/server/upgrade.py
+++ b/ipaserver/install/server/upgrade.py
@@ -1670,20 +1670,20 @@ def ntpd_cleanup(fqdn, fstore):
             instance.disable()
             instance.stop()
         except Exception as e:
-            logger.info("Service ntpd was not disabled or stopped")
+            logger.debug("Service ntpd was not disabled or stopped")
 
     for ntpd_file in [paths.NTP_CONF, paths.NTP_STEP_TICKERS,
                       paths.SYSCONFIG_NTPD]:
         try:
             fstore.restore_file(ntpd_file)
         except ValueError as e:
-            logger.warning(e)
+            logger.debug(e)
 
     try:
         api.Backend.ldap2.delete_entry(DN(('cn', 'NTP'), ('cn', fqdn),
                                        api.env.container_masters))
     except ipalib.errors.NotFound:
-        logger.warning("Warning: NTP service entry was not found in LDAP.")
+        logger.debug("NTP service entry was not found in LDAP.")
 
     ntp_role_instance = servroles.ServiceBasedRole(
          u"ntp_server_server",
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to