Re: [PATCH v2] Attach vm-id to Open vSwitch interfaces.

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

 



On 03/07/2012 02:15 AM, Ansis Atteka wrote:
> This patch will allow OpenFlow controllers to identify which interface
> belongs to a particular VM by using the Domain UUID.
>
> ovs-vsctl get Interface vnet0 external_ids
> {attached-mac="52:54:00:8C:55:2C", iface-id="83ce45d6-3639-096e-ab3c-21f66a05f7fa", iface-status=active, vm-id="142a90a7-0acc-ab92-511c-586f12da8851"}
>
> V2 changes:
> Replaced vm-uuid with vm-id. There was a discussion in Open vSwitch
> mailinglist that we should stick with the same DB key postfixes for the
> sake of consistency (e.g iface-id, vm-id ...).

This all looks good, and simply adding the vmuuid argument to the
callchain that goes down to virNetDevOpenvswitchAddPort seems like the
simplest, most consistent way to get the information down to that function.

ACK, and pushed.


> ---
>  src/lxc/lxc_driver.c            |    3 ++-
>  src/network/bridge_driver.c     |    2 +-
>  src/qemu/qemu_command.c         |    3 ++-
>  src/uml/uml_conf.c              |    3 ++-
>  src/util/virnetdevopenvswitch.c |   17 ++++++++++++++---
>  src/util/virnetdevopenvswitch.h |    1 +
>  src/util/virnetdevtap.c         |    3 ++-
>  src/util/virnetdevtap.h         |    1 +
>  8 files changed, 25 insertions(+), 8 deletions(-)
>


>                          "external-ids:iface-status=active",
> @@ -100,6 +110,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname,
>      cleanup:
>          VIR_FREE(attachedmac_ex_id);
>          VIR_FREE(ifaceid_ex_id);
> +        VIR_FREE(vmid_ex_id);
>          VIR_FREE(profile_ex_id);
>          virCommandFree(cmd);
>          return ret;

Hmm. I just now noticed the odd indentation here. I'll take care of that
in a separate small patch.

I'm also sending a patch to call virReportOOMError() when the
virAsprintf() calls in that function fail.

--
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]