From 211f6c9046ab9b43c7f40e279db7c5595ae70bd1 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Fri, 7 Dec 2012 16:44:32 +0100 Subject: Stop and disable conflicting time&date services Fedora 16 introduced chrony as default client time&date synchronization service: http://fedoraproject.org/wiki/Features/ChronyDefaultNTP Thus, there may be people already using chrony as their time and date synchronization service before installing IPA. However, installing IPA server or client on such machine may lead to unexpected behavior, as the IPA installer would configure ntpd and leave the machine with both ntpd and chronyd enabled. However, since the OS does not allow both chronyd and ntpd to be running concurrently and chronyd has the precedence, ntpd would not be run on that system at all. Make sure, that user is warned when trying to install IPA on such system and is given a possibility to either not to let IPA configure ntpd at all or to let the installer stop and disable chronyd. https://fedorahosted.org/freeipa/ticket/2974 --- install/tools/ipa-replica-install | 13 +++++++++++++ install/tools/ipa-server-install | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'install') diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install index 7d7115cfd..b09cbca43 100755 --- a/install/tools/ipa-replica-install +++ b/install/tools/ipa-replica-install @@ -49,6 +49,7 @@ from ipapython import services as ipaservices from ipapython.ipa_log_manager import * from ipapython import dogtag from ipapython.dn import DN +import ipaclient.ntpconf log_file_name = "/var/log/ipareplica-install.log" CACERT = "/etc/ipa/ca.crt" @@ -438,6 +439,17 @@ def main(): check_dirsrv() + if options.conf_ntp: + try: + ipaclient.ntpconf.check_timedate_services() + except ipaclient.ntpconf.NTPConflictingService, e: + print "WARNING: conflicting time&date synchronization service '%s'" \ + " will" % e.conflicting_service + print "be disabled in favor of ntpd" + print "" + except ipaclient.ntpconf.NTPConfigurationError: + pass + # get the directory manager password dirman_password = options.password if not dirman_password: @@ -613,6 +625,7 @@ def main(): # Configure ntpd if options.conf_ntp: + ipaclient.ntpconf.force_ntpd(sstore) ntp = ntpinstance.NTPInstance() ntp.create_instance() diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 306d1e07b..dcf751904 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -68,6 +68,8 @@ from ipapython import services as ipaservices from ipapython.ipa_log_manager import * from ipapython.dn import DN +import ipaclient.ntpconf + pw_name = None uninstalling = False installation_cleanup = True @@ -507,6 +509,9 @@ def uninstall(): # ipa-client-install removes /etc/ipa/default.conf sstore._load() + + ipaclient.ntpconf.restore_forced_ntpd(sstore) + group_exists = sstore.restore_state("install", "group_exists") ipaservices.knownservices.ipa.disable() @@ -715,6 +720,17 @@ def main(): # Make sure the 389-ds ports are available check_dirsrv(options.unattended) + if options.conf_ntp: + try: + ipaclient.ntpconf.check_timedate_services() + except ipaclient.ntpconf.NTPConflictingService, e: + print "WARNING: conflicting time&date synchronization service '%s'" \ + " will be disabled" % e.conflicting_service + print "in favor of ntpd" + print "" + except ipaclient.ntpconf.NTPConfigurationError: + pass + realm_name = "" host_name = "" domain_name = "" @@ -907,6 +923,7 @@ def main(): # Configure ntpd if options.conf_ntp: + ipaclient.ntpconf.force_ntpd(sstore) ntp = ntpinstance.NTPInstance(fstore) if not ntp.is_configured(): ntp.create_instance() -- cgit