Re: [Freeipa-devel] [PATCH 0063] ipa-replica-manage del continues when host does not exist in domain level 1

2015-11-12 Thread Martin Basti



On 12.11.2015 14:32, Gabe Alford wrote:

Yeah. That's better. Thanks, Martin. Ack.



Pushed to master: efe8f26ddf81db471bbce693dacd35f80e7615e2


On Thu, Nov 12, 2015 at 6:02 AM, Martin Basti > wrote:




On 09.11.2015 14:37, Gabe Alford wrote:

Hello,

Fix for https://fedorahosted.org/freeipa/ticket/5424

thanks,

Gabe



Thank you for you patch, almost ACK, but I propose following
changes (patch attached) in error message.

Let me know if you agree with the change.

Martin




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

Re: [Freeipa-devel] [PATCH 0063] ipa-replica-manage del continues when host does not exist in domain level 1

2015-11-12 Thread Gabe Alford
Yeah. That's better. Thanks, Martin. Ack.



On Thu, Nov 12, 2015 at 6:02 AM, Martin Basti  wrote:

>
>
> On 09.11.2015 14:37, Gabe Alford wrote:
>
> Hello,
>
> Fix for https://fedorahosted.org/freeipa/ticket/5424
>
> thanks,
>
> Gabe
>
>
> Thank you for you patch, almost ACK, but I propose following changes
> (patch attached) in error message.
>
> Let me know if you agree with the change.
>
> Martin
>
-- 
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

Re: [Freeipa-devel] [PATCH 0063] ipa-replica-manage del continues when host does not exist in domain level 1

2015-11-12 Thread Martin Basti



On 09.11.2015 14:37, Gabe Alford wrote:

Hello,

Fix for https://fedorahosted.org/freeipa/ticket/5424

thanks,

Gabe


Thank you for you patch, almost ACK, but I propose following changes 
(patch attached) in error message.


Let me know if you agree with the change.

Martin
From eda85f8e18dda352adc01e403cd60529a257511a Mon Sep 17 00:00:00 2001
From: Gabe 
Date: Sun, 8 Nov 2015 17:18:17 -0700
Subject: [PATCH] ipa-replica-manage del continues when host does not exist in
 domain level 1

- Raises error and stops operation unless --cleanup is specified.

https://fedorahosted.org/freeipa/ticket/5424
---
 install/tools/ipa-replica-manage | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index b9998da44dcc1f01c5eb342ee713634de0ee84ee..2de6fd7993be290fefa5c2c7d07733c39d457ed6 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -740,7 +740,13 @@ def del_master_managed(realm, hostname, options):
 try:
 api.Command.server_del(hostname_u)
 except errors.NotFound:
-print("Server entry already deleted: %s" % (hostname))
+if not options.cleanup:
+print("{hostname} does not exist.".format(hostname=hostname))
+print("Please specify an actual server or add the --cleanup "
+  "option to force clean up.")
+sys.exit(1)
+else:
+print("Server entry already deleted: %s" % (hostname))
 
 # 6. Cleanup
 try:
-- 
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

[Freeipa-devel] [PATCH 0063] ipa-replica-manage del continues when host does not exist in domain level 1

2015-11-09 Thread Gabe Alford
Hello,

Fix for https://fedorahosted.org/freeipa/ticket/5424

thanks,

Gabe
From f2f0deee5ca743518d97efe4f01cc22c0672e87a Mon Sep 17 00:00:00 2001
From: Gabe 
Date: Sun, 8 Nov 2015 17:18:17 -0700
Subject: [PATCH] ipa-replica-manage del continues when host does not exist in
 domain level 1

- Raises error and stops operation unless --cleanup is specified.

https://fedorahosted.org/freeipa/ticket/5424
---
 install/tools/ipa-replica-manage | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index b9998da44dcc1f01c5eb342ee713634de0ee84ee..ccd48eb635a27b5752484ce68b094c2daf7291fa 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -740,7 +740,12 @@ def del_master_managed(realm, hostname, options):
 try:
 api.Command.server_del(hostname_u)
 except errors.NotFound:
-print("Server entry already deleted: %s" % (hostname))
+if not options.cleanup:
+print("%s does not exist. Please specify an actual server or add" \
+  " the\n--cleanup option to force clean up." % (hostname))
+sys.exit(1)
+else:
+print("Server entry already deleted: %s" % (hostname))
 
 # 6. Cleanup
 try:
-- 
2.5.0

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