Easytest! :-)

-- 
Petr^2 Spacek
From 8c9af1e8e15f0b0a37c554bbbfab176b9558f943 Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Thu, 18 Jun 2015 12:56:09 +0200
Subject: [PATCH] Improve error messages about reverse address resolution in
 ipa-replica-prepare

---
 ipaserver/install/installutils.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index 5fb2bb29fa123d137e3605709690024d62767ad2..42df2b7119c0e74a2b85b1a6f835f9d2c707b6f4 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -195,12 +195,18 @@ def verify_fqdn(host_name, no_host_dns=False, local_hostname=True):
             revname = socket.gethostbyaddr(address)[0]
         except Exception, e:
             root_logger.debug('Check failed: %s', e)
-            raise HostReverseLookupError("Unable to resolve the reverse ip address, check /etc/hosts or DNS name resolution")
+            raise HostReverseLookupError(
+                "Unable to resolve the IP address %s to a host name, "
+                "check /etc/hosts and DNS name resolution" % address)
         root_logger.debug('Found reverse name: %s', revname)
         if revname != host_name:
-            raise HostReverseLookupError("The host name %s does not match the reverse lookup %s" % (host_name, revname))
+            raise HostReverseLookupError(
+                "The host name %s does not match the value %s obtained "
+                "by reverse lookup on IP address %s"
+                % (host_name, revname, address))
         verified.add(address)
 
+
 def record_in_hosts(ip, host_name=None, conf_file=paths.HOSTS):
     """
     Search record in /etc/hosts - static table lookup for hostnames
-- 
2.1.0

From 6bf72e93854d85a90b26e520db896a67eb60b5f7 Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Thu, 18 Jun 2015 13:07:06 +0200
Subject: [PATCH] Clarify recommendation about --ip-address option in
 ipa-replica-prepapre

---
 ipaserver/install/ipa_replica_prepare.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ipaserver/install/ipa_replica_prepare.py b/ipaserver/install/ipa_replica_prepare.py
index da492a96be3b618e78a3294ae924ed212ea448f5..2e81839e2b5702f2e5cf7f12d635f28272a28bf9 100644
--- a/ipaserver/install/ipa_replica_prepare.py
+++ b/ipaserver/install/ipa_replica_prepare.py
@@ -231,8 +231,9 @@ class ReplicaPrepare(admintool.AdminTool):
                             api.env.host, api.env.basedn,
                             dm_password=self.dirman_password,
                             ldapi=True, realm=api.env.realm):
-                        self.log.info('Add the --ip-address argument to '
-                            'create a DNS entry.')
+                        self.log.info('You might use the --ip-address option '
+                                      'to create a DNS entry if the DNS zone '
+                                      'is managed by IPA.')
                     raise
                 else:
                     # The host doesn't exist in DNS but we're adding it.
-- 
2.1.0

From d6b8ce7a8026e500f9204d5372ceae2ebbb0d1e1 Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Thu, 18 Jun 2015 13:13:45 +0200
Subject: [PATCH] Clarify error messages in ipa-replica-prepare:
 add_dns_records()

---
 ipaserver/install/ipa_replica_prepare.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ipaserver/install/ipa_replica_prepare.py b/ipaserver/install/ipa_replica_prepare.py
index 2e81839e2b5702f2e5cf7f12d635f28272a28bf9..3a2975bf66f593d9f0429b78d046f0021295006b 100644
--- a/ipaserver/install/ipa_replica_prepare.py
+++ b/ipaserver/install/ipa_replica_prepare.py
@@ -482,7 +482,7 @@ class ReplicaPrepare(admintool.AdminTool):
             add_zone(domain)
         except errors.PublicError, e:
             raise admintool.ScriptError(
-                "Could not create forward DNS zone for the replica: %s" % e)
+                "Could not create master DNS zone for the replica: %s" % e)
 
         for reverse_zone in options.reverse_zones:
             self.log.info("Adding reverse zone %s", reverse_zone)
@@ -494,15 +494,15 @@ class ReplicaPrepare(admintool.AdminTool):
                 add_fwd_rr(domain, name, ip_address)
             except errors.PublicError, e:
                 raise admintool.ScriptError(
-                    "Could not add forward DNS record for the replica: %s" % e)
+                    "Could not add A/AAAA DNS record for the replica: %s" % e)
 
             if not options.no_reverse:
                 reverse_zone = bindinstance.find_reverse_zone(ip)
                 try:
                     add_ptr_rr(reverse_zone, ip_address, self.replica_fqdn)
                 except errors.PublicError, e:
                     raise admintool.ScriptError(
-                        "Could not add reverse DNS record for the replica: %s"
+                        "Could not add PTR DNS record for the replica: %s"
                         % e)
 
     def check_dns(self, replica_fqdn):
-- 
2.1.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to