Bug 1021434 - Libvirt Python bindings fail to properly pass file descriptors
Libvirt Python bindings fail to properly pass file descriptors
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
rawhide
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Martin Kletzander
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-21 05:41 EDT by Marian Neagul
Modified: 2013-10-24 15:28 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-23 03:57:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Marian Neagul 2013-10-21 05:41:22 EDT
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 11:23:41 EDT
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 03:57:24 EDT
Merged upstream:

commit e350826c653b20dd271ab99075d2f224c7451356
Author: Marian Neagul <marian@info.uvt.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.