qemu: Handle EEXIST gracefully in qemuDomainCreateDevice
qemu: Handle EEXIST gracefully in qemuDomainCreateDevice

https://bugzilla.redhat.com/show_bug.cgi?id=1406837

Imagine you have a domain configured in such way that you are
assigning two PCI devices that fall into the same IOMMU group.
With mount namespace enabled what happens is that for the first
PCI device corresponding /dev/vfio/X entry is created and when
the code tries to do the same for the second mknod() fails as
/dev/vfio/X already exists:

2016-12-21 14:40:45.648+0000: 24681: error :
qemuProcessReportLogError:1792 : internal error: Process exited
prior to exec: libvirt: QEMU Driver error : Failed to make device
/var/run/libvirt/qemu/windoze.dev//vfio/22: File exists

Worse, by default there are some devices that are created in the
namespace regardless of domain configuration (e.g. /dev/null,
/dev/urandom, etc.). If one of them is set as backend for some
guest device (e.g. rng, chardev, etc.) it's the same story as
described above.

Weirdly, in attach code this is already handled.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

crobinso/libvirt,VenkatDatta/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,eskultety/libvirt,crobinso/libvirt,VenkatDatta/libvirt,VenkatDatta/libvirt,nertpinx/libvirt,nertpinx/libvirt,nertpinx/libvirt,eskultety/libvirt,jardasgit/libvirt,taget/libvirt,olafhering/libvirt,crobinso/libvirt,libvirt/libvirt,nertpinx/libvirt,datto/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,datto/libvirt,zippy2/libvirt,jardasgit/libvirt,olafhering/libvirt,datto/libvirt,nertpinx/libvirt,libvirt/libvirt,taget/libvirt,taget/libvirt,eskultety/libvirt,zippy2/libvirt,libvirt/libvirt,jardasgit/libvirt,taget/libvirt,jfehlig/libvirt,andreabolognani/libvirt,datto/libvirt,jfehlig/libvirt,zippy2/libvirt,fabianfreyer/libvirt,olafhering/libvirt,eskultety/libvirt,jfehlig/libvirt,eskultety/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,libvirt/libvirt,jardasgit/libvirt,olafhering/libvirt,VenkatDatta/libvirt,jardasgit/libvirt,andreabolognani/libvirt,datto/libvirt,crobinso/libvirt,zippy2/libvirt,taget/libvirt,jfehlig/libvirt