Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1490482

Summary: Send RARP packets whenever a guest tap interface's connection is changed
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: kganesa2
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Luyao Huang <lhuang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.0CC: danken, dgilbert, dholler, dyuan, ehabkost, fsoppels, jsuchane, kganesa2, laine, mkalinin, mst, mtessun, pbonzini, rbalakri, xuzhang
Target Milestone: rcKeywords: FutureFeature, Reopened
Target Release: ---Flags: knoel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1492119 1504784 (view as bug list) Environment:
Last Closed: 2020-02-18 13:43:09 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1465492, 1504784    
Bug Blocks:    
Attachments:
Description Flags
qemu_networks none

Description kganesa2 2017-09-11 17:37:16 UTC
Description of problem:
This issue is seen during ACI-RHEV integration. unidirectional pings works from VM1 in RedHat Host1 to VM2 in RedHat Host2. The ping stops when the VM2 vNic is changed to a different network. Looks like linux bridge do not send RARP when a vNIC is brought up in a VLAN.The ACI TOR has learned about the MAC of this VM in previous network(VLAN).

In the case of VMWare DVS, Cisco DVS there will be RARP packets being sent from virtual switch on hypervisor, which updates switches about reachability of this MAC in new VLAN.

Version-Release number of selected component (if applicable):


How reproducible:
Easily reproducible

Steps to Reproduce:
1. Do a unidirectional ping from VM1 to VM2 between two Redhat virtualization hosts.
2. Change the vNic of VM2 to a different network
3. Ping stops

Actual results:


Expected results:


Additional info:

Comment 3 Laine Stump 2017-09-12 13:59:49 UTC
This is assigned to libvirt, but there isn't enough information in the description to understand what it is that libvirt is alleged to be doing or not doing (or what it *should* be doing), nor any particulars about the configuration.

The problem statement talks about "Linux bridges", but also about VLANs. Since there is no support within libvirt for transparently setting VLANs of guest interfaces attached to a Linux Host Bridge, I assume that this setup is using Open vSwitch, but there's no mention of that here.

Also, it says that "VM2 vNIC is moved to a different network". I'm *guessing* that this means that the guest interface remains connected to the same bridge, but that its VLAN changes - is that correct? Where are you changing the VLAN tag? In the guest (VM) itself? Of is your bridge an OVS bridge, and you're changing the VLAN tag transparent to the guest? If so, how?

Can you provide configuration (RHV config would be useful for a RHV networking person, but for libvirt we would really appreciate libvirt XML) to describe the setup, and the exact commands you use (and on which machine) to change the VLAN tag?

Comment 4 kganesa2 2017-09-14 23:57:55 UTC
Created attachment 1326215 [details]
qemu_networks

Comment 5 kganesa2 2017-09-14 23:59:31 UTC
From the ACI, we are creating networks. These networks are pushed to the RHEV Manager. Each network will have a vlan. In the RHEV Manager, When the vNIC of the VM is attached to the network, we expect RARP to be sent out by the linux bridge created for this network(VLAN).

vNIC vlan change is done from the RHEV Manager by selecting the VM's vNIC and assigning a particular network. The vlan change is done in the VM itself from the RHEV Manager.

libvirt xmls attached.

Comment 6 kganesa2 2017-09-15 00:00:17 UTC
From the ACI, we are creating networks. These networks are pushed to the RHEV Manager. Each network will have a vlan. In the RHEV Manager, When the vNIC of the VM is attached to the network, we expect RARP to be sent out by the linux bridge created for this network(VLAN).

vNIC vlan change is done from the RHEV Manager by selecting the VM's vNIC and assigning a particular network. The vlan change is done in the VM itself from the RHEV Manager.

libvirt xmls attached.

Comment 7 kganesa2 2017-09-15 00:01:22 UTC
qemu networks is a tgz archive

Comment 8 kganesa2 2017-09-15 00:01:35 UTC
qemu networks is a tgz archive

Comment 9 Laine Stump 2017-09-15 13:45:29 UTC
The libvirt network configs show that these are standard Linux host bridges, so libvirt isn't involved in any setting of VLAN tags. Based on the description, the change in networks is being initiated by RHV, which I think is using vdsm to change the VLAN tag (it sounds like maybe it is sending a command to the guest OS via a guest agent? Not sure, since I'm unfamiliar with the details of RHV and vdsm). I don't really think there is anything to be done about this problem at the layer of libvirt.

Dan K.: I'm not sure what is the correct place to assign this BZ, since the RHV and vdsm versions aren't known, and also because the Product vs. Component matrix in bugzilla seems mixed up (it's possible to assign to a *Product* called vdsm, and also to a *Component* called vdsm that is under the "Red Hat Enterprise Virtualization Manager" Product. I don't want to accidentally assign it to the wrong place and have it lost, so can you please put it in the right place?

Thanks!

Comment 10 Jaroslav Suchanek 2017-09-15 14:06:35 UTC
Per comment 9 I cloned the bug to vdsm and thus closing this one.

Comment 11 Dan Kenigsberg 2017-09-16 15:24:57 UTC
Laine, I do not consider this a problem; I would phrase this as a request for extension. Let me rephrase the problem, and politely re-open this bug for continued discussion.

Libvirt connects a tap device to a bridge, per request of RHV. Then at some point in time, RHV asks libvirt to change to another bridge, which connects the VM to a fresh LAN. The new LAN, regardless of its vlan id, is unaware of the new location of the VM.

I am suggesting that libvirt triggers a RARP packet notifying the new LAN of the new location of the VM. This is similar to what qemu does when live migration makes a VM pop in a new network location.

Comment 13 Laine Stump 2017-09-20 16:24:24 UTC
Now that Dan has re-described the scenario in terms of libvirt, I understand the situation; since libvirt *does* have control at the point the change is made (and the change is to connect the tap to a new bridge device, *not* to change the vlan tag) it's probably reasonable for libvirt to send the RARP (or whatever) packet.

(The original sounded like the tap device was remaining connected to the same bridge, but the VLAN tag was being changed - in that case there would have been no libvirt-visible event that could be used to trigger anything).


(BTW, this BZ was marked CLOSED/NOTABUG because based on the original description we thought only vdsm would have control during this event, but it is impossible to reassign a libvirt (or qemu or kernel or any other RHEL) bug report to anything under the RHEV product, due to the mandatory "oVirt Team" field - it must be set before the modified bug can be saved, but the field isn't made visible until the bug is saved with the new product name, so you can't set it. As a result, the only way to "reassign" a bug from any RHEL component to a RHEV component is to clone the bug and close the original; Jarda had created the new Bug 1492119 to "reassign". See Bug 1323778 for details of the problem that necessitates such shenanigans.

Comment 14 Laine Stump 2017-09-22 01:16:58 UTC
There are a few complications with this:

* The packet needs to be transmitted by the tap device so that it is received on the bridge port, but libvirt can't really do that, since qemu has control of the other end of the tap, where packets would be injected.

* Depending on the bridge configuration, a packet sent immediately after the tap device is attached would be ignored by the bridge due to STP delay.

Solution: Since qemu already has code to transmit the RARP packet that we want, and sends it 5 times with delay between (thus increasing the chances that one will get through), maybe what we need is for qemu to have a new "advertise MAC" command, or something like that (maybe just "send RARP"). As soon as libvirt connects to the new bridge, it notifies qemu that the connection of the tap device has changed by sending a "send RARP" command, and qemu responds by calling qemu_announce_self() (which sets timer callbacks to send the 5 RARP packets). This gets yet another package involved, but I think it's the cleanest way to do it.

Michael, does this sound reasonable to you?

Comment 15 Dr. David Alan Gilbert 2017-09-22 08:35:50 UTC
(In reply to Laine Stump from comment #14)
> There are a few complications with this:
> 
> * The packet needs to be transmitted by the tap device so that it is
> received on the bridge port, but libvirt can't really do that, since qemu
> has control of the other end of the tap, where packets would be injected.
> 
> * Depending on the bridge configuration, a packet sent immediately after the
> tap device is attached would be ignored by the bridge due to STP delay.
> 
> Solution: Since qemu already has code to transmit the RARP packet that we
> want, and sends it 5 times with delay between (thus increasing the chances
> that one will get through), maybe what we need is for qemu to have a new
> "advertise MAC" command, or something like that (maybe just "send RARP"). As
> soon as libvirt connects to the new bridge, it notifies qemu that the
> connection of the tap device has changed by sending a "send RARP" command,
> and qemu responds by calling qemu_announce_self() (which sets timer
> callbacks to send the 5 RARP packets). This gets yet another package
> involved, but I think it's the cleanest way to do it.
> 
> Michael, does this sound reasonable to you?

That command exists in a set that Vlad pulled together, with the command originally added by Germano:

https://lists.gnu.org/archive/html/qemu-devel/2017-05/threads.html#05594

it needs a bit of a tidy up and repost, but I think that has what you need.

Comment 17 Laine Stump 2018-06-08 17:38:58 UTC
As far as I can find, the patchset Dave pointed out in comment 15 was never pushed to upstream qemu. Vlad - are there any plans to do that?

Comment 18 Laine Stump 2018-06-25 14:30:38 UTC
I just realized that I had been equating this BZ with Bug 1094398 in my mind, since they're both asking for almost the exact same thing, and require the same capability from qemu. While this BZ asks for libvirt to trigger an announcement whenever the tap device is connected to a different bridge (which would be something done directly via libvirt) while Bug 1094398 is asking for the announcement when something in the underlying infrastructure changes (in their example, a bond failover).

In any case,  both of them require the qemu_self_announce() QMP command.

Comment 24 Dr. David Alan Gilbert 2019-03-06 10:11:49 UTC
The qemu announce code changes just got merged upstream; if you need any help with them give me a poke.

Comment 28 Jaroslav Suchanek 2020-02-18 13:43:09 UTC

*** This bug has been marked as a duplicate of bug 1094398 ***