Re: [Freeipa-devel] [PATCH 0155] ipatests: Kill winbindd process after uninstall
On 02/26/2014 12:40 PM, Alexander Bokovoy wrote: On Wed, 26 Feb 2014, Martin Kosek wrote: On 02/25/2014 07:15 PM, Alexander Bokovoy wrote: On Tue, 25 Feb 2014, Tomas Babej wrote: Hi, As a part of a better cleanup procedure in the integration tests, make sure that winbindd is not running after uninstalling the IPA server. Better patch 0140 attached. We simply need to stop and disable winbind in adtrustinstance.uninstall() Looks good to me (and a better approach than Tomas' 155 it seems). Since you are touching this section anyway, can you please also replace bare except with except Exception:? It will allow admin to CTRL+C the stopping process when needed. Sure, new patch is attached. There are two potentially long external processes executed in the uninstall() so I changed to 'except Exception:' in both. This is fine - ACK. I just removed the note about superseded Tomas' patch from your commit log, we do not need that note from git log history perspective. Pushed to master: e99fa380af7f257a319cbe6f8867bf258ab04e41 Martin ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0155] ipatests: Kill winbindd process after uninstall
On 02/25/2014 07:15 PM, Alexander Bokovoy wrote: On Tue, 25 Feb 2014, Tomas Babej wrote: Hi, As a part of a better cleanup procedure in the integration tests, make sure that winbindd is not running after uninstalling the IPA server. Better patch 0140 attached. We simply need to stop and disable winbind in adtrustinstance.uninstall() Looks good to me (and a better approach than Tomas' 155 it seems). Since you are touching this section anyway, can you please also replace bare except with except Exception:? It will allow admin to CTRL+C the stopping process when needed. Thanks, Martin ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0155] ipatests: Kill winbindd process after uninstall
On Wed, 26 Feb 2014, Martin Kosek wrote: On 02/25/2014 07:15 PM, Alexander Bokovoy wrote: On Tue, 25 Feb 2014, Tomas Babej wrote: Hi, As a part of a better cleanup procedure in the integration tests, make sure that winbindd is not running after uninstalling the IPA server. Better patch 0140 attached. We simply need to stop and disable winbind in adtrustinstance.uninstall() Looks good to me (and a better approach than Tomas' 155 it seems). Since you are touching this section anyway, can you please also replace bare except with except Exception:? It will allow admin to CTRL+C the stopping process when needed. Sure, new patch is attached. There are two potentially long external processes executed in the uninstall() so I changed to 'except Exception:' in both. -- / Alexander Bokovoy From 74b7d5a3ffe77e6430d1b6c0cd175fea708c1855 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy aboko...@redhat.com Date: Tue, 25 Feb 2014 20:11:50 +0200 Subject: [PATCH 3/5] adtrustinstance: make sure to stop and disable winbind in uninstall() This makes unnecessary Tomas' patch 0155. --- ipaserver/install/adtrustinstance.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py index 621e3fd..118b2fe 100644 --- a/ipaserver/install/adtrustinstance.py +++ b/ipaserver/install/adtrustinstance.py @@ -889,12 +889,15 @@ class ADTRUSTInstance(service.Service): self.restore_state(running) self.restore_state(enabled) +winbind = ipaservices.service(winbind) # Always try to stop and disable smb service, since we do not leave # working configuration after uninstall try: self.stop() self.disable() -except: +winbind.stop() +winbind.disable() +except Exception: pass # Since we do not guarantee restoring back to working samba state, @@ -907,7 +910,7 @@ class ADTRUSTInstance(service.Service): try: ipautil.run([/usr/sbin/setsebool, -P, var, sebool_state]) -except: +except Exception: self.print_msg(SELINUX_WARNING % dict(var=var)) # Remove samba's credentials cache -- 1.8.3.1 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
[Freeipa-devel] [PATCH 0155] ipatests: Kill winbindd process after uninstall
Hi, As a part of a better cleanup procedure in the integration tests, make sure that winbindd is not running after uninstalling the IPA server. -- Tomas Babej Associate Software Engeneer | Red Hat | Identity Management RHCE | Brno Site | IRC: tbabej | freeipa.org From ae2c3a7d3c559c53d7c4b61b80599145e8956db5 Mon Sep 17 00:00:00 2001 From: Tomas Babej tba...@redhat.com Date: Tue, 25 Feb 2014 12:53:44 +0100 Subject: [PATCH] ipatests: Kill winbindd process after uninstall As a part of a better cleanup procedure in the integration tests, make sure that winbindd is not running after uninstalling the IPA server. --- ipatests/test_integration/tasks.py | 9 + 1 file changed, 9 insertions(+) diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index 9a6ea3fa548a53d6e5ab6d19783227c2d956a001..c180b0af0ba41b05f3e95ada63aa3aa68d6fc31c 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -444,6 +444,15 @@ def uninstall_master(host): host.run_command(['ipa-server-install', '--uninstall', '-U'], raiseonerr=False) + +# Processes that should not be left running after uninstall +# So far we encountered stray processes of winbind only, +# add more if required + +processes_to_kill = ('winbindd', ) +for process in processes_to_kill: +host.run_command(['killall', '-9', process], raiseonerr=False) + unapply_fixes(host) -- 1.8.5.3 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0155] ipatests: Kill winbindd process after uninstall
On Tue, 25 Feb 2014, Tomas Babej wrote: Hi, As a part of a better cleanup procedure in the integration tests, make sure that winbindd is not running after uninstalling the IPA server. -- Tomas Babej Associate Software Engeneer | Red Hat | Identity Management RHCE | Brno Site | IRC: tbabej | freeipa.org From ae2c3a7d3c559c53d7c4b61b80599145e8956db5 Mon Sep 17 00:00:00 2001 From: Tomas Babej tba...@redhat.com Date: Tue, 25 Feb 2014 12:53:44 +0100 Subject: [PATCH] ipatests: Kill winbindd process after uninstall As a part of a better cleanup procedure in the integration tests, make sure that winbindd is not running after uninstalling the IPA server. --- ipatests/test_integration/tasks.py | 9 + 1 file changed, 9 insertions(+) diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index 9a6ea3fa548a53d6e5ab6d19783227c2d956a001..c180b0af0ba41b05f3e95ada63aa3aa68d6fc31c 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -444,6 +444,15 @@ def uninstall_master(host): host.run_command(['ipa-server-install', '--uninstall', '-U'], raiseonerr=False) + +# Processes that should not be left running after uninstall +# So far we encountered stray processes of winbind only, +# add more if required + +processes_to_kill = ('winbindd', ) +for process in processes_to_kill: +host.run_command(['killall', '-9', process], raiseonerr=False) + unapply_fixes(host) ACK. -- / Alexander Bokovoy ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0155] ipatests: Kill winbindd process after uninstall
On Tue, 25 Feb 2014, Tomas Babej wrote: Hi, As a part of a better cleanup procedure in the integration tests, make sure that winbindd is not running after uninstalling the IPA server. Better patch 0140 attached. We simply need to stop and disable winbind in adtrustinstance.uninstall() -- / Alexander Bokovoy From 01c230ddcc3b70ddc147c1b46e766e5cab93c380 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy aboko...@redhat.com Date: Tue, 25 Feb 2014 20:11:50 +0200 Subject: [PATCH 3/3] adtrustinstance: make sure to stop and disable winbind in uninstall() This makes unnecessary Tomas' patch 0155. --- ipaserver/install/adtrustinstance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py index 621e3fd..6e30d5a 100644 --- a/ipaserver/install/adtrustinstance.py +++ b/ipaserver/install/adtrustinstance.py @@ -889,11 +889,14 @@ class ADTRUSTInstance(service.Service): self.restore_state(running) self.restore_state(enabled) +winbind = ipaservices.service(winbind) # Always try to stop and disable smb service, since we do not leave # working configuration after uninstall try: self.stop() self.disable() +winbind.stop() +winbind.disable() except: pass -- 1.8.3.1 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0155] ipatests: Kill winbindd process after uninstall
On 02/25/2014 01:21 PM, Tomas Babej wrote: Hi, As a part of a better cleanup procedure in the integration tests, make sure that winbindd is not running after uninstalling the IPA server. -9, what a brutal way to kill. Usually when I stop a service this way, systemd restarts it right away. Does that not happen in this case? -- PetrĀ³ ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel