Univention Bugzilla – Bug 53182
Debugging of failed server_password_change not possible because timestamps are missing
Last modified: 2021-12-23 17:51:10 CET
We have to debug failed server password changes quite a lot, but in the first step it is mostly not possible as there are no timestamps in the logfile. A logfile should contain always a timestamp, especially when you need to compare with other logfiles. In the case of a failed server password change you need to know when exactly it failed to examine with other logfiles what may cause this. Please improve the server_password_change script and the hook scripts with f.e. ($(date '+%F %T.%N')) in the echos.
UCS 5.0-0 univention-server.yaml 919fa6f8df25 | Bug #53182: changelog entry univention-server (15.0.4-5) a0f020abc439 | Bug #53182: added timestamp to logger output of server password change univention-mail-postfix.yaml 919fa6f8df25 | Bug #53182: changelog entry univention-mail-postfix (14.0.1-3) a0f020abc439 | Bug #53182: added timestamp to logger output of server password change UCS 4.4-8 univention-server.yaml 37f4b31de831 | Bug #53182: changelog entries univention-server (14.0.0-17) eaf19168bcca | Bug #53182: added timestamp to logger output of server password change univention-mail-postfix.yaml 37f4b31de831 | Bug #53182: changelog entries univention-mail-postfix (13.0.4-4) eaf19168bcca | Bug #53182: added timestamp to logger output of server password change
Created attachment 10844 [details] Bug53182QA.diff * I'd propose to add a function to base/univention-lib/shell/base.sh and use that, see attached proposal. There are also a couple of other places to consider: ./services/univention-s4-connector/server_password_change.d ./services/univention-samba4/server_password_change.d ./services/univention-bind/usr/lib/univention-server/server_password_change.d ./services/univention-dhcp/usr/lib/univention-server/server_password_change.d ./services/univention-samba/server_password_change.d ./services/univention-radius/usr/lib/univention-server/server_password_change.d ./base/univention-server/usr/lib/univention-server/server_password_change.d ./management/univention-directory-manager-rest/usr/lib/univention-server/server_password_change.d ./mail/univention-mail-dovecot/usr/lib/univention-server/server_password_change.d ./mail/univention-mail-postfix/usr/lib/univention-server/server_password_change.d
662a9b80dd Bug #53182: Add univention-lib function echowithtimestamp to base.sh, first use is in server password change scripts 5ae7b995a0 Bug #53182: Add timestamps to server_password_change log messages 710a39a4e3 Bug #53182: Add timestamps to server_password_change log messages c1d8746ebe Bug #53182: Add timestamps to server_password_change log messages 02197e448f Bug #53182: Add timestamps to server_password_change log messages 2b1d9b9ef7 Bug #53182: Add timestamps to server_password_change log messages 3b98f93715 Bug #53182: Add timestamps to server_password_change log messages 6bb8498dd6 Bug #53182: Add timestamps to server_password_change log messages 624a1919a6 Bug #53182: yaml The u-lib function echowithtimestamp was added, server password change scripts were modified to use the lib function. univention-bind.yaml univention-dhcp.yaml univention-lib.yaml univention-mail-dovecot.yaml univention-radius.yaml univention-s4-connector.yaml univention-samba4.yaml univention-server.yaml
Verified: * Code review * Package update * Functional test The new solution prefixes messages explicitly generated by the password-change scripts. It doesn't attempt to prefix all output, e.g. from run-parts or ucr commits. Erik added some messages to the password-change scripts, so at least one timestamp from each should allow to interpolate.
REOPEN: (just in case you don't recognize and release it tomorrow): The changes in 4.4-8 haven't been done in a separate bug and Eriks changes haven't been backported.
Thanks for the heads up! For 4.4-8 I've cloned this bug as Bug #54019 and referenced the commit hashes mentioned in Comment 2.
<https://errata.software-univention.de/#/?erratum=5.0x140> <https://errata.software-univention.de/#/?erratum=5.0x141> <https://errata.software-univention.de/#/?erratum=5.0x142> <https://errata.software-univention.de/#/?erratum=5.0x143> <https://errata.software-univention.de/#/?erratum=5.0x144> <https://errata.software-univention.de/#/?erratum=5.0x145> <https://errata.software-univention.de/#/?erratum=5.0x146> <https://errata.software-univention.de/#/?erratum=5.0x147> <https://errata.software-univention.de/#/?erratum=5.0x150>