Bug 1272483

Summary: [RFE] chardev append support
Product: [Fedora] Fedora Reporter: Attila Fazekas <afazekas>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: amit.shah, berrange, cfergeau, crobinso, dwmw2, itamar, pbonzini, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-19 21:35:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Attila Fazekas 2015-10-16 14:05:18 UTC
Description of problem:

qemu has multiple chardev options, but one of the simplest is not possible.

Basically, I have a libvirt domain where I would like to have all serial console output logged to a single big file, regardless to the number of domain start/stop cycles.

This configuration:

    <console type='file'>
      <source path='/opt/stack/new/ironic-bm-logs/baremetalbrbm_24_console.log'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>

leads to these qemu options:

 -device isa-serial,chardev=charserial0,id=serial0 -chardev file,id=charserial0,path=/opt/stack/new/ironic-bm-logs/baremetalbrbm_24_console.log

qemu at every restart recreates the file, because it was opened with
O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC .

Version-Release number of selected component (if applicable):
qemu-2.3.1-3.fc22


Expected results:

-chardev file,id=charserial0,path=/opt/stack/new/ironic-bm-logs,append

qemu should be able to recognize an option like 'append' and open the file in appending mode, instead of truncating.

This option should be available via libvirt as well.

Comment 1 Cole Robinson 2015-10-19 21:35:58 UTC
FWIW the request seems reasonable to me, but I'm not much of a qemu developer.

Unfortunately RFEs in the Fedora tracker are unlikely to generate any movement, this is really for tracking bugs specific to fedora.

Since it looks like you are using openstack, is this something you want for openstack to use? If so, I'd suggest filing a RHEL qemu-kvm bug and make your case there, that's probably the best way to generate movement for an RFE.

Otherwise please file this in the upstream qemu tracker, and maybe one of the upstream devs will see it go by and jump on it... otherwise your best bet is implementing it yourself :)