Remove dangling RUVs even if replicas are offline

Previously, an offline replica would mean the RUVs cannot
be removed otherwise the task would be hanging in the DS.
This is fixed in 389-ds 1.3.5.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Ludwig Krispenz <lkrispen@redhat.com>
This commit is contained in:
Stanislav Laznicka 2016-05-18 16:27:26 +02:00 committed by Martin Basti
parent 72f5c52d8c
commit 0492ab9c0a
3 changed files with 4 additions and 7 deletions

View File

@ -42,7 +42,7 @@ Source0: freeipa-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if ! %{ONLY_CLIENT}
BuildRequires: 389-ds-base-devel >= 1.3.4.4
BuildRequires: 389-ds-base-devel >= 1.3.5
BuildRequires: svrcore-devel
BuildRequires: policycoreutils >= 2.1.12-5
BuildRequires: systemd-units
@ -131,7 +131,7 @@ Requires: %{name}-client = %{version}-%{release}
Requires: %{name}-admintools = %{version}-%{release}
Requires: %{name}-common = %{version}-%{release}
Requires: python2-ipaserver = %{version}-%{release}
Requires: 389-ds-base >= 1.3.4.6
Requires: 389-ds-base >= 1.3.5
Requires: openldap-clients > 2.4.35-4
Requires: nss >= 3.14.3-12.0
Requires: nss-tools >= 3.14.3-12.0
@ -163,7 +163,7 @@ Requires: zip
Requires: policycoreutils >= 2.1.12-5
Requires: tar
Requires(pre): certmonger >= 0.78
Requires(pre): 389-ds-base >= 1.3.4.6
Requires(pre): 389-ds-base >= 1.3.5
Requires: fontawesome-fonts
Requires: open-sans-fonts
Requires: openssl

View File

@ -756,10 +756,6 @@ def clean_dangling_ruvs(realm, host, options):
print('\t\tid: {id}, hostname: {host}'
.format(id=csruv[1], host=csruv[0]))
# TODO: this can be removed when #5396 is fixed
if offlines:
sys.exit("ERROR: All replicas need to be online to proceed.")
if not options.force and not ipautil.user_input("Proceed with cleaning?", False):
sys.exit("Aborted")

View File

@ -1353,6 +1353,7 @@ class ReplicationManager(object):
'cn': ['clean %d' % replicaId],
'replica-base-dn': [self.db_suffix],
'replica-id': [replicaId],
'replica-force-cleaning': ['yes'],
}
)
try: