Bug 1715406 - dsctl fails to remove instances with dashes in the name
Summary: dsctl fails to remove instances with dashes in the name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: mreynolds
QA Contact: RHDS QE
Marc Muehlfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-30 09:29 UTC by Viktor Ashirov
Modified: 2020-04-28 16:01 UTC (History)
8 users (show)

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.
Clone Of:
Environment:
Last Closed: 2020-04-28 16:01:20 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1703 0 None None None 2020-04-28 16:01:36 UTC

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


Note You need to log in before you can comment on or make changes to this bug.