Hi Martin

On 10/07/2015 04:30 PM, Martin Basti wrote:


On 10/07/2015 04:13 PM, Oleg Fayans wrote:
subj



Workaround looks good, but I prefer not to push it in upstream tests,
because it is not test failure.
I agree, we should rather fix the original issue. But as a temporary solution, to satisfy downstream, it could do.

Why is there this sleep, this might be useful in upstream tests too, but
what is the reason to add sleep there?

Without it I kept getting this error:
E CalledProcessError: Command '['drill', '@localhost', '-k', '/etc/trusted-key.key', '-S', 'example.test.', 'SOA']' returned non-zero exit status 29

with --pdb option, though, my attempts to re-run the command succeeded, so I assumed it was a timing issue, and indeed, this 1 second sleep helped.


          # verify signatures
+        time.sleep(1)
          args = [



Attached is an updated version of the patch with Martin's remarks taken into account

--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.
From 18c7fe38fcc2e064a77c257837775cfb6f5efe53 Mon Sep 17 00:00:00 2001
From: Oleg Fayans <ofay...@redhat.com>
Date: Thu, 8 Oct 2015 09:10:52 +0200
Subject: [PATCH] Fixed failure in requesting signed root zone info

After creating signed root zone, the server requires named.service restart for dig
requests to this zone to start displaying the key.

https://fedorahosted.org/freeipa/ticket/5348
---
 ipatests/test_integration/test_dnssec.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/ipatests/test_integration/test_dnssec.py b/ipatests/test_integration/test_dnssec.py
index 098b227f6543fa221ed6c75d1e98e9f056761977..afcbcf130a614aa580feca4ae4a61c4d1e667243 100644
--- a/ipatests/test_integration/test_dnssec.py
+++ b/ipatests/test_integration/test_dnssec.py
@@ -280,7 +280,10 @@ class TestInstallDNSSECFirst(IntegrationTest):
             "--ns-rec=" + self.master.hostname
         ]
         self.master.run_command(args)
-
+        # A workaround for https://fedorahosted.org/freeipa/ticket/5348
+        time.sleep(20)
+        self.master.run_command(["systemctl", "restart", "named-pkcs11.service"])
+        # End of workaround
         # test master
         assert wait_until_record_is_signed(
             self.master.ip, root_zone, self.log, timeout=100
@@ -303,8 +306,10 @@ class TestInstallDNSSECFirst(IntegrationTest):
         ]
 
         self.master.run_command(args)
-
-        # wait until zone is signed
+        # A workaround for https://fedorahosted.org/freeipa/ticket/5348
+        time.sleep(20)
+        self.master.run_command(["systemctl", "restart", "named-pkcs11.service"])
+        # End of workaround
         assert wait_until_record_is_signed(
             self.master.ip, example_test_zone, self.log, timeout=100
         ), "Zone %s is not signed (master)" % example_test_zone
@@ -382,6 +387,7 @@ class TestInstallDNSSECFirst(IntegrationTest):
                                            root_keys_rrset.to_text() + '\n')
 
         # verify signatures
+        time.sleep(1)
         args = [
             "drill", "@localhost", "-k",
             paths.DNSSEC_TRUSTED_KEY, "-S",
-- 
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