Bug 212081 - XenD overwrites existing xend-debug.log data after restart
XenD overwrites existing xend-debug.log data after restart
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rik van Riel
Depends On:
  Show dependency treegraph
Reported: 2006-10-24 17:44 EDT by Daniel Berrange
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: beta2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-12-22 20:40:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2006-10-24 17:44:16 EDT
Description of problem:
When XenD opens its debug log file /var/log/xend-debug.log it only specifies
O_WRONLY | O_CREAT for its open mode. This means that it starts writing new log
messages at the beginning of the log file, rather than the end. So the log file
gets a whole mix of log messages in non-sequential order, making it essentially
useless. The fix is to use either O_APPEND or O_TRUNC when opening the log file.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Start xend
2. Start a guest domain
3. Examine contents of /var/log/xen/xend-debug.log
4. Shutdown guest
5. Restart xend
6. Start guest again
7. Look at xend-debug.log again
Actual results:
New messages are before old messages in the log file

Expected results:
Log messages are sequentially ordered

Additional info:
Comment 1 RHEL Product and Program Management 2006-10-24 19:04:39 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux release.  Product Management has requested further review
of this request by Red Hat Engineering.  This request is not yet committed for
inclusion in release.
Comment 2 Daniel Berrange 2006-10-25 12:14:46 EDT
Patch is upstream now

Comment 5 Jay Turner 2006-11-20 15:16:48 EST
QE ack for RHEL5.
Comment 6 RHEL Product and Program Management 2006-12-22 20:40:11 EST
A package has been built which should help the problem described in 
this bug report. This report is therefore being closed with a resolution 
of CURRENTRELEASE. You may reopen this bug report if the solution does 
not work for you.

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