qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Ján Tomko" <jtomko@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>,
	Chris Friesen <chris.friesen@windriver.com>
Cc: libvir-list@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [libvirt] qemu leaving unix sockets behind after VM is shut down
Date: Tue, 13 May 2014 15:24:20 +0200	[thread overview]
Message-ID: <53721D04.2090803@redhat.com> (raw)
In-Reply-To: <20140506133957.GX15810@stefanha-thinkpad.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1476 bytes --]

On 05/06/2014 03:39 PM, Stefan Hajnoczi wrote:
> On Tue, Apr 01, 2014 at 02:34:58PM -0600, Chris Friesen wrote:
>> When running qemu with something like this
>>
>> -device virtio-serial \
>> -chardev socket,path=/tmp/foo,server,nowait,id=foo \
>> -device virtserialport,chardev=foo,name=host.port.0
>>
>> the VM starts up as expected and creates a socket at /tmp/foo as expected.
>>
>> However, when I shut down the VM the socket at /tmp/foo is left
>> behind in the filesystem.  Basically qemu has "leaked" a file.
>>
>> With something like OpenStack where we could be creating/destroying
>> many VMs this could end up creating a significant number of files in
>> the specified directory.
>>
>> Has any thought been given to either automatically cleaning up the
>> unix socket in the filesystem when qemu exits, or else supporting
>> the abstract namespace for unix sockets to allow for automatic
>> cleanup?

I have sent a libvirt patch to clean up the sockets on qemu shutdown:
https://www.redhat.com/archives/libvir-list/2014-May/msg00398.html

Jan

> 
> Libvirt has a special case for the monitor socket in its
> qemuProcessStop() function.
> 
> Are you using the OpenStack libvirt driver?
> 
> Perhaps QEMU should support cleanup but first I think we should check
> the situation with libvirt.
> 
> Stefan
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      parent reply	other threads:[~2014-05-13 13:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 20:34 [Qemu-devel] qemu leaving unix sockets behind after VM is shut down Chris Friesen
2014-05-06 13:39 ` Stefan Hajnoczi
2014-05-06 14:29   ` [Qemu-devel] [libvirt] " Daniel P. Berrange
2014-05-06 14:52   ` [Qemu-devel] " Chris Friesen
2014-05-06 17:25     ` [Qemu-devel] [libvirt] " Eric Blake
2014-05-13 13:24   ` Ján Tomko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53721D04.2090803@redhat.com \
    --to=jtomko@redhat.com \
    --cc=chris.friesen@windriver.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).