Univention Bugzilla – Bug 54985
can't remove monitoringAlerts from domaincontroller master object
Last modified: 2022-07-20 18:20:24 CEST
I can't remove an assigned alert from the domaincontroller master object using UDM, neither in the UMC nor on the commandline: * trying "--remove": root@ucs-4942:/# udm computers/domaincontroller_master list |egrep 'DN:|UNIVENTION_JOINSTATUS_WARNING' DN: cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet monitoringAlerts: cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,dc=steuwer-test,dc=intranet root@ucs-4942:/# udm computers/domaincontroller_master modify --dn cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet --remove monitoringAlerts="cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,dc=steuwer-test,dc=intranet" Object modified: cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet root@ucs-4942:/# udm computers/domaincontroller_master list |egrep 'DN:|UNIVENTION_JOINSTATUS_WARNING' DN: cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet monitoringAlerts: cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,dc=steuwer-test,dc=intranet * trying to set the attribute to an empty string: root@ucs-4942:/# udm computers/domaincontroller_master modify --dn cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet --set monitoringAlerts="" Object modified: cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet root@ucs-4942:/# udm computers/domaincontroller_master list |egrep 'DN:|UNIVENTION_JOINSTATUS_WARNING' DN: cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet monitoringAlerts: cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,dc=steuwer-test,dc=intranet "append" seems to work, at least it throws reasonable errors: root@ucs-4942:/# udm computers/domaincontroller_master modify --dn cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet --append monitoringAlerts="cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,dc=steuwer-test,dc=intranet" WARNING: cannot append cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,dc=steuwer-test,dc=intranet to monitoringAlerts, value exists No modification: cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet root@ucs-4942:/# udm computers/domaincontroller_master modify --dn cn=ucs-4942,cn=dc,cn=computers,dc=steuwer-test,dc=intranet --append monitoringAlerts="cn=UNIVENTION_JOINSTATUS_WARNING-2,cn=monitoring,dc=steuwer-test,dc=intranet" E: object not found
Workaround: the opposite way: udm monitoring/alert modify --dn "cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,$ldap_base" --remove assignedHosts="$ldap_hostdn"
Fix is part of the MR in https://git.knut.univention.de/univention/ucs/-/merge_requests/440 and requires an update of the joinscript version as it registers an UDM hook in LDAP.
The hook has been adjusted to unassign hosts. univention-monitoring-client.yaml 57e5aa0087ba | YAML Bug #54947, Bug #54985 univention-monitoring-client (1.0.0-5) e1b62c1ead16 | Bug #54985: fix unassigning monitoringAlerts from computer objects
OK: root@ucs-2742:~# udm computers/domaincontroller_master list |egrep 'DN:|UNIVENTION_JOINSTATUS_WARNING' DN: cn=ucs-2742,cn=dc,cn=computers,dc=mydomain,dc=intranet monitoringAlerts: cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,dc=mydomain,dc=intranet root@ucs-2742:~# udm computers/domaincontroller_master modify --dn cn=ucs-2742,cn=dc,cn=computers,dc=mydomain,dc=intranet --remove monitoringAlerts="cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,dc=mydomain,dc=intranet" Object modified: cn=ucs-2742,cn=dc,cn=computers,dc=mydomain,dc=intranet root@ucs-2742:~# udm computers/domaincontroller_master list |egrep 'DN:|UNIVENTION_JOINSTATUS_WARNING' DN: cn=ucs-2742,cn=dc,cn=computers,dc=mydomain,dc=intranet Same behavior in UMC and with udm monitoring/alert modify --dn "cn=UNIVENTION_JOINSTATUS_WARNING,cn=monitoring,dc=mydomain,dc=intranet" --remove assignedHosts="cn=ucs-2742,cn=dc,cn=computers,dc=mydomain,dc=intranet"
<https://errata.software-univention.de/#/?erratum=5.0x353>