Bug 212081

Summary: XenD overwrites existing xend-debug.log data after restart
Product: Red Hat Enterprise Linux 5 Reporter: Daniel Berrangé <berrange>
Component: xenAssignee: Rik van Riel <riel>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: beta2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-23 01:40:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.