On 08/08/2012 11:02 PM, John Dennis wrote:
> All the issues Martin discovered (except for the ip-address parameter) are now
> fixed and pushed to the dn repo. Also now the dn repo is fully rebased against
> master (except for one commit for ticket 2954 which I had to revert, see 
> ticket
> for details).
> 
> Thank you for the continued testing.
> 
> FYI: to use the dn repo:
> 
> git clone git://fedorapeople.org/~jdennis/freeipa.dn.git
> git checkout dn
> 

Good. I see that all issues except the ipa-replica-prepare are now fixed. I
verified that this is indeed an issue caused by the DN refactoring, I am
attaching a patch fixing the issue. With this patch, ipa-replica-prepare issue
disappears.

Petr Vobornik also noticed an issue with trust-show command. I am attaching a
patch with fix as well. We push the patches when we are pushing your work.

I have not found any more show-stopping issues, so I will just continue my
testing, and also give space to other testers in case they discover something 
else.

Martin
>From 693366a012179dc393687d0bd6b7e39ea967265c Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Thu, 9 Aug 2012 07:01:04 -0400
Subject: [PATCH 1/2] Fix DN usage in adtrust-show command

---
 ipalib/plugins/trust.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
index 87c40c861fd6a91151863769811eecdcd9122c42..b2facd8eb5cb6003ce4c542a4853dbd52277f469 100644
--- a/ipalib/plugins/trust.py
+++ b/ipalib/plugins/trust.py
@@ -109,7 +109,7 @@ class trust(LDAPObject):
 def make_trust_dn(env, trust_type, dn):
     if trust_type in trust.trust_types:
         container_dn = DN(('cn', trust_type), env.container_trusts, env.basedn)
-        return unicode(DN(DN(dn)[0], container_dn))
+        return DN(DN(dn)[0], container_dn)
     return dn
 
 class trust_add(LDAPCreate):
-- 
1.7.10.4

>From 3ac25f77a7b98b32117a3eda78c56db7e9b8d711 Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Thu, 9 Aug 2012 08:34:32 -0400
Subject: [PATCH 2/2] Do not crash in ipa-replica-prepare DNS phase

ipa-replica-prepare was not able to create a replica info file
when DNS records were required. The problem was in incorrect
extraction of master's FQDN in get_dns_masters function in DNS
plugin and incorrect ip_address unicode conversion in bindinstance.
Both issues were fixed.
---
 ipalib/plugins/dns.py             |    2 +-
 ipaserver/install/bindinstance.py |   10 ++++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index e70b36c29abcc422ac15e734ca0ad549b2a07e68..991eb0164710c9023a6e7f13f18447a70de3c66b 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -2067,7 +2067,7 @@ class dnsrecord(LDAPObject):
                 master_dn = entry[0]
                 assert isinstance(master_dn, DN)
                 try:
-                    master = master_dn[0]['cn']
+                    master = master_dn[1]['cn']
                     dns_masters.append(master)
                 except (IndexError, KeyError):
                     pass
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index b93a32f53e91fe9a724bc20ee30bc924aed9fcd4..2e00f70b1e5530e1b243a2df6e1214bea30eb1ba 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -291,11 +291,14 @@ def add_zone(name, zonemgr=None, dns_backup=None, ns_hostname=None, ns_ip_addres
         ns_main = ns_hostname
         ns_replicas = []
 
+    if ns_ip_address is not None:
+        ns_ip_address = unicode(ns_ip_address)
+
     try:
         api.Command.dnszone_add(unicode(name),
                                 idnssoamname=unicode(ns_main+'.'),
                                 idnssoarname=unicode(zonemgr),
-                                ip_address=unicode(ns_ip_address),
+                                ip_address=ns_ip_address,
                                 idnsallowdynupdate=True,
                                 idnsupdatepolicy=unicode(update_policy),
                                 idnsallowquery=u'any',
@@ -332,11 +335,14 @@ def add_reverse_zone(zone, ns_hostname=None, ns_ip_address=None,
         ns_main = ns_hostname
         ns_replicas = []
 
+    if ns_ip_address is not None:
+        ns_ip_address = unicode(ns_ip_address)
+
     try:
         api.Command.dnszone_add(unicode(zone),
                                 idnssoamname=unicode(ns_main+'.'),
                                 idnsallowdynupdate=True,
-                                ip_address=unicode(ns_ip_address),
+                                ip_address=ns_ip_address,
                                 idnsupdatepolicy=unicode(update_policy),
                                 idnsallowquery=u'any',
                                 idnsallowtransfer=u'none',)
-- 
1.7.10.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to