#47977 [RFE] Implement sd_notify mechanism
Closed: wontfix None Opened 9 years ago by mkosek.

Description of problem:

On systemd-enabled platforms (like Fedora/RHEL), use sd_notify mechanism to notify systemd when the 389 DS service is fully started and can serve FreeIPA clients or other components.

Given that this service is FreeIPA required service, completing this RFE is a prerequisite for the FreeIPA project to convert it's service to native systemd services. See upstream ticket for details:
https://fedorahosted.org/freeipa/ticket/4552


So there is a "change in behaviour" here. Systemd does NOT document that for sd_notify to work, the process must not fork. They also use a documented (but not guaranteed to be static) enivornment variable with sd_notify. There is also no guarantee that the env variable will NOT be passed to systemd if you change the service type.

ns-slapd now will not daemonise if the environment variable NOTIFY_SOCKET is present. This also makes sd_notify work so we only advertise to systemd we are ready just before we accept connections.

This seems okay to me, ack

I have a question regarding this configure option.

--with-systemd
Is this supposed to add to the official Fedora build? Or is the build with --with-systemd some special one who has the needs?
Thanks.

It's only for anyone who wants to use systemd features. It was introduced as part of the logging backends change, to allow 'journald' support, but really it represents anything that has to include systemd.h or systemd specific apis.

It's already been added to our rpm.spec.

commit c356b010369268d42b47b761bd39668410bb512e

To ssh://git.fedorahosted.org/git/389/ds.git
9795ec8..ab81e17 master -> master

Due to an issue where it's possible to build a ds instance that will not start, this updates the configure script so that you must provide --with-systemd in order to build the unit files.

Looks good to me.

Just to make sure... I think you modified these 2 files ard the rest are generated by autogen.sh. Is that correct?

configure.ac | 64 -----------
m4/systemd.m4 | 70 +++++++++++-

I'm wondering why these 2 variables disappeared, but I guess they are not necessary in the new configure/Makefile...
{{{
diff --git a/Makefile.in b/Makefile.in
1351 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
1352 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
}}}

Replying to [comment:12 nhosoi]:

Looks good to me.

Just to make sure... I think you modified these 2 files ard the rest are generated by autogen.sh. Is that correct?

configure.ac | 64 -----------
m4/systemd.m4 | 70 +++++++++++-

Correct! :)

I'm wondering why these 2 variables disappeared, but I guess they are not necessary in the new configure/Makefile...
{{{
diff --git a/Makefile.in b/Makefile.in
1351 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
1352 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
}}}

If you look on line 381 of the configure.ac diff, you'll see that's where they are removed.

It's because when I move that into the with_systemd test, I already have the check for pkg_config, so it's not needed again.

Replying to [comment:13 firstyear]:

It's because when I move that into the with_systemd test, I already have the check for pkg_config, so it's not needed again.
OK. Thanks!

(You already have my ack... )

To ssh://git.fedorahosted.org/git/389/ds.git
5a33dc0..069b94a master -> master

commit 069b94a

Metadata Update from @firstyear:
- Issue assigned to firstyear
- Issue set to the milestone: 1.3.5 backlog

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1308

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata