[libvirt] [PATCH v2] util: netdevbridge: fall back to ioctl from sysfs

Christian Ehrhardt christian.ehrhardt at canonical.com
Fri Nov 23 06:42:43 UTC 2018


On Tue, Nov 20, 2018 at 1:26 PM Daniel P. Berrangé <berrange at redhat.com>
wrote:

> On Tue, Nov 20, 2018 at 01:25:46PM +0100, Christian Ehrhardt wrote:
> > There are certain cases e.g. containers where the sysfs path might
> > exists, but might fail. Unfortunately the exact restrictions are only
> > known to libvirt when trying to write to it so we need to try it.
> >
> > But in case it fails there is no need to fully abort, in those cases try
> > to fall back to the older ioctl interface which can still work.
> >
> > That makes setting up a bridge in unprivileged LXD containers work.
> >
> > Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1802906
> >
> > Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> > Reported-by: Brian Candler <b.candler at pobox.com>
> > ---
> >  src/util/virnetdevbridge.c | 48 +++++++++++++++++++++-----------------
> >  1 file changed, 26 insertions(+), 22 deletions(-)
>
> Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
>

Thanks for the review Daniel!

Brian (on CC) also tested a Ubuntu build with the fix applied and it worked
for him in unprivileged containers.

There was no other feedback in the last three days.
But this is no area I feel entitled to push the change on my own, therefore
I wanted to ping on this - ping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20181123/0b399f5a/attachment-0001.htm>


More information about the libvir-list mailing list