Re: [PATCH] conf: Skip MAC checks when using an auto-generated one during detach-device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30.05.2016 14:09, Kothapally Madhu Pavan wrote:
> When we try to detach a network device without specifying the
> mac address, random mac address is generated. As the generated
> mac address will not be available in the running vm, detaching
> device will fail erroring out "error: operation failed: no
> device matching mac address xx:xx:xx:xx:xx:xx found".
> This patch allows to match DetachDeviec xml using PCI address
> when mac address is not specified.
> 
> Signed-off-by: Kothapally Madhu Pavan <kmp@xxxxxxxxxxxxxxxxxx>
> ---
>  src/conf/domain_conf.c   |  116 +++++++++++++++++++++++++++++-----------------
>  src/conf/domain_conf.h   |    6 ++
>  src/libxl/libxl_driver.c |    4 +-
>  src/lxc/lxc_driver.c     |    6 +-
>  src/qemu/qemu_driver.c   |   40 ++++++++++++++--
>  src/qemu/qemu_hotplug.c  |   16 ++++--
>  src/qemu/qemu_hotplug.h  |    3 +
>  7 files changed, 132 insertions(+), 59 deletions(-)

I don't think this is a good idea. I mean, according to our
documentation, users are required to provide full device XML they want
to detach (see commit c6807b50). The reasoning behind is that even
though today we rely on MAC address, tomorrow we can change that to a
device alias or a combination of some other values and suddenly users
passing just MAC address would break. I wanted to do something similar
in ea7182c but it introduced a regression (fixed in c001eb5bbefd).

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]