Merge pull request #1513 from insom/CLOUDSTACK-9362-2

CLOUDSTACK-9362: Skip VXLANs when rewriting the bridge name for migrations (4.8-2)From the [JIRA issue](https://issues.apache.org/jira/browse/CLOUDSTACK-9362):

> bb8f7c652e
>
> The above commit introduces rewriting of bridge device names when migrating a virtual machine from one host to another. However, it also matches bridges called "brvx-1234" and rewrites them to (in my case) "brem1-1234" - this doesn't match the bridge name on the destination and causes the migration to fail with the error:
>
> error : virNetDevGetMTU:397 : Cannot get interface MTU on 'brem1-1234': No such device
>
> I have flagged this as major because it's not possible to migrate VMs using VXLANs for maintenance, which seems important (it's certainly important to me!).

This is a version of #1508 based against 4.8 (sorry!)

* pr/1513:
  Skip VXLANs when rewriting the bridge name for migrations

Signed-off-by: Will Stevens <williamstevens@gmail.com>
This commit is contained in:
Will Stevens 2016-05-18 15:55:55 -04:00
commit e43a4ebf3e

View File

@ -26,6 +26,8 @@ def isOldStyleBridge(brName):
else: else:
return False return False
def isNewStyleBridge(brName): def isNewStyleBridge(brName):
if brName.startswith('brvx-'):
return False
if re.match(r"br(\w+)-(\d+)", brName) == None: if re.match(r"br(\w+)-(\d+)", brName) == None:
return False return False
else: else: