Bug 43778 - univention-fix-ucr-dns logs "__main__", script name would be more helpful
univention-fix-ucr-dns logs "__main__", script name would be more helpful
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: DNS
UCS 4.2
Other Linux
: P5 enhancement (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-09 18:10 CET by Arvid Requate
Modified: 2020-07-03 20:53 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: 6: Setup Problem: Issue for the setup process
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.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:
requate: Patch_Available+


Attachments
setup_logging.patch (2.30 KB, patch)
2017-03-09 18:10 CET, Arvid Requate
Details | Diff
setup_logging.patch v2 (3.76 KB, patch)
2017-03-10 08:10 CET, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2017-03-09 18:10:16 CET
Created attachment 8513 [details]
setup_logging.patch

The log messages issued by univention-fix-ucr-dns don't mention the name of the script, just "__main__". The attached patch fixes that.

Before:

root@backup101:~# /usr/share/univention-server/univention-fix-ucr-dns -d                                                                                                       
2017-03-09 18:04:20,485 INFO    __main__.ucr/fwd  Found forwarder 10.200.8.1 from UCRV dns/forwarder1
2017-03-09 18:04:20,489 INFO    __main__.ucr/fwd  Found forwarder 10.200.8.100 from UCRV dns/forwarder2
2017-03-09 18:04:20,490 INFO    __main__.ucr/ns   Found server 10.200.8.101 from UCRV nameserver1
2017-03-09 18:04:20,490 INFO    __main__.ucr/ns   Found server 10.200.8.100 from UCRV nameserver2
2017-03-09 18:04:20,494 INFO    __main__.val      Validated UCS domain server: 10.200.8.101
2017-03-09 18:04:20,496 INFO    __main__.val      Validated UCS domain server: 10.200.8.100
2017-03-09 18:04:20,496 INFO    __main__.xor      Skip removing nameservers from forwarders
2017-03-09 18:04:20,496 INFO    __main__          No action required.

After:

root@backup101:~# ./univention-fix-ucr-dns -d                                                                                                                                  
2017-03-09 18:05:06,992 INFO    univention-fix-ucr-dns Found forwarder 10.200.8.1 from UCRV dns/forwarder1
2017-03-09 18:05:06,995 INFO    univention-fix-ucr-dns Found forwarder 10.200.8.100 from UCRV dns/forwarder2
2017-03-09 18:05:06,996 INFO    univention-fix-ucr-dns Found server 10.200.8.101 from UCRV nameserver1
2017-03-09 18:05:06,996 INFO    univention-fix-ucr-dns Found server 10.200.8.100 from UCRV nameserver2
2017-03-09 18:05:07,000 INFO    univention-fix-ucr-dns Validated UCS domain server: 10.200.8.101
2017-03-09 18:05:07,001 INFO    univention-fix-ucr-dns Validated UCS domain server: 10.200.8.100
2017-03-09 18:05:07,002 INFO    univention-fix-ucr-dns Skip removing nameservers from forwarders
2017-03-09 18:05:07,002 INFO    univention-fix-ucr-dns No action required.


+++ This bug was initially created as a clone of Bug #43217 +++
Comment 1 Philipp Hahn univentionstaff 2017-03-10 08:10:40 CET
Created attachment 8515 [details]
setup_logging.patch v2

(In reply to Arvid Requate from comment #0)
...
> The log messages issued by univention-fix-ucr-dns don't mention the name of
> the script, just "__main__". The attached patch fixes that.

The proposed patch looses the hierarchy:

> Before:
> [...] INFO    __main__.ucr/fwd  [...]
                         ^^^^^^^
...
> After:
> [...] INFO    univention-fix-ucr-dns [...]

That information is important.
Better do this:
sed -i -e '/getLogger/s/__name__//' -e '/FORMAT/s/-17s/-8s/' base/univention-server/univention-fix-ucr-dns
Comment 2 Ingo Steuwer univentionstaff 2020-07-03 20:53:49 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.