Bug 55266 - check_univention_samba_drs_failures logs exceptions causing cron emails
check_univention_samba_drs_failures logs exceptions causing cron emails
Status: NEW
Product: UCS
Classification: Unclassified
Component: Monitoring (Prometheus or Nagios)
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-13 19:18 CEST by Florian Best
Modified: 2024-02-14 14:02 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
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.034
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023041821000583
Bug group (optional): bitesize, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2022-10-13 19:18:04 CEST
The exception handling of check_univention_samba_drs_failures sends an email via cron every 5 minutes in unknown conditions:

(3221356597, 'The operation cannot be performed.')
Traceback (most recent call last):
  File "/usr/share/univention-monitoring-client/scripts//check_univention_samba_drs_failures", line 78, in write_metrics
    consecutive_sync_failures = _CheckSambaDrsRepl().check()
  File "/usr/share/univention-monitoring-client/scripts//check_univention_samba_drs_failures", line 59, in check
    (info_type, info) = self.drsuapi.DsReplicaGetInfo(self.drsuapi_handle, 1, req1)
samba.NTSTATUSError: (3221356597, 'The operation cannot be performed.')

https://help.univention.com/t/univention-monitoring-client-throwing-exceptions-after-upgrade-to-5-0-2/20131/10

→ we should either find out why this happens and fix it or just don't log it as error but as debug message. (The prior nagios check ignored the error as well).
Comment 1 Stefan Gohmann univentionstaff 2023-04-20 12:36:49 CEST
I'm able to reproduce it:

root@backup11:~# ucr set samba/debug/level='2' 
Setting samba/debug/level
Multifile: /etc/samba/smb.conf
root@backup11:~# /usr/share/univention-monitoring-client/scripts/check_univention_samba_drs_failures 2>&1 | wc -l
0
root@backup11:~# ucr set samba/debug/level='3' 
Setting samba/debug/level
Multifile: /etc/samba/smb.conf
root@backup11:~# /usr/share/univention-monitoring-client/scripts/check_univention_samba_drs_failures 2>&1 | wc -l
16
root@backup11:~# 

root@backup11:~# /usr/share/univention-monitoring-client/scripts/check_univention_samba_drs_failures
ldb_wrap open of secrets.ldb
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'ncalrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'http_negotiate' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
Using binding ncacn_ip_tcp:backup11.deadlock10.intranet[,seal]
root@backup11:~#
Comment 2 Arvid Requate univentionstaff 2023-04-20 13:27:46 CEST
Re: original bug:

> → we should either find out why this happens and fix it or just don't log it as error but as debug message. (The prior nagios check ignored the error as well).

Yes, we should find out the `The operation cannot be performed.` error.
I could imagine that this was fallout from Bug 55486 / Bug 55595, because
that caused samba-dcerpcd having issues.

I think the second issue is a separate thing, but I'm fine with making
that the goal of this bug.