Re: [Freeipa-devel] [PATCH 0288] ipa-replica-manage: Allow value 'no' for replica-certify-all attr in abort-clean-ruv subcommand

2015-07-17 Thread Petr Vobornik

On 07/16/2015 06:22 PM, Martin Basti wrote:

On 16/07/15 17:07, Rob Crittenden wrote:

Martin Basti wrote:

https://fedorahosted.org/freeipa/ticket/4988

Patch attached.



IMHO this should be mentioned in the man page.

rob


Updated patch attached.




ACK

Pushed to:
master: 82aaa1e6d07a13429381b94ffe4b5fc562427213
ipa-4-2: 58d0d335a4591398102f02c62a15290d64806cc4
--
Petr Vobornik

--
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 0288] ipa-replica-manage: Allow value 'no' for replica-certify-all attr in abort-clean-ruv subcommand

2015-07-16 Thread Rob Crittenden

Martin Basti wrote:

https://fedorahosted.org/freeipa/ticket/4988

Patch attached.



IMHO this should be mentioned in the man page.

rob

--
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 0288] ipa-replica-manage: Allow value 'no' for replica-certify-all attr in abort-clean-ruv subcommand

2015-07-16 Thread Martin Basti

On 16/07/15 17:07, Rob Crittenden wrote:

Martin Basti wrote:

https://fedorahosted.org/freeipa/ticket/4988

Patch attached.



IMHO this should be mentioned in the man page.

rob


Updated patch attached.

--
Martin Basti

From 0be2d89326529d472b0ba715f7fa2f0738ff2cd5 Mon Sep 17 00:00:00 2001
From: Martin Basti mba...@redhat.com
Date: Thu, 16 Jul 2015 16:26:55 +0200
Subject: [PATCH] Allow value 'no' for replica-certify-all attr in
 abort-clean-ruv subcommand

--force option set replica-certify-all to 'no' during abort-clean-ruv
subcommand

https://fedorahosted.org/freeipa/ticket/4988
---
 install/tools/ipa-replica-manage   | 2 +-
 install/tools/man/ipa-replica-manage.1 | 2 +-
 ipaserver/install/replication.py   | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index e525a02f4c60350b7a943abab4b4aedd957e984a..50a57f70ec452c0df5bf2ea55d2a136e8149aa41 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -470,7 +470,7 @@ def abort_clean_ruv(realm, ruv, options):
 print
 thisrepl = replication.ReplicationManager(realm, options.host,
   options.dirman_passwd)
-thisrepl.abortcleanallruv(ruv)
+thisrepl.abortcleanallruv(ruv, options.force)
 
 print Cleanup task stopped
 
diff --git a/install/tools/man/ipa-replica-manage.1 b/install/tools/man/ipa-replica-manage.1
index 8a7c78f39eeb6c7902ed99e7bed37e32eb0e92dc..c09ed362f3143e6e38716e1b3a96e90001a64674 100644
--- a/install/tools/man/ipa-replica-manage.1
+++ b/install/tools/man/ipa-replica-manage.1
@@ -49,7 +49,7 @@ Manages the replication agreements of an IPA server. The available commands are:
 \- Run the CLEANALLRUV task to remove a replication ID.
 .TP
 \fBabort\-clean\-ruv\fR [REPLICATION_ID]
-\- Abort a running CLEANALLRUV task.
+\- Abort a running CLEANALLRUV task. With \-\-force option the task does not wait for all the replica servers to have been sent the abort task, or be online, before completing.
 .TP
 \fBlist\-clean\-ruv\fR
 \- List all running CLEANALLRUV and abort CLEANALLRUV tasks.
diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py
index 0f420106e093e8a7a277016857d27aaa48daa4dc..e9af88dc4356d4fd5495f4fea399ab09c75db953 100644
--- a/ipaserver/install/replication.py
+++ b/ipaserver/install/replication.py
@@ -1451,7 +1451,7 @@ class ReplicationManager(object):
 
 wait_for_task(self.conn, dn)
 
-def abortcleanallruv(self, replicaId):
+def abortcleanallruv(self, replicaId, force=False):
 
 Create a task to abort a CLEANALLRUV operation.
 
@@ -1465,6 +1465,7 @@ class ReplicationManager(object):
 'replica-id': [replicaId],
 'objectclass': ['top', 'extensibleObject'],
 'cn': ['abort %d' % replicaId],
+'replica-certify-all': ['no'] if force else ['yes'],
 }
 )
 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