25232821 inability to set MTU of a VNIC over VXLAN datalink must be handled correctly
authorVardhnee Ramanujam Ravi <vardhnee.ramanujam.ravi@oracle.com>
Mon, 12 Dec 2016 14:20:01 -0800
changeset 7482 191fe9eb5293
parent 7481 0bc6259c3cf8
child 7483 6df03be76e8c
25232821 inability to set MTU of a VNIC over VXLAN datalink must be handled correctly
components/openstack/neutron/files/agent/solaris/interface.py
--- a/components/openstack/neutron/files/agent/solaris/interface.py	Fri Dec 02 06:30:07 2016 -0800
+++ b/components/openstack/neutron/files/agent/solaris/interface.py	Mon Dec 12 14:20:01 2016 -0800
@@ -205,7 +205,18 @@
         dl = net_lib.Datalink(datalink_name)
         dl.create_vnic(lower_link, mac_address, vid, temp=True)
         if mtu:
-            dl.set_prop('mtu', mtu)
+            try:
+                dl.set_prop('mtu', mtu)
+            except Exception:
+                msg = (_("Failed to set mtu value of '%s' on '%s' over lower "
+                         "link '%s'. If you are using VLANs, then ensure that "
+                         "either the mapping of physical networks to MTU "
+                         "values (ml2_conf.ini`physical_network_mtus option) "
+                         "or neutron.conf`global_physnet_mtu value is set "
+                         "correctly. If you are using VXLANs, make sure that "
+                         "ml2_conf.ini`path_mtu value is set correctly.") %
+                       (mtu, datalink_name, lower_link))
+                LOG.error(msg)
 
         attrs = [('external_ids', {'iface-id': port_id,
                                    'iface-status': 'active',