From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx13r-00052L-Nk for qemu-devel@nongnu.org; Fri, 05 Dec 2014 17:09:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xx13i-0004zD-5S for qemu-devel@nongnu.org; Fri, 05 Dec 2014 17:09:15 -0500 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:45142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx13h-0004yy-UK for qemu-devel@nongnu.org; Fri, 05 Dec 2014 17:09:06 -0500 Received: by mail-wg0-f52.google.com with SMTP id a1so2001105wgh.25 for ; Fri, 05 Dec 2014 14:09:05 -0800 (PST) Received: from [192.168.10.150] (net-93-146-133-240.cust.vodafonedsl.it. [93.146.133.240]) by mx.google.com with ESMTPSA id t6sm35328253wjf.49.2014.12.05.14.09.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Dec 2014 14:09:04 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54822CFE.5040506@redhat.com> Date: Fri, 05 Dec 2014 23:09:02 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20141205213518.GD84915@thor.bakeyournoodle.com> In-Reply-To: <20141205213518.GD84915@thor.bakeyournoodle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Providing a mechanism to reopen() file based chardevs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/12/2014 22:35, Tony Breeds wrote: > Hi All, Openstcak (Nova) has had an issue for a longish time where > a running instance (qemu via libvirt) which has a file based > console can fill the disk of the hypervisor causing all guests to > stall. > > I'm looking at ways to fix this. Clearly it can be done in > openstack wothout changing qemu but it seems to be that a better > idea would be to teach qemu to reopen() these files when it > recieves a sighup and/or something in the monitor. > > I like the idea of sighup as it allows systems administrators to > use logrotate thereby avoiding baking policy into qemu. > > My initial thoughts are that I'd need to add a flag to the chardev > (perhaps allowreopen?) and upon reciept of the reopen request I'd I > iterate over the open chardevs and reopen them if they have this > flag set. > > The main target of this would be a console log. > > So my main question is would that be something that would be > considered for 2.3.0? If so any high level design points I shoudl > consider? > > - Is the chardev flag a good/bad idea? - Is it okay to change the > action taken by sighup? I think so. Should it reopen stdout/stderr too? If you want to make it optional, you can add a suboption to -msg. Paolo