diff options
author | Petr Spacek <pspacek@redhat.com> | 2016-02-02 17:20:21 +0100 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2016-02-02 18:21:31 +0100 |
commit | 72e4a360fc0a31dd53d257350b3f490cc3ed07e4 (patch) | |
tree | 349d923ca98099348f27e36805ddc3b3a82899af | |
parent | 348c400484cafe4969c3fa0c9f0c6f6e150df821 (diff) | |
download | freeipa-72e4a360fc0a31dd53d257350b3f490cc3ed07e4.tar.gz freeipa-72e4a360fc0a31dd53d257350b3f490cc3ed07e4.tar.xz freeipa-72e4a360fc0a31dd53d257350b3f490cc3ed07e4.zip |
Fix ipa-adtrust-install to always generate SRV records with FQDNs
Previous code failed in following setup:
* IPA domain = ipa.example.com
* IPA master = vm1.example.com
* IPA replica = vm2.example.com
https://fedorahosted.org/freeipa/ticket/5663
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
-rw-r--r-- | ipaserver/install/adtrustinstance.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py index 118f848cf..9e7e001f7 100644 --- a/ipaserver/install/adtrustinstance.py +++ b/ipaserver/install/adtrustinstance.py @@ -571,12 +571,7 @@ class ADTRUSTInstance(service.Service): """ zone = self.domain_name - host, host_domain = self.fqdn.split(".", 1) - - if normalize_zone(zone) == normalize_zone(host_domain): - host_in_rr = host - else: - host_in_rr = normalize_zone(self.fqdn) + host_in_rr = normalize_zone(self.fqdn) priority = 0 @@ -707,7 +702,7 @@ class ADTRUSTInstance(service.Service): # this is CIFS service of a different host in our # REALM, we need to remember it to announce via # SRV records for _msdcs - self.cifs_hosts.append(fqdn.split(".")[0]) + self.cifs_hosts.append(normalize_zone(fqdn)) except Exception as e: root_logger.critical("Checking replicas for cifs principals failed with error '%s'" % e) |