On 10/01/2015 02:48 PM, Martin Basti wrote:


On 10/01/2015 02:43 PM, Oleg Fayans wrote:
Hi Martin,

On 10/01/2015 11:18 AM, Martin Basti wrote:


On 09/30/2015 01:24 PM, Martin Basti wrote:


On 09/30/2015 12:19 PM, Oleg Fayans wrote:


On 09/30/2015 11:46 AM, Petr Spacek wrote:
On 29.9.2015 09:12, Oleg Fayans wrote:
+def prepare_reverse_zone(host, ip):
+    zone = get_reverse_zone_default(ip)
+    host.run_command(["ipa",
+                      "dnszone-add",
+                      zone,
+                      "--name-from-ip=%s" % ip], raiseonerr=False)

There is probably no point in specifying --name-from-ip because you
did that
already by calling get_reverse_zone_default(ip).

Agree. Fixed


Anyway, I'm not sure that this
+ prepare_reverse_zone(master, replica.ip)
will not break if the reverse zone already exists (think about case
where two
or more replicas are in the same subnet).

That's why I am using the raiseonerr=False here.


I did not test the code, I simply do not have time for it right now.




 LGTM, I will test it soon, but it needs rebase for ipa-4-2 branch


ACK, please send rebased version for ipa-4-2

Here it is

Pushed to ipa-4-2: c898c968d3979a0d8c2fe0db8e125dfc2268eba0
Pushed to master: 03d696f224642c1c4c4f1a434fecefd1c6270e37


In rebased patch for ipa-4-2 you removed import for function and I didn't noticed that.
This breaks builds of ipa-4-2.

Patch that fix this attached.

From 7c54dd6cd11dca3056bd0decc7bd6f70ce315f49 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Fri, 2 Oct 2015 16:07:02 +0200
Subject: [PATCH] Fix import get_reverse_zone_default in tasks

https://fedorahosted.org/freeipa/ticket/5306
---
 ipatests/test_integration/tasks.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index 5fc9329d62622eb6157c1e780687b3a2c5ecc4fd..c9ecf2645183d5f368694d3446ddf2853de22a2a 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -37,6 +37,7 @@ from ipapython.ipa_log_manager import log_mgr
 from ipatests.test_integration import util
 from ipatests.test_integration.env_config import env_to_script
 from ipatests.test_integration.host import Host
+from ipalib.util import get_reverse_zone_default
 
 log = log_mgr.get_logger(__name__)
 
-- 
2.4.3

-- 
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