Bug 53182 - Debugging of failed server_password_change not possible because timestamps are missing
Debugging of failed server_password_change not possible because timestamps ar...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Password changes
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-0-errata
Assigned To: Erik Damrose
Arvid Requate
:
Depends on:
Blocks: 54019 54273
  Show dependency treegraph
 
Reported: 2021-04-28 12:24 CEST by Dirk Schnick
Modified: 2021-12-23 17:51 CET (History)
4 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?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.154
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021032221000553
Bug group (optional):
Max CVSS v3 score:


Attachments
Bug53182QA.diff (11.60 KB, patch)
2021-10-15 14:21 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schnick univentionstaff 2021-04-28 12:24:54 CEST
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.
Comment 2 Jan Luttermann univentionstaff 2021-10-08 15:32:23 CEST
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
Comment 3 Arvid Requate univentionstaff 2021-10-15 14:21:20 CEST
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
Comment 4 Erik Damrose univentionstaff 2021-10-22 16:00:01 CEST
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
Comment 5 Arvid Requate univentionstaff 2021-10-25 19:38:45 CEST
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.
Comment 6 Florian Best univentionstaff 2021-10-26 11:37:40 CEST
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.
Comment 7 Arvid Requate univentionstaff 2021-11-01 16:04:36 CET
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.