VMware NSX integration: How Local macs are updated to NSX controller after reload

  • 1
  • Question
  • Updated 1 year ago

Short version:

I was trying to understand one behavior when deploying hardware VxLAN gateways with VMWare's NSX as controller. I understand that the hardware switch will push the locally learned macs(Ucast_macs_local table of ovsdb-server's DB) to the NSX controller via OVSDB.

Suppose the switch has rebooted and the VTEP DB is not persistent across reload, then how would the switch can convey the controller that to withdraw the macs it has pushed to the controller??

Long version:
Details of my question with an example:

  1. Say HW-VTEP1 is connected to NSX controller. OVSDB is the protocol used between them.
  2. Now HW-VTEP1 learns mac1 and adds it in Ucast_macs_local table of ovsdb-server's DB(kept within the switch). I guess NSX is monitoring this table and hence NSX gets notification about mac1.
  3. Now HW-VTEP1 reloads and say the ovsdb-server's DB is not persistent. This means the Ucast_macs_local table in ovsdb would become empty. So the switch won't be able to convey that "delete mac1" to NSX. As a result, NSX would be having this mac1 entry in its mac-table, which is stale.

I was reading on https://docs.cumulusnetworks.com/display/CL22/Integrating+with+VMware+NSX#IntegratingwithVMwareNSX-P....
Here it says that the ovsdb-server's DB could be made persistent. But in the latest version, this section has been removed. So wondering how we would be able to handle the scenario I described above.

Photo of Arunkumar Rg

Arunkumar Rg

  • 92 Points 75 badge 2x thumb
  • confused :-)

Posted 1 year ago

  • 1
Photo of Jason Guy

Jason Guy, Employee

  • 1,692 Points 1k badge 2x thumb
Here is the current doc...it has not changed a lot. 

Basically the OVSDB is maintained in a file on the disk. When the switch is rebooted, the NSX controller notices the TCP session go down, and will try to reconnect. The controller would be then responsible for notifying the hypervisors that the mac's are not reachable. Once the switch comes up, the NSX controller will reconnect to the switch, and sync the OVSDB. You don't really want the OVSDB to be persistent, but rather you want it to always be up-to-date with the NSX controller.
Photo of Arunkumar Rg

Arunkumar Rg

  • 92 Points 75 badge 2x thumb

Hi Jason Guy,

Thanks for looking into this!

I see your point. What wonders me is, if the ovsdb need not be persistent why to keep the ovsdb in the disk? why not keep it in the RAM itself?

Thanks,

Arun.

Photo of Jason Guy

Jason Guy, Employee

  • 1,692 Points 1k badge 2x thumb
What if you restart the process? Chances are the database would be the same a second later....so it is easier to read it out of the file. It is like a cache...not really something to think about too much...it works well.
Photo of Arunkumar Rg

Arunkumar Rg

  • 92 Points 75 badge 2x thumb
Got it! Thanks!