The dnsHostName value is not always present on all inter-site links, say to DCs that have been deleted. This was seen in 'make test' but not expected to be seen in production, so the fix was not backported.
It self-resolves thanks to the action of the KCC in time, but the python backtrace causes monitoring failures in production.
Fixed in master with 2fc855e7d2458249ca6fc8ffdf1d7633ab84cc55, this bug is to request a backport.
Created attachment 14739 [details]
patch for 4.9
Merge request: https://gitlab.com/samba-team/samba/merge_requests/166
Pushed to autobuild-v4-9-test.
(In reply to Karolin Seeger from comment #2)
Pushed to v4-9-test.
Closing out bug report.