xenserver: Fix up iface-id after it changes or disappears too.
authorBen Pfaff <blp@nicira.com>
Fri, 1 Apr 2011 20:47:51 +0000 (13:47 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 1 Apr 2011 23:05:29 +0000 (16:05 -0700)
commitc6b547cd44f14e3ccbac9dc8d98b20a565d32c91
treef5459896487b37e2bd066d1cc38eed86c7a9e2bd
parent0b0bd9c9e3ebaddea8252ea0ab9b2f293de34553
xenserver: Fix up iface-id after it changes or disappears too.

ovs-xapi-sync is supposed to always keep external-ids:iface-id up to date,
but in fact it would only set it when an interface initially appeared.  If
the interface quickly disappeared and reappeared, then it failed to notice
that iface-id had changed or disappeared.  This happens in practice on
Citrix XenServer, where VM "tap" devices often disappear and then reappear
almost immediately during VM boot.  This commit fixes the problem.

This also fixes the similar problem for external-ids:bridge-id in Bridge
records.  Bridges aren't ordinarily destroyed and re-created quickly, so
this problem might never have manifested in practice for bridges.

Many thanks to Reid Price <reid@nicira.com> for identifying the problem
and supplying an initial fix.

Bug #5239.
Reported-by: Henrik Amren <henrik@nicira.com>
xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync