Bug 34047 - UMC-Server: Message logs attribute warnings if not application/json
UMC-Server: Message logs attribute warnings if not application/json
Status: CLOSED DUPLICATE of bug 37366
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.x
Assigned To: Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-04 14:10 CET by Dirk Wiesenthal
Modified: 2016-07-04 17:28 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (4.66 KB, patch)
2014-11-07 13:12 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2014-02-04 14:10:06 CET
Message._set_key and in protocol/message.py checks for self.mimetype == MIMETYPE_JSON if some key shall be set (e.g. status). (Same for _get_key)

If the mime type is something else, e.g. in computerroom/screenshot, the log of this module gets filled with useless:

  PARSER      ( PROCESS ) : Attribute status just available for MIME type application/json

three times per request!

Logs contain hundreds of megabytes after a few days when the computerroom module is used.

This is no bug of the computerroom. Those messages are triggered by the UMC server who does not check the mime type before accessing or setting the status.

Either check the mime type everywhere in UMC-server or remove the log message completely (preferred). At least change PARSER.process to PARSER.info so that those messages do not show up in a default installation.
Comment 1 Janis Meybohm univentionstaff 2014-11-03 11:19:02 CET
Ticket#2014082621000327 

(In reply to Dirk Wiesenthal from comment #0)
> If the mime type is something else, e.g. in computerroom/screenshot, the log
> of this module gets filled with useless:
> 
>   PARSER      ( PROCESS ) : Attribute status just available for MIME type
> application/json
> 
> three times per request!

Yes - this is really annoying when digging for real problems (and messes up the filesystem when computerroom is heavily used).
Comment 2 Florian Best univentionstaff 2014-11-07 13:12:50 CET
Created attachment 6324 [details]
patch

Attached a patch which removes the cases where the logging was done and lowers the level of these messages to INFO.
Comment 3 Florian Best univentionstaff 2015-05-12 16:57:34 CEST
fixed there.

*** This bug has been marked as a duplicate of bug 37366 ***
Comment 4 Florian Best univentionstaff 2016-07-04 17:28:17 CEST
<http://errata.univention.de/ucs/4.0/199.html>