Bug 1021434 - Libvirt Python bindings fail to properly pass file descriptors
Summary: Libvirt Python bindings fail to properly pass file descriptors
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Martin Kletzander
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-21 09:41 UTC by Marian Neagul
Modified: 2013-10-24 19:28 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-23 07:57:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
A patch fixing the problem (672 bytes, patch)
2013-10-21 09:41 UTC, Marian Neagul
no flags Details | Diff

Description Marian Neagul 2013-10-21 09:41:22 UTC
Created attachment 814505 [details]
A patch fixing the problem

Description of problem:

The libvirt python api fails to properly pass file descriptors to the libvirt daemon.

The problem resides in the following functions (in ):
1. libvirt_virDomainCreateWithFiles
2. libvirt_virDomainCreateXMLWithFiles


Version-Release number of selected component (if applicable):

All current releases providing FD passing to containers

How reproducible:

Try to pass file descriptors to a container using the aforementioned functions.
The fds are created but mapped to /dev/null instead to the correct FD's


Actual results:
Passed FD's are mapped to /dev/null

Expected results:
Passed FD's should be mapped to the original FD

Additional info:

Comment 1 Martin Kletzander 2013-10-22 15:23:41 UTC
I posted the patch on mailing list for you and reviewed it myself.  I'll also push it if it is accepted.

Feel free to post (unified) patches (against git master) yourself in the future when you have a fix.  It will speed up the things.

I forgot to attach the bug number in the commit message, but here is the link to the patch posted:

https://www.redhat.com/archives/libvir-list/2013-October/msg01009.html

Comment 2 Martin Kletzander 2013-10-23 07:57:24 UTC
Merged upstream:

commit e350826c653b20dd271ab99075d2f224c7451356
Author: Marian Neagul <marian.ro>
Date:   Tue Oct 22 16:03:39 2013 +0100

    python: Fix Create*WithFiles filefd passing


Note You need to log in before you can comment on or make changes to this bug.