Bug 49595 - Require slapd in /etc/init.d/nagios-nrpe-server
Require slapd in /etc/init.d/nagios-nrpe-server
Status: NEW
Product: UCS
Classification: Unclassified
Component: Monitoring (Prometheus or Nagios)
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-06-04 17:22 CEST by Valentin Heidelberger
Modified: 2021-04-06 13:00 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Add slapd to Required-Start in nagios-nrpe-server init script (547 bytes, patch)
2019-06-04 17:22 CEST, Valentin Heidelberger
Details | Diff
Optionally add slapd to Required-Start in nagios-nrpe-server init script (721 bytes, patch)
2019-06-04 17:34 CEST, Valentin Heidelberger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Heidelberger univentionstaff 2019-06-04 17:22:39 CEST
Created attachment 10053 [details]
Add slapd to Required-Start in nagios-nrpe-server init script

Normally nagios-nrpe-server uses a local user called nagios to start nrpe. A customer has created a "nagios" user in the LDAP because they require it on many other non-UCS systems which are joined to the domain. This resulted in NRPE not starting after the update to 4.3, because NRPE starts before slapd normally. The problem with this specific use-case persist with 4.4.

If we changed the requirements of nagios-nrpe-server so that it requires slapd this use case would work again. 

Attached is a very simple patch that adds slapd to Required-Start in the init script. We'd need to regenerate the systemd service generated by systemd-sysv-generator as well.
Comment 1 Valentin Heidelberger univentionstaff 2019-06-04 17:34:36 CEST
Created attachment 10054 [details]
Optionally add slapd to Required-Start in nagios-nrpe-server init script

Another approach, which I personally favour, would be to make the requirement optionally via UCR. Attached is another patch for this. It currently also pastes an empty line below the Required-Start line when I "ucr commit" it. Not sure why that is right now tbh.
Comment 2 Valentin Heidelberger univentionstaff 2019-06-04 17:35:51 CEST
@Ingo

Would love to get your opinion on this from a product management perspective :)
Comment 3 Erik Damrose univentionstaff 2019-06-04 17:59:26 CEST
Adding it to the init script in the proposed way would cause the init script to fail on any system where no slapd is installed - that would be memberservers.
Comment 4 Valentin Heidelberger univentionstaff 2019-06-04 18:18:06 CEST
Comment on attachment 10053 [details]
Add slapd to Required-Start in nagios-nrpe-server init script

You're right of course
Comment 5 Philipp Hahn univentionstaff 2021-04-06 13:00:25 CEST
Read <https://wiki.debian.org/LSBInitScripts>: Use "Should-Start:" instead of "Required-Start:" as the later would still not work on MemberServers.