This is an automated email from the git hooks/post-receive script.
mhonek pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 9168d3c Issue 50823 - dsctl doesn't work with 'slapd-' in the
instance name
9168d3c is described below
commit 9168d3cc08ecc5744c2d6b4ab2bb40869e349668
Author: Matus Honek <mhonek(a)redhat.com>
AuthorDate: Wed Jan 29 14:06:04 2020 +0000
Issue 50823 - dsctl doesn't work with 'slapd-' in the instance name
Bug Description:
DirSrv.list drops all occurrences of 'slapd-' within a serverid
rendering names containing it damaged.
Fix Description:
Remove only the first occurrence of 'slapd-' in the serverid, which is
the prefix that is expected to be removed.
Fixes
https://pagure.io/389-ds-base/issue/50823
Author: Matus Honek <mhonek(a)redhat.com>
Review by: Mark, William (thanks!)
(cherry picked from commit 52930da0bb8abe94a56ff6dca5ea57347d3461a9)
---
src/lib389/lib389/__init__.py | 2 +-
src/lib389/lib389/instance/setup.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib389/lib389/__init__.py b/src/lib389/lib389/__init__.py
index 0ff4335..3b39067 100644
--- a/src/lib389/lib389/__init__.py
+++ b/src/lib389/lib389/__init__.py
@@ -706,7 +706,7 @@ class DirSrv(SimpleLDAPObject, object):
if serverid is None and hasattr(self, 'serverid'):
serverid = self.serverid
elif serverid is not None:
- serverid = serverid.replace('slapd-', '')
+ serverid = serverid.replace('slapd-', '', 1)
if self.serverid is None:
# Need to set the Paths in case it does exist
diff --git a/src/lib389/lib389/instance/setup.py b/src/lib389/lib389/instance/setup.py
index 1bedd11..28e75e4 100644
--- a/src/lib389/lib389/instance/setup.py
+++ b/src/lib389/lib389/instance/setup.py
@@ -219,7 +219,7 @@ class SetupDs(object):
insts = inst.list(serverid=serverid)
if len(insts) != 1:
- log.error("No such instance to remove {}".format(serverid))
+ self.log.error("No such instance to remove {}".format(serverid))
return
inst.allocate(insts[0])
remove_ds_instance(inst, force=True)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.