Bug 212081 - XenD overwrites existing xend-debug.log data after restart
Summary: XenD overwrites existing xend-debug.log data after restart
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Rik van Riel
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-24 21:44 UTC by Daniel Berrangé
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: beta2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-23 01:40:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2006-10-24 21:44:16 UTC
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):
xen-3.0.3-2.el5

How reproducible:
Always

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 Program Management 2006-10-24 23:04:39 UTC
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 Berrangé 2006-10-25 16:14:46 UTC
Patch is upstream now

http://xenbits.xensource.com/xen-unstable.hg?cs=0c7923eb6b98


Comment 5 Jay Turner 2006-11-20 20:16:48 UTC
QE ack for RHEL5.

Comment 6 RHEL Program Management 2006-12-23 01:40:11 UTC
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.