Bug 1715406

Summary: dsctl fails to remove instances with dashes in the name
Product: Red Hat Enterprise Linux 8 Reporter: Viktor Ashirov <vashirov>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: medium Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: medium    
Version: 8.1CC: lkrispen, mhonek, mreynolds, nkinder, pasik, spichugi, tbordaz, vashirov
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.4.2.4-1.module+el8.2.0+4699+cf2da360 Doc Type: Bug Fix
Doc Text:
.The `dsctl` utility no longer fails to manage instances with a hyphen in their name Previously, the `dsctl` utility did not correctly parse hyphens in the Directory Server instance names. As a consequence, administrators could not use `dsctl` to manage instances with a hyphen in their name. This update fixes the problem, and `dsctl` now works as expected in the mentioned scenario.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:01:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Viktor Ashirov 2019-05-30 09:29:57 UTC
Description of problem:
I have one instance installed:
slapd-host-10-0-137-3

I'm trying to remove the instance using dsctl, but it incorrectly tries to remove slapd-3 instead of slapd-host-10-0-137-3:

[root@server ~]# dsctl --remove-all 
Are you sure you want to remove all the Directory Server instances?  Enter "Yes" to continue: Yes
Removing instance: slapd-3
Instance configuration not found, no action will be taken
If you want us to cleanup anyway, recreate '/etc/dirsrv/slapd-3/dse.ldif'
All instances have been successfully removed


Version-Release number of selected component (if applicable):
389-ds-base-1.4.1.3-1.module+el8.1.0+3259+a5bc8ad3.x86_64


How reproducible:
always

Steps to Reproduce:
1. Create an instance with multiple dashes in the name
2. Try to remove all instances using dsctl --remove-all 
3.

Actual results:
dsctl fails to remove the instance.

Expected results:
dsctl should remove the instance.

Additional info:

Comment 1 Viktor Ashirov 2019-07-09 19:52:47 UTC
Still present in 389-ds-base-1.4.1.3-3.module+el8.1.0+3533+f8225121.x86_64

Comment 4 Viktor Ashirov 2019-12-03 14:14:54 UTC
Build tested: 389-ds-base-1.4.2.4-4.module+el8.2.0+4930+d4051b3a.x86_64

`dsctl --remove-all` now works with multiple dashes in the instance name:

[root@server-rhel8 ds]# dsctl --list
slapd-host-1-2-3-4
[root@server-rhel8 ds]# dsctl --remove-all
Are you sure you want to remove all the Directory Server instances?  Enter "Yes" to continue: Yes
Removing instance: slapd-host-1-2-3-4
All instances have been successfully removed

Marking as VERIFIED.

Comment 8 errata-xmlrpc 2020-04-28 16:01:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1703