Re: [Freeipa-devel] Ipatests fixes
On 04/22/2014 12:54 PM, Tomas Babej wrote: On 04/18/2014 01:14 PM, Petr Viktorin wrote: [...] There are some test failures in ipatests/test_integration/test_testconfig.py that I missed. This patch fixes them. Does it look good to you? Yes, thank you for the catch. ACK. Thanks, pushed to: master: d28d37ebdb7f454451975efbd55bceb6c3533430 ipa-3-3: 794d0030328b587a85276d872383bc0888549edb -- Petr³ ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] Ipatests fixes
On 04/18/2014 01:14 PM, Petr Viktorin wrote: > On 04/17/2014 04:31 PM, Petr Viktorin wrote: >> On 04/17/2014 12:22 PM, Tomas Babej wrote: >>> On 04/09/2014 01:33 PM, Petr Viktorin wrote: On 04/09/2014 12:07 PM, Tomas Babej wrote: > Hi, > > the following batch deals with the following: > > * cleans up apache's semaphores prior to installing IPA (CA > install can > get stuck when IPA is reinstalled many times) What happens if Apache is running for some reason? Should we also stop it before deleting the semaphores? >>> >>> Agreed, if for any reason apache is running, we should stop it >>> beforehand. Fixed. >>> > * allows to pass extra arguments to install_client task Please avoid mutable argument defaults; use `extra_args=()` and then `list(extra_args)` >>> >>> Fixed. >>> > * uses trailing dot in the hostname as fqdn which should not be > overridden by domain name ACK. > * fixes incorrect assert for UIDs/GIDs in legacy client tests ACK, this fixes a lot of failures (though not all of them yet). >>> >>> Updated patches attached. >>> >> >> ACK, pushed to: >> master: f74ab3cba2b02e4726519e602f7de4fc86fca2d1 >> ipa-3-3: be8f4768877168720d051ba94c3e908af67f1306 > > There are some test failures in > ipatests/test_integration/test_testconfig.py that I missed. This patch > fixes them. Does it look good to you? > > Yes, thank you for the catch. ACK. -- Tomas Babej Associate Software Engineer | Red Hat | Identity Management RHCE | Brno Site | IRC: tbabej | freeipa.org ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] Ipatests fixes
On 04/17/2014 04:31 PM, Petr Viktorin wrote: On 04/17/2014 12:22 PM, Tomas Babej wrote: On 04/09/2014 01:33 PM, Petr Viktorin wrote: On 04/09/2014 12:07 PM, Tomas Babej wrote: Hi, the following batch deals with the following: * cleans up apache's semaphores prior to installing IPA (CA install can get stuck when IPA is reinstalled many times) What happens if Apache is running for some reason? Should we also stop it before deleting the semaphores? Agreed, if for any reason apache is running, we should stop it beforehand. Fixed. * allows to pass extra arguments to install_client task Please avoid mutable argument defaults; use `extra_args=()` and then `list(extra_args)` Fixed. * uses trailing dot in the hostname as fqdn which should not be overridden by domain name ACK. * fixes incorrect assert for UIDs/GIDs in legacy client tests ACK, this fixes a lot of failures (though not all of them yet). Updated patches attached. ACK, pushed to: master: f74ab3cba2b02e4726519e602f7de4fc86fca2d1 ipa-3-3: be8f4768877168720d051ba94c3e908af67f1306 There are some test failures in ipatests/test_integration/test_testconfig.py that I missed. This patch fixes them. Does it look good to you? -- Petr³ From 7cf9e3f825b8b98fa30d97201b07243240c70d0f Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 18 Apr 2014 12:48:49 +0200 Subject: [PATCH] test_integration.host: Export the hostname to dict as string Our tests do strict type-checking, using unicode string causes failures. --- ipatests/test_integration/host.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py index 94440c1875654a6866e25f173b27b9fedd5d5945..7a3a6ac77565cedddc416713d53ee5647c6f3e61 100644 --- a/ipatests/test_integration/host.py +++ b/ipatests/test_integration/host.py @@ -142,7 +142,7 @@ def from_dict(cls, dct, domain): def to_dict(self): return { -'name': self.hostname, +'name': str(self.hostname), 'ip': self.ip, 'role': self.role, 'external_hostname': self.external_hostname, -- 1.9.0 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] Ipatests fixes
On 04/17/2014 12:22 PM, Tomas Babej wrote: On 04/09/2014 01:33 PM, Petr Viktorin wrote: On 04/09/2014 12:07 PM, Tomas Babej wrote: Hi, the following batch deals with the following: * cleans up apache's semaphores prior to installing IPA (CA install can get stuck when IPA is reinstalled many times) What happens if Apache is running for some reason? Should we also stop it before deleting the semaphores? Agreed, if for any reason apache is running, we should stop it beforehand. Fixed. * allows to pass extra arguments to install_client task Please avoid mutable argument defaults; use `extra_args=()` and then `list(extra_args)` Fixed. * uses trailing dot in the hostname as fqdn which should not be overridden by domain name ACK. * fixes incorrect assert for UIDs/GIDs in legacy client tests ACK, this fixes a lot of failures (though not all of them yet). Updated patches attached. ACK, pushed to: master: f74ab3cba2b02e4726519e602f7de4fc86fca2d1 ipa-3-3: be8f4768877168720d051ba94c3e908af67f1306 -- Petr³ ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] Ipatests fixes
On 04/09/2014 01:33 PM, Petr Viktorin wrote: > On 04/09/2014 12:07 PM, Tomas Babej wrote: >> Hi, >> >> the following batch deals with the following: >> >> * cleans up apache's semaphores prior to installing IPA (CA install can >> get stuck when IPA is reinstalled many times) > > What happens if Apache is running for some reason? Should we also stop > it before deleting the semaphores? Agreed, if for any reason apache is running, we should stop it beforehand. Fixed. > >> * allows to pass extra arguments to install_client task > > Please avoid mutable argument defaults; use `extra_args=()` and then > `list(extra_args)` Fixed. > >> * uses trailing dot in the hostname as fqdn which should not be >> overridden by domain name > > ACK. > >> * fixes incorrect assert for UIDs/GIDs in legacy client tests > > ACK, this fixes a lot of failures (though not all of them yet). > Updated patches attached. -- Tomas Babej Associate Software Engineer | Red Hat | Identity Management RHCE | Brno Site | IRC: tbabej | freeipa.org >From b066d30c5d34665ecc308edf4d53b60d012a4d1a Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Mon, 7 Apr 2014 12:40:52 +0200 Subject: [PATCH] ipatests: Fix apache semaphores prior to installing IPA server --- ipatests/test_integration/tasks.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index d03ee6021fb34f8292814b23ea4e8fdd4606a90b..7f738e3d02fda6254502acb5eb3b3bbafdec3671 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -111,6 +111,18 @@ def fix_resolv_conf(host): host.put_file_contents('/etc/resolv.conf', contents) +def fix_apache_semaphores(master): +systemd_available = master.transport.file_exists('/bin/systemctl') + +if systemd_available: +master.run_command(['systemctl', 'stop', 'httpd'], raiseonerr=False) +else: +master.run_command(['/sbin/service', 'httpd', 'stop'], raiseonerr=False) + +master.run_command('for line in `ipcs -s | grep apache | cut -d " " -f 2`; ' + 'do ipcrm -s $line; done', raiseonerr=False) + + def unapply_fixes(host): restore_files(host) restore_hostname(host) @@ -179,6 +191,7 @@ def install_master(host): host.collect_log('/var/log/dirsrv/slapd-%s/access' % inst) apply_common_fixes(host) +fix_apache_semaphores(host) host.run_command(['ipa-server-install', '-U', '-r', host.domain.name, @@ -197,6 +210,7 @@ def install_replica(master, replica, setup_ca=True): replica.collect_log('/var/log/ipareplica-conncheck.log') apply_common_fixes(replica) +fix_apache_semaphores(replica) master.run_command(['ipa-replica-prepare', '-p', replica.config.dirman_password, -- 1.8.5.3 >From 45352650c97b182354c00837b3d7de4bf0e0ad1c Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Mon, 7 Apr 2014 13:36:10 +0200 Subject: [PATCH] ipatests: tasks: Accept extra arguments when installing client --- ipatests/test_integration/tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index 7f738e3d02fda6254502acb5eb3b3bbafdec3671..2334e254e7ddd00beeb83d8a317b5db12c06a29e 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -236,7 +236,7 @@ def install_replica(master, replica, setup_ca=True): kinit_admin(replica) -def install_client(master, client): +def install_client(master, client, extra_args=()): client.collect_log('/var/log/ipaclient-install.log') apply_common_fixes(client) @@ -246,7 +246,8 @@ def install_client(master, client): '--realm', client.domain.realm, '-p', client.config.admin_name, '-w', client.config.admin_password, -'--server', master.hostname]) +'--server', master.hostname] ++ list(extra_args)) kinit_admin(client) -- 1.8.5.3 >From 3ffa1732b77484612282d8e1598317f172221ff1 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Mon, 7 Apr 2014 21:37:09 +0200 Subject: [PATCH] ipatests: Allow using FQDN with trailing dot as final hostname When creating a BaseHost instance, the machine's hostname was reconfigured to have the same shortname prepended the domain name of the domain where it was defined. However, it makes sense in certain use cases to define hosts that have hostnames other than belonging directly in the domain they were defined in. Treat input hostnames with trailing dots as static FQDNs that will not be changed by the name of the domain they were defined in. --- ipatests/test_integration/host.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py index a57e3763c53f5e
Re: [Freeipa-devel] Ipatests fixes
On 04/09/2014 12:07 PM, Tomas Babej wrote: Hi, the following batch deals with the following: * cleans up apache's semaphores prior to installing IPA (CA install can get stuck when IPA is reinstalled many times) What happens if Apache is running for some reason? Should we also stop it before deleting the semaphores? * allows to pass extra arguments to install_client task Please avoid mutable argument defaults; use `extra_args=()` and then `list(extra_args)` * uses trailing dot in the hostname as fqdn which should not be overridden by domain name ACK. * fixes incorrect assert for UIDs/GIDs in legacy client tests ACK, this fixes a lot of failures (though not all of them yet). -- Petr³ ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel