Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1806573 - Dsctl healthcheck doesn't work when using instance name with 'slapd-'
Summary: Dsctl healthcheck doesn't work when using instance name with 'slapd-'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: mreynolds
QA Contact: RHDS QE
URL:
Whiteboard:
: 1848726 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-24 14:46 UTC by sgouvern
Modified: 2020-11-04 03:08 UTC (History)
5 users (show)

Fixed In Version: 389-ds-base-1.4.3.8-4.module+el8.3.0+7193+dfd1e8ad
Doc Type: Bug Fix
Doc Text:
Cause: Create an instance that contains "slapd-" inside the instance name. Consequence: The CLI tools can have a hard time parsing this and will fail to work. Fix: Properly parse the existing instance names so the CLI can correctly find the instance it is trying to interact with Result: CLI tools work as expected regardless if the instance name contains "slapd-"
Clone Of:
Environment:
Last Closed: 2020-11-04 03:07:44 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 4197 0 None None None 2020-09-13 22:31:53 UTC
Red Hat Product Errata RHEA-2020:4695 0 None None None 2020-11-04 03:07:59 UTC

Description sgouvern 2020-02-24 14:46:07 UTC
Description of problem:
When running # dsctl slapd-inst1 healthcheck, it reports an error :
Error: [Errno 2] No such file or directory:
'/etc/dirsrv/slapd-slapd-inst1/dse.ldif'



Version-Release number of selected component (if applicable):
389-ds-base-1.4.2.8-2

How reproducible:
Always


Steps to Reproduce:
1.Install an instance inst1 of DS
2.List the existing instances :
# dsctl -l
slapd-inst1
3.Run # dsctl slapd-inst1 healthcheck

Actual results:
Beginning lint report, this could take a while ...
Checking Backends ...
Checking Config ...
Checking Encryption ...
Checking FSChecks ...
Checking ReferentialIntegrityPlugin ...
Checking MonitorDiskSpace ...
Checking Replica ...
Checking Changelog5 ...
Checking DSEldif ...
Error: [Errno 2] No such file or directory: '/etc/dirsrv/slapd-slapd-inst1/dse.ldif'


Expected results:
Healthcheck checks all items and ends without error

Additional info:

Comment 3 sgouvern 2020-06-09 11:52:43 UTC
With build 389-ds-base-1.4.3.8-3.module+el8.3.0+6935+6f68b788.x86_64

# dsctl --list
slapd-master1
slapd-master2

# dsctl slapd-master1 healthcheck
Enter Bind DN: cn=directory manager
Enter password for cn=directory manager on slapd-master1: 
Beginning lint report, this could take a while ...
Checking config:hr_timestamp ...
Checking config:passwordscheme ...
Checking backends:userroot:mappingtree ...
Checking backends:userroot:search ...
Checking backends:userroot:virt_attrs ...
Checking encryption:check_tls_version ...
Checking fschecks:file_perms ...
Checking refint:attr_indexes ...
Checking refint:update_delay ...
Checking monitor-disk-space:disk_space ..
Checking replication:agmts_status ...
Checking replication:conflicts ...
Checking changelog:cl_trimming ...
Checking dseldif:nsstate ...
Checking ssl:certificate_expiration ...
Healthcheck complete.
2 Issues found!  Generating report ...

-> No error reported
-> marking as Verified

Comment 4 Viktor Ashirov 2020-06-10 13:33:52 UTC
It's still doesn't work for me.

Build tested: 389-ds-base-1.4.3.8-3.module+el8.3.0+6935+6f68b788.x86_64

[root@server-rhel8 ds]# cat template.ini 
[general]
[slapd]
instance_name = ns-slapd-master1
root_password = password
[backend-userroot]
create_suffix_entry = True
sample_entries = yes
suffix = dc=example,dc=com

[root@server-rhel8 ds]# dscreate from-file template.ini 
Starting installation...
Completed installation for ns-slapd-master1
[root@server-rhel8 ds]# dsctl --list 
slapd-ns-slapd-master1
[root@server-rhel8 ds]# dsctl slapd-ns-slapd-master1 status
Instance "ns-slapd-master1" is running
[root@server-rhel8 ds]# dsctl slapd-ns-slapd-master1 healthcheck 
Error: Failed to connect to Directory Server instance: Could not find configuration for instance: slapd-ns-slapd-master1

Comment 5 mreynolds 2020-06-10 18:07:16 UTC
Upstream ticket:

https://pagure.io/389-ds-base/issue/51144

Comment 6 mreynolds 2020-06-18 21:11:40 UTC
*** Bug 1848726 has been marked as a duplicate of this bug. ***

Comment 7 Viktor Ashirov 2020-07-30 13:41:35 UTC
Build tested: 389-ds-base-1.4.3.8-4.module+el8.3.0+7193+dfd1e8ad.x86_64

Test case from comment #4 works:

[root@ci-vm-10-0-139-55 ~]# dscreate from-file template.ini
Starting installation...
Completed installation for ns-slapd-master1
[root@ci-vm-10-0-139-55 ~]# dsctl --list 
slapd-ns-slapd-master1
[root@ci-vm-10-0-139-55 ~]# dsctl slapd-ns-slapd-master1 status
Instance "ns-slapd-master1" is running
[root@ci-vm-10-0-139-55 ~]# dsctl slapd-ns-slapd-master1 healthcheck 
Beginning lint report, this could take a while ...
Checking config:hr_timestamp ...
Checking config:passwordscheme ...
Checking backends:userroot:mappingtree ...
Checking backends:userroot:search ...
Checking backends:userroot:virt_attrs ...
Checking encryption:check_tls_version ...
Checking fschecks:file_perms ...
Checking refint:attr_indexes ...
Checking refint:update_delay ...
Checking monitor-disk-space:disk_space ...
Checking replication:agmts_status ...
Checking replication:conflicts ...
Checking changelog:cl_trimming ...
Checking dseldif:nsstate ...
Checking ssl:certificate_expiration ...
Checking logs:notes ...
Healthcheck complete.
No issues found.


Marking as VERIFIED.

Comment 10 errata-xmlrpc 2020-11-04 03:07:44 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 (389-ds:1.4 bug fix and enhancement update), 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/RHEA-2020:4695


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