mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
Fix RUV search scope in ipa-replica-manage
The search had an incorrect scope and therefore it didn't find any RUV. This issue prevented removing of replica. https://fedorahosted.org/freeipa/ticket/3876
This commit is contained in:
parent
7959f3ee1e
commit
f312d72510
@ -348,7 +348,7 @@ def get_ruv(realm, host, dirman_passwd, nolookup=False):
|
||||
search_filter = '(&(nsuniqueid=ffffffff-ffffffff-ffffffff-ffffffff)(objectclass=nstombstone))'
|
||||
try:
|
||||
entries = thisrepl.conn.get_entries(
|
||||
api.env.basedn, thisrepl.conn.SCOPE_ONELEVEL, search_filter,
|
||||
api.env.basedn, thisrepl.conn.SCOPE_SUBTREE, search_filter,
|
||||
['nsds50ruv'])
|
||||
except errors.NotFound:
|
||||
print "No RUV records found."
|
||||
|
@ -59,3 +59,13 @@ class TestSimpleReplication(IntegrationTest):
|
||||
def test_user_replication_to_master(self):
|
||||
"""Test user replication replica -> master"""
|
||||
self.check_replication(self.replicas[0], self.master, 'testuser2')
|
||||
|
||||
def test_replica_removal(self):
|
||||
"""Test replica removal"""
|
||||
result = self.master.run_command(['ipa-replica-manage', 'list'])
|
||||
assert self.replicas[0].hostname in result.stdout_text
|
||||
# has to be run with --force, there is no --unattended
|
||||
self.master.run_command(['ipa-replica-manage', 'del',
|
||||
self.replicas[0].hostname, '--force'])
|
||||
result = self.master.run_command(['ipa-replica-manage', 'list'])
|
||||
assert self.replicas[0].hostname not in result.stdout_text
|
||||
|
Loading…
Reference in New Issue
Block a user