Bug 1806573

Summary: Dsctl healthcheck doesn't work when using instance name with 'slapd-'
Product: Red Hat Enterprise Linux 8 Reporter: sgouvern
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: pasik, spichugi, tbordaz, tmihinto, vashirov
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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-"
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 03:07:44 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 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