Config option to enable debug logging

Bug #133551 reported by Gaute Lund
4
Affects Status Importance Assigned to Milestone
unattended-upgrades (Ubuntu)
Fix Released
Undecided
Michael Vogt

Bug Description

Binary package hint: unattended-upgrades

DISCLAIMER: I don't code python, and don't usually post patches. So please bear with me if I stick my foot in my mouth.

BACKGROUND: I have unattended-upgrades running on edgy with a well-working setup. apache2-common didn't get upgraded automatically. Only when I turned on debug logging I discovered this was because it had "conffile prompt". To run unattended-upgrade with debug logging, I had to edit the appropriate line in /etc/cron.daily/apt.

PATCH:
I propose a new config option "Unattended-Upgrade::Debug" which I set to "1" in my /etc/apt/apt.conf.d/50unattended-upgrades.

Now, I modified the /etc/cron.daily/apt script to respect this option and launch unattended-upgrade with the --debug option. I have files a parallell "bug" report including simple patch to the apt package, as the cron script belongs to that package. I am posting here also in case you think it should rather be fixed in /usr/bin/unattended-upgrade.

Revision history for this message
Gaute Lund (gaute-idrift) wrote :

See aditional info at the parallel bug report https://bugs.launchpad.net/ubuntu/+source/apt/+bug/133552

I might be best if it was unattended-upgrade honouring a new config option to produce debug logging, but not debug output to console.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I think for the specific problem described in this bugreport the solution is to show what packages are not upgraded because of conffile prompts in the log file. I fixed that in my bzr tree and it will be part of the next upload.

Personally I'm not sure what the usecase for adding a always-debug option, but I'm happy to add it if there is a good reason. It seems to me that the information that people would like to see with --debug should probably be displayed in the logs then. Only special case stuff (like the md5sums of the conffile prompts etc) that are not useful for anything bug debugging misbehavior should be hidden behind debug. What do you think?

Cheers,
 MIchael

Changed in unattended-upgrades:
assignee: nobody → mvo
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unattended-upgrades - 0.30ubuntu1

---------------
unattended-upgrades (0.30ubuntu1) hardy; urgency=low

  [ John Edwards ]
  * fix missing spaces in the log file (LP: #136452)
  * add better comments and examples to data/50unattended-upgrades

  [ Michael Vogt ]
  * README improved based on Johns suggestions (thanks!)
  * fix grammer and dated reference to dapper (LP: #140038),
    thanks to Christer Edwards for the suggestions
  * add "mailx" to suggests (LP: #137994)
  * show propper log output if mail is not available (LP: #137994)
  * show packages that are held back from the upgrade because of
    conffile prompt in the log as a warning (LP: #133551)
  * create logdir if it does not exist (LP: #87338)
  * fix error when installing from file:// uris (LP: #56832)

 -- Michael Vogt <email address hidden> Mon, 10 Mar 2008 11:57:17 +0100

Changed in unattended-upgrades:
status: Incomplete → Fix Released
Revision history for this message
Gaute Lund (gaute-idrift) wrote :

If packages held back by conffile prompt are shown in the logs w/o debug, I'm personally OK. I can only note that there is still no way to run with --debug enabled without modifying the /etc/cron.daily/apt script - but personally, I don't need this. Case closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.