RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1654101 - dscreate related issues
Summary: dscreate related issues
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: mreynolds
QA Contact: RHDS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-28 04:16 UTC by Amita Sharma
Modified: 2019-11-23 22:38 UTC (History)
11 users (show)

Fixed In Version: 389-ds-base-1.4.0.20-1.module+el8+2553+e9a4c637
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-13 23:03:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Amita Sharma 2018-11-28 04:16:19 UTC
Description of problem:
dscreate related issues

Version-Release number of selected component (if applicable):
389-ds-base-1.4.0.19-2.module+el8+1+36e60e1d.x86_64

How reproducible:
Always

Steps to Reproduce:
1. There is no provision to go back to the previous step while using dscreate interactive command.

2. There was the option given in the steup-ds.pl as 
"- Type "Control-B" or the word "back" then "Enter" to go back to the previous screen"

But this does not work with dscreate interactive

Comment 1 Têko Mihinto 2018-11-28 15:38:19 UTC
Description of problem:

dscreate should check for a valid instance name before attempting to create the instance.

Version-Release number of selected component (if applicable):
389-ds-base-1.4.0.19-2.module+el8+1+36e60e1d.x86_64


How reproducible:
Always.

Steps to Reproduce:
1. Launch dscreate in interactive mode and use an invalid instance name:

# dscreate interactive
Install Directory Server (interactive mode)
===========================================

Enter system's hostname [rhds-test-day-7]:

Use strict hostname verification (set to "no" if using GSSAPI behind a load balancer) [yes]: no

Enter the instance name [rhds-test-day-7]: Test_Teko 1 2 3    
Server identifier can not contain a space

Enter the instance name [rhds-test-day-7]: Test_Têko

Enter port number []: 1389

Create self-signed certificate database [yes]: NO

Enter Directory Manager DN [cn=Directory Manager]:

Enter the Directory Manager password:
Confirm the Directory Manager Password:

Enter the database suffix (or enter "none" to skip) [dc=rhds-test-day-7]: dc=Test,dc=com

Create sample entries in the suffix [no]: yes

Are you ready to install? [no]: yes

Starting installation...
Invalid unit name "dirsrv@Test_Têko" was escaped as "dirsrv@Test_T\xc3\xaako" (maybe you should use systemd-escape?)
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv@Test_T\xc3\xaako.service → /usr/lib/systemd/system/dirsrv@.service.
Invalid unit name "dirsrv@Test_Têko" was escaped as "dirsrv@Test_T\xc3\xaako" (maybe you should use systemd-escape?)
Job for dirsrv@Test_T\xc3\xaako.service failed because of unavailable resources or another system error.
See "systemctl status "dirsrv@Test_T\\xc3\\xaako.service"" and "journalctl -xe" for details.
Error: Command '['/usr/bin/systemctl', 'start', 'dirsrv@Test_Têko']' returned non-zero exit status 1.

#

2. Check the status:

# systemctl status "dirsrv@Test_T\\xc3\\xaako.service"
● dirsrv@Test_T\xc3\xaako.service - 389 Directory Server Test_T\xc3\xaako.
   Loaded: loaded (/usr/lib/systemd/system/dirsrv@.service; enabled; vendor preset: disabled)
   Active: failed (Result: resources)

Nov 28 09:39:29 rhds-test-day-7 systemd[1]: /usr/lib/systemd/system/dirsrv@.service:40: .include directives are deprecated, and support for them will be removed in a future version of systemd. Please use>
Nov 28 09:39:29 rhds-test-day-7 systemd[1]: /usr/lib/systemd/system/dirsrv@.service:40: .include directives are deprecated, and support for them will be removed in a future version of systemd. Please use>
Nov 28 09:39:35 rhds-test-day-7 systemd[1]: dirsrv@Test_T\xc3\xaako.service: Failed to load environment files: No such file or directory
Nov 28 09:39:35 rhds-test-day-7 systemd[1]: dirsrv@Test_T\xc3\xaako.service: Failed to run 'start-pre' task: No such file or directory
Nov 28 09:39:35 rhds-test-day-7 systemd[1]: dirsrv@Test_T\xc3\xaako.service: Failed with result 'resources'.
Nov 28 09:39:35 rhds-test-day-7 systemd[1]: Failed to start 389 Directory Server Test_T\xc3\xaako..
Nov 28 10:22:23 rhds-test-day-7 systemd[1]: /usr/lib/systemd/system/dirsrv@.service:40: .include directives are deprecated, and support for them will be removed in a future version of systemd. Please use>


Actual results:
dscreate accepts the invalid instance name and the creation fails.

Expected results:
dscreate should reject invalid instance names.

Additional info:

Comment 2 Têko Mihinto 2018-11-28 16:31:10 UTC
Description of problem:
dscreate should skip the step "Create sample entries in the suffix" if no suffix is created.

Steps to Reproduce:
1. Launch dscreate in interactive mode
2. Select "none" for the step "Enter the database suffix"
3. Select "yes" for the step "Create sample entries in the suffix"
4. Check in the dse.ldif file that no suffix is created ( thus no sample entry ).

# dscreate interactive
Install Directory Server (interactive mode)
===========================================
...
Enter the database suffix (or enter "none" to skip) [dc=rhds-test-day-7]: none

Create sample entries in the suffix [no]: yes

Are you ready to install? [no]: yes

Starting installation...
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv → /usr/lib/systemd/system/dirsrv@.service.
Completed installation for test
#

# grep -ic nsslapd-suffix ./dse.ldif
0
#

Comment 3 Marc Sauton 2018-11-28 18:29:10 UTC
related to comment 2:
in one of my tests, regardless of interactive or from-file with or without sample entries, dscreate did NOT create a backend for userroot under cn=config, no db either, no suffix entry.

Comment 4 Marc Sauton 2018-11-28 20:16:30 UTC
bz 1654451 - dscreate permissions and SELinux labels "too relaxed/open", "incorrect"
https://bugzilla.redhat.com/1654451

Comment 7 Amita Sharma 2019-01-08 08:36:54 UTC
(In reply to Têko Mihinto from comment #1)
> Description of problem:
> 
> dscreate should check for a valid instance name before attempting to create
> the instance.
> 
> Version-Release number of selected component (if applicable):
> 389-ds-base-1.4.0.19-2.module+el8+1+36e60e1d.x86_64
> 
> 
> How reproducible:
> Always.
> 
> Steps to Reproduce:
> 1. Launch dscreate in interactive mode and use an invalid instance name:
> 
> # dscreate interactive
> Install Directory Server (interactive mode)
> ===========================================
> 
> Enter system's hostname [rhds-test-day-7]:
> 
> Use strict hostname verification (set to "no" if using GSSAPI behind a load
> balancer) [yes]: no
> 
> Enter the instance name [rhds-test-day-7]: Test_Teko 1 2 3    
> Server identifier can not contain a space
> 
> Enter the instance name [rhds-test-day-7]: Test_Têko
> 
> Enter port number []: 1389
> 
> Create self-signed certificate database [yes]: NO
> 
> Enter Directory Manager DN [cn=Directory Manager]:
> 
> Enter the Directory Manager password:
> Confirm the Directory Manager Password:
> 
> Enter the database suffix (or enter "none" to skip) [dc=rhds-test-day-7]:
> dc=Test,dc=com
> 
> Create sample entries in the suffix [no]: yes
> 
> Are you ready to install? [no]: yes
> 
> Starting installation...
> Invalid unit name "dirsrv@Test_Têko" was escaped as
> "dirsrv@Test_T\xc3\xaako" (maybe you should use systemd-escape?)
> Created symlink
> /etc/systemd/system/multi-user.target.wants/dirsrv@Test_T\xc3\xaako.service
> → /usr/lib/systemd/system/dirsrv@.service.
> Invalid unit name "dirsrv@Test_Têko" was escaped as
> "dirsrv@Test_T\xc3\xaako" (maybe you should use systemd-escape?)
> Job for dirsrv@Test_T\xc3\xaako.service failed because of unavailable
> resources or another system error.
> See "systemctl status "dirsrv@Test_T\\xc3\\xaako.service"" and "journalctl
> -xe" for details.
> Error: Command '['/usr/bin/systemctl', 'start', 'dirsrv@Test_Têko']'
> returned non-zero exit status 1.
> 
> #
> 
> 2. Check the status:
> 
> # systemctl status "dirsrv@Test_T\\xc3\\xaako.service"
> ● dirsrv@Test_T\xc3\xaako.service - 389 Directory Server Test_T\xc3\xaako.
>    Loaded: loaded (/usr/lib/systemd/system/dirsrv@.service; enabled; vendor
> preset: disabled)
>    Active: failed (Result: resources)
> 
> Nov 28 09:39:29 rhds-test-day-7 systemd[1]:
> /usr/lib/systemd/system/dirsrv@.service:40: .include directives are
> deprecated, and support for them will be removed in a future version of
> systemd. Please use>
> Nov 28 09:39:29 rhds-test-day-7 systemd[1]:
> /usr/lib/systemd/system/dirsrv@.service:40: .include directives are
> deprecated, and support for them will be removed in a future version of
> systemd. Please use>
> Nov 28 09:39:35 rhds-test-day-7 systemd[1]: dirsrv@Test_T\xc3\xaako.service:
> Failed to load environment files: No such file or directory
> Nov 28 09:39:35 rhds-test-day-7 systemd[1]: dirsrv@Test_T\xc3\xaako.service:
> Failed to run 'start-pre' task: No such file or directory
> Nov 28 09:39:35 rhds-test-day-7 systemd[1]: dirsrv@Test_T\xc3\xaako.service:
> Failed with result 'resources'.
> Nov 28 09:39:35 rhds-test-day-7 systemd[1]: Failed to start 389 Directory
> Server Test_T\xc3\xaako..
> Nov 28 10:22:23 rhds-test-day-7 systemd[1]:
> /usr/lib/systemd/system/dirsrv@.service:40: .include directives are
> deprecated, and support for them will be removed in a future version of
> systemd. Please use>
> 
> 
> Actual results:
> dscreate accepts the invalid instance name and the creation fails.
> 
> Expected results:
> dscreate should reject invalid instance names.
> 
> Additional info:

This is working fine -
[root@server-rhel8 ds]# dscreate interactive
Install Directory Server (interactive mode)
===========================================

Enter system's hostname [server-rhel8.example.com]: 

Use strict hostname verification (set to "no" if using GSSAPI behind a load balancer) [yes]: 

Enter the instance name [server-rhel8]: Test_Teko 1 2 3
Server identifier can not contain a space

Enter the instance name [server-rhel8]: Test_Têko
Server identifier can not contain non ascii characters

Enter the instance name [server-rhel8]: @#$
Server identifier has invalid characters, please choose a different value

Enter the instance name [server-rhel8]: 0

Enter port number [389]: 

Create self-signed certificate database [yes]: 

Enter secure port number [636]: 

Enter Directory Manager DN [cn=Directory Manager]: 

Enter the Directory Manager password: 
Confirm the Directory Manager Password: 

Enter the database suffix (or enter "none" to skip) [dc=server-rhel8,dc=example,dc=com]: dc=example,dc=com

Create sample entries in the suffix [no]: yes

Are you ready to install? [no]: yes

Starting installation...
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv → /usr/lib/systemd/system/dirsrv@.service.
Completed installation for 0

Comment 8 Amita Sharma 2019-01-08 08:39:59 UTC
(In reply to Têko Mihinto from comment #2)
> Description of problem:
> dscreate should skip the step "Create sample entries in the suffix" if no
> suffix is created.
> 
> Steps to Reproduce:
> 1. Launch dscreate in interactive mode
> 2. Select "none" for the step "Enter the database suffix"
> 3. Select "yes" for the step "Create sample entries in the suffix"
> 4. Check in the dse.ldif file that no suffix is created ( thus no sample
> entry ).
> 
> # dscreate interactive
> Install Directory Server (interactive mode)
> ===========================================
> ...
> Enter the database suffix (or enter "none" to skip) [dc=rhds-test-day-7]:
> none
> 
> Create sample entries in the suffix [no]: yes
> 
> Are you ready to install? [no]: yes
> 
> Starting installation...
> Created symlink
> /etc/systemd/system/multi-user.target.wants/dirsrv →
> /usr/lib/systemd/system/dirsrv@.service.
> Completed installation for test
> #
> 
> # grep -ic nsslapd-suffix ./dse.ldif
> 0
> #

This is working fine -
[root@server-rhel8 ds]# dscreate interactive
Install Directory Server (interactive mode)
===========================================

Enter system's hostname [server-rhel8.example.com]: 

Use strict hostname verification (set to "no" if using GSSAPI behind a load balancer) [yes]: 

Enter the instance name [server-rhel8]: 

Enter port number [389]: 

Create self-signed certificate database [yes]: 

Enter secure port number [636]: 

Enter Directory Manager DN [cn=Directory Manager]: 

Enter the Directory Manager password: 
Confirm the Directory Manager Password: 

Enter the database suffix (or enter "none" to skip) [dc=server-rhel8,dc=example,dc=com]: none

Are you ready to install? [no]: yes

Starting installation...
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv → /usr/lib/systemd/system/dirsrv@.service.
Completed installation for server-rhel8


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