Bug 207611

Summary: zmd fills /var/log, making the system unusable
Product: [openSUSE] SUSE Linux 10.1 Reporter: Mathias Homann <Mathias.Homann>
Component: ZenworksAssignee: Chris Rivera <crivera>
Status: RESOLVED FIXED QA Contact: Mauro Parra Miranda <mauro>
Severity: Blocker    
Priority: P5 - None CC: aj, andreas.hanke
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: SuSE Linux 10.1   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Mathias Homann 2006-09-22 08:37:48 UTC
i'm running /var/log on a separate partition of 512 megs.


now, zmd managed to FILL that in less than three weeks, mainly due to being overly verbose AND not having all of its logfiles (namely zmd-messages.log) configured in /etc/logrotate.d

The results of a filled /var/log:

- X11 refused to start
- zmd and yast forgot ALL of their installation sources.

since the machine in question is used as a desktop workstation, having no X11 is really annoying.

Is there a way to stop zmd from sprouting megabytes of logfiles when doing nothing?
Comment 1 Mathias Homann 2006-09-22 08:41:35 UTC
i just found that yast still knows its sources.
how do i get those back into zmd?
refreshing them manually?
Comment 2 Mathias Homann 2006-09-22 19:29:48 UTC
i tried to add all the sources back, which first didnt work because zmd forgot to unlock its database.

Anyways, I've set both log-level and syslog-level to "none" but /var/log/zmd-backend.log still keeps growing. just adding my installation sources back grew it from 0 bytes to over 60 megabytes! and since this source refresh happens at least once a day...

Comment 3 Mathias Homann 2006-09-23 10:04:47 UTC
i added zmd-backend.log to logrotate, and got a nice shiny empty logfile.
then, i restarted zmd, which grew the logfile to FIFTY-SIX MEGABYTES!
just now, the simple action of "rug sl" added another THIRTY MEGABYTES!

btw, here's the output of "rug get -d|grep log:
mathias@pippin:/var/log> rug get -d |grep log
log-exception-traces      | False
log-level                 | off
log-soap-xml              | False
syslog-level              | off

So i think the fact that four reboots (or rather, 4 restarts of zmd) are enough to fill /var/log (on a separate partition of 512megs) are enough to make my system unusable should be considered a critical flaw.
Comment 4 Mathias Homann 2006-09-25 09:05:38 UTC
just look at this:
pippin:/var/log # head -1 zmd-backend.log ; tail -1 zmd-backend.log ; du -sch zmd-backend.log
2006-09-24 23:00:32 <1> pippin(32508) [parse-metadata] parse-metadata.cc(main):139 -------------------------------------
2006-09-25 10:59:03 <1> pippin(26970) [media] MediaManager.cc(restoreAutoMounter):248 Restored HAL volume handling (automounter)
122M    zmd-backend.log
122M    total
pippin:/var/log #                       

its the first and the last line of zmd-backend.log. note the timestamps. note the size. tell me any valid reason for zmd being so chatty.
Comment 5 Stanislav Visnovsky 2006-09-25 12:08:09 UTC
It's about the backend log.
Comment 6 Stanislav Visnovsky 2006-09-25 12:13:08 UTC
Klaus, is this the bug you've fixed recently?
Comment 7 Klaus Kämpf 2006-09-25 12:54:45 UTC
Yes. 
Comment 9 Mathias Homann 2006-09-25 12:57:43 UTC
then put the fix out as an update to zmd... i'd even betatest it...
oh and btw, /var/log/Yast2 is growing fast, too.
Comment 10 Stanislav Visnovsky 2006-09-26 12:41:52 UTC
Fixed for 10.2.
Comment 11 Mathias Homann 2006-09-26 13:05:09 UTC
and where's the patch for 10.1?
i mean, this bug crippled my 10.1 machine once already... hence, reopened.
Comment 12 Mathias Homann 2006-09-27 07:30:55 UTC
just to get my point across:
this morning my laptop wouldn't boot, again, due to /var/log full with 360megs of zmd-backend.log.
Comment 14 Federico Lucifredi 2006-10-11 22:00:57 UTC
we are considering this fixed for 10.2, and we understand that NUE will use this bug to track a 10.1 patch.

Stano, please route this to the appropriate QA contact.
Comment 15 Mauro Parra Miranda 2006-10-13 21:57:52 UTC
Adding log rollback and delete old versions. Reassigning to Chris. 

Need to be released as patch for 10.1 users. 
Comment 16 Chris Rivera 2006-10-16 18:21:08 UTC
svn revision 35478 adds support for log-max-files-size preference in zmd.  This is the total size of all zmd-messages.log files to keep around.  The default is 50MB.  Zmd uses log4net, which has support for rotating and removing old logs.  This is fixed for 10.2.

I set the log4net properties to stay at 50MB in the 10.1/SLED10 branch.  I didn't add the preference here because it requires documentation and strings to be translated.
Comment 17 Mathias Homann 2006-10-16 19:21:29 UTC
re #16:

> This is fixed for 10.2.

and this helps me how?
Remember, this bug was filed against 10.1. So, unless a patch for 10.1 is out, i can't consider this fixed.
Comment 18 Federico Lucifredi 2006-10-16 22:11:12 UTC
Mathias, the bug is first resolved in the HEAD of development, and if PM decides to, it is then backported to the previous releases as a Suse patch. This is the first step in fixing the problem, and now the bug will go to QA.

Please watch your tone, as NUE has a standing practice to prioritize patient users over snappy ones so that the tone of the bugtracker remains civil.
Comment 19 Federico Lucifredi 2006-10-16 22:11:42 UTC
assigning to Mauro for testing.
Comment 21 Mathias Homann 2006-10-17 05:46:41 UTC
re #18:

Sorry, but this "we have a bug, we have a fix, we might not issue the fix for the current release, but we fix it in the next"-approach is not really helping to keep me patient.
With the sheer number of 10.1 bugs that got a "fixed for 10.2" in this bugtracker, 10.1 customers should get a 10.2 for free.
Comment 22 Anja Stock 2006-10-17 15:07:30 UTC
released for 10.1
Comment 23 Mathias Homann 2006-10-17 15:20:03 UTC
is that the libzypp-1.3.2-0.9 that came by RUG yesterday?

thanks a lot, guys.
Comment 24 Mathias Homann 2006-10-17 18:22:42 UTC
hm.

pippin:/var/log # head -1 zmd-backend.log; tail -1 zmd-backend.log; du -sch zmd-backend.log
2006-10-17 20:08:15 <1> pippin(13231) [parse-metadata] parse-metadata.cc(main):139 -------------------------------------
2006-10-17 20:14:09 <1> pippin(16328) [media] MediaManager.cc(restoreAutoMounter):248 Restored HAL volume handling (automounter)
2.7M    zmd-backend.log


close to 3 megs, just for starting zmd...

and the content looks like zmd is still stuck on log-level=debug even when configured for "fatal"...

And to put it out in the open, with log-level=fatal i expect nothing else than a timestamp like for starting zmd, a timestamp for stopping, and a line whenever an action fails to complete. For example, when zmd hits a 404 when getting a rpm file.

nothing more.

but still, its an improvement.