Bug 8079 - Errors from rrdtool are not handled correctly
Summary: Errors from rrdtool are not handled correctly
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Administration (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-30 15:28 CET by Pierre Ossman
Modified: 2023-02-21 14:31 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2023-01-30 15:28:48 CET
tlwebadm calls rrdtool to generate the license graphs. This call rarely goes wrong, but there could be bugs that cause it to fail. Unfortunately we don't deal with these failures properly.

The code assumes that rrdtool will return with a non-zero error code. Unfortunately it never does that.

The code also assumes it will get an error message on stdout, but rrdtool writes the error on stderr. We don't redirect stderr, which means it ends up in the log file without any formatting:

> ERROR: unknown option '--border'
> 2023-01-30 15:21:37 INFO tlwebadm[283392]: [::ffff:10.47.1.240] 'GET /status/viewlicenses?days=1&width=640&height=400 HTTP/1.1' 200 -

Note You need to log in before you can comment on or make changes to this bug.