Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update replica.py
Browse files Browse the repository at this point in the history
droideck committed Jan 11, 2025
1 parent fcde2d0 commit a62621f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib389/lib389/replica.py
Original file line number Diff line number Diff line change
@@ -2013,7 +2013,7 @@ def _create_service_group(self, from_instance):
return repl_group
else:
try:
repl_group = groups.get('replication_managers')
repl_group = groups.get(dn=f'cn=replication_managers,{self._suffix}')
return repl_group
except ldap.NO_SUCH_OBJECT:
self._log.warning("{} doesn't have cn=replication_managers,{} entry \
@@ -2037,7 +2037,7 @@ def _create_service_account(self, from_instance, to_instance):
services = ServiceAccounts(from_instance, self._suffix)
# Generate the password and save the credentials
# for putting them into agreements in the future
service_name = '{}:{}'.format(to_instance.host, port)
service_name = f'{self._suffix}:{to_instance.host}:{port}'
creds = password_generate()
repl_service = services.ensure_state(properties={
'cn': service_name,
@@ -2296,7 +2296,7 @@ def _get_replica_creds(self, from_instance, write_instance):
Internal Only.
"""

rdn = '{}:{}'.format(from_instance.host, from_instance.sslport)
rdn = f'{self._suffix}:{from_instance.host}:{from_instance.sslport}'
try:
creds = self._repl_creds[rdn]
except KeyError:
@@ -2537,8 +2537,8 @@ def wait_for_replication(self, from_instance, to_instance, timeout=60):
# Touch something then wait_for_replication.
from_groups = Groups(from_instance, basedn=self._suffix, rdn=None)
to_groups = Groups(to_instance, basedn=self._suffix, rdn=None)
from_group = from_groups.get('replication_managers')
to_group = to_groups.get('replication_managers')
from_group = from_groups.get(dn=f'cn=replication_managers,{self._suffix}')
to_group = to_groups.get(dn=f'cn=replication_managers,{self._suffix}')

change = str(uuid.uuid4())

0 comments on commit a62621f

Please sign in to comment.