Bug 32453 - Nagios unjoin script
Nagios unjoin script
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Monitoring (Prometheus or Nagios)
UCS 3.1
Other Linux
: P5 enhancement (vote)
: UCS 3.2
Assigned To: Lukas Walter
Felix Botner
: interim-3
Depends on:
Blocks: 30786
  Show dependency treegraph
 
Reported: 2013-09-02 09:10 CEST by Stefan Gohmann
Modified: 2022-06-27 17:49 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2013-09-02 09:10:32 CEST
An unjoin script for the nagios server component is missing.
Comment 1 Lukas Walter univentionstaff 2013-10-16 13:01:56 CEST
Unjoin script has been added.

svn 45160: univention-nagios (7.0.2-1)
Comment 2 Felix Botner univentionstaff 2013-10-22 16:01:58 CEST
please run the unjoin script if the package is removed (not purged)

univention-nagios-server.postrm:
if [ "$1" = "purge" ] ; then
    call_unjoinscript 28univention-nagios-server.uinst
fi
Comment 3 Felix Botner univentionstaff 2013-10-22 16:20:23 CEST
28univention-nagios-server.uinst:

"join_script_remove_script_from_status_file" has to be "joinscript_remove_script_from_status_file"
Comment 4 Lukas Walter univentionstaff 2013-10-22 16:22:37 CEST
univention-nagios (7.0.3-2) unstable; urgency=low

  * call unjoin script when removing, not puring (Bug #32453)


svn 45448
Comment 5 Felix Botner univentionstaff 2013-10-22 16:34:52 CEST
(In reply to Felix Botner from comment #3)
> 28univention-nagios-server.uinst:
> 
> "join_script_remove_script_from_status_file" has to be
> "joinscript_remove_script_from_status_file"
Comment 6 Lukas Walter univentionstaff 2013-10-22 17:27:09 CEST
(In reply to Felix Botner from comment #5)
> (In reply to Felix Botner from comment #3)
> > 28univention-nagios-server.uinst:
> > 
> > "join_script_remove_script_from_status_file" has to be
> > "joinscript_remove_script_from_status_file"

Right, I've corrected this.
Comment 7 Felix Botner univentionstaff 2013-10-24 10:02:36 CEST
please add a nagios service to the host in the join script

ucs_addServiceToLocalhost "NAGIOS" "$@"

and remove the service in the unoin script

ucs_removeServiceFromLocalhost "NAGIOS" "$@" || die

and delete objects in the ldap (udm groups/group remove ...) only if the service in unused in the domain

if ucs_isServiceUnused "$SERVICE" "$@"
then
... udm remove ...

fi
Comment 8 Lukas Walter univentionstaff 2013-10-24 12:27:48 CEST
univention-nagios (7.0.5-1) unstable; urgency=low

  * append NAGIOS service to local host in join script
  * remove NAGIOS service from local host in unjoin script
  * only delte Nagios admins group when NAGIOS service is completly remove
    from domain (Bug #32453)

svn 45560
Comment 9 Felix Botner univentionstaff 2013-10-24 16:34:46 CEST
please remove the unjoin script from /usr/lib/univention-install/ in the postinst, like

if [ "$1" = "configure" ]; then
    uinst=/usr/lib/univention-install/04univention-samba4.uinst
    [ -e "$uinst" ] && rm "$uinst"
fi
Comment 10 Lukas Walter univentionstaff 2013-10-25 11:47:36 CEST
(In reply to Felix Botner from comment #9)
> please remove the unjoin script from /usr/lib/univention-install/ in the
> postinst, like
> 
> if [ "$1" = "configure" ]; then
>     uinst=/usr/lib/univention-install/04univention-samba4.uinst
>     [ -e "$uinst" ] && rm "$uinst"
> fi

Adapted.
Comment 11 Felix Botner univentionstaff 2013-10-25 15:27:22 CEST
OK
Comment 12 Stefan Gohmann univentionstaff 2013-11-19 06:42:13 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".