Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1476207

Summary: Enabling instance service doesn't work
Product: Red Hat Enterprise Linux 7 Reporter: Vojtech Juranek <vjuranek>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: low    
Version: 7.3CC: atolani, nkinder, rmeggins, spichugi
Target Milestone: pre-dev-freeze   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.7.5-5.el7 Doc Type: Bug Fix
Doc Text:
The *dirsrv@.service* meta target is now linked to *multi-user.target* Previously, the *dirsrv@.service* meta target had the "Wants" parameter set to "dirsrv.target" in its systemd file. When you enabled *dirsrv@.service*, this correctly enabled the service to the *dirsrv.target*, but *dirsrv.target* was not enabled. Consequently, Directory Server did not start when the system booted. With this update, the "dirsrv@.service" meta target is now linked to *multi-user.target*. As a result, when you enable *dirsrv@.service*, Directory Server starts automatically when the system boots.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 14:19:40 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 Vojtech Juranek 2017-07-28 09:47:12 UTC
Description of problem:
Enabling RHDS 10.1 instance service on RHEL 7 doesn't work. Administration manual states that to enable instance service is done by running 

systemctl enable dirsrv@instance_name 

However, this doesn't survive restart. Searching for enabled units gives:

[root@host-172-16-64-130 ~]# systemctl list-unit-files | grep enabled | grep dirsrv
dirsrv@.service                               enabled 


Version-Release number of selected component (if applicable):
RHDS 10

How reproducible:
always

Steps to Reproduce:
1. create RHDS instance 'abc'
2. run systemctl enable dirsrv@abc
3. restart machine

Actual results:
dirsrv@abc is not running

Expected results:
dirsrv@abc is running

Additional info:
enabling all instances (systemctl enable dirsrv.target) works. Not surre if it's a bug in documentation or sysmted unit files (seems to me more likely).

OS: Red Hat Enterprise Linux Server release 7.3 (Maipo)
RHDS: redhat-ds-10.1.0-2.el7dsrv.x86_64

Comment 1 Viktor Ashirov 2017-07-28 10:02:29 UTC
Hi Vojtech,

could you please provide the version of 389-ds-base?

Thanks.

Comment 3 Vojtech Juranek 2017-07-28 10:41:23 UTC
Hi,
version of 389-ds-base is 389-ds-base-1.3.5.10-21.el7_3.x86_64
Thanks

Comment 5 wibrown@redhat.com 2017-09-11 23:51:15 UTC
This is because of how we structure the unit files. today when you enable dirsrv, it's assigned to the dirsrv.target, and you need to enable that too. IE

systemctl enable dirsrv.target
systemctl enable dirsrv@instance

Really, we should not ship our own target, we should just have our services link to multi-user.target. I think we still need to ship our old target for legacy, but we should change to multi-user.target.

Comment 6 wibrown@redhat.com 2017-09-11 23:54:14 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/49378

Comment 8 Simon Pichugin 2017-11-03 15:40:02 UTC
Build tested:
389-ds-base-1.3.7.5-6.el7.x86_64

Verification steps:
1. Setup an instance

2. Enable the instance:
[]# systemctl enable dirsrv@qeos-60
Created symlink from /etc/systemd/system/multi-user.target.wants/dirsrv to /usr/lib/systemd/system/dirsrv@.service.

3. Reboot the machine:
[]# reboot

4. Check the status:
[]# systemctl status dirsrv@qeos-60
● dirsrv - 389 Directory Server qeos-60.
   Loaded: loaded (/usr/lib/systemd/system/dirsrv@.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2017-11-03 11:33:36 EDT; 1min 44s ago
  Process: 1034 ExecStartPre=/usr/sbin/ds_systemd_ask_password_acl /etc/dirsrv/slapd-%i/dse.ldif (code=exited, status=0/SUCCESS)
 Main PID: 1052 (ns-slapd)
   Status: "slapd started: Ready to process requests"
   CGroup: /system.slice/system-dirsrv.slice/dirsrv
           └─1052 /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-qeos-60 -i /var/run/dirsrv/slapd-q...

The instance is active after the reboot. Marking as verified.

Comment 18 errata-xmlrpc 2018-04-10 14:19:40 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-2018:0811