X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=xenserver%2Fopt_xensource_libexec_InterfaceReconfigure.py;h=f37e038635decf24bcab630218bce36cc7b7675b;hb=5ea1eab089607de8f87189fe4463364e26576070;hp=a9bbf07e2f80b3b7c4a6971048111672febe6b20;hpb=404c169247b1c3ac2ebad887f0421478a6cef924;p=sliver-openvswitch.git diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigure.py b/xenserver/opt_xensource_libexec_InterfaceReconfigure.py index a9bbf07e2..f37e03863 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigure.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigure.py @@ -284,6 +284,7 @@ _ETHTOOL_OTHERCONFIG_ATTRS = ['ethtool-%s' % x for x in 'autoneg', 'speed', 'dup _PIF_OTHERCONFIG_ATTRS = [ 'domain', 'peerdns', 'defaultroute', 'mtu', 'static-routes' ] + \ [ 'bond-%s' % x for x in 'mode', 'miimon', 'downdelay', 'updelay', 'use_carrier', 'hashing-algorithm' ] + \ + [ 'vlan-bug-workaround' ] + \ _ETHTOOL_OTHERCONFIG_ATTRS _PIF_ATTRS = { 'uuid': (_str_to_xml,_str_from_xml), @@ -332,7 +333,11 @@ _BOND_ATTRS = { 'uuid': (_str_to_xml,_str_from_xml), lambda n: _strlist_from_xml(n, 'slaves', 'slave')), } -_NETWORK_OTHERCONFIG_ATTRS = [ 'mtu', 'static-routes', 'vswitch-controller-fail-mode' ] + _ETHTOOL_OTHERCONFIG_ATTRS +_NETWORK_OTHERCONFIG_ATTRS = [ 'mtu', + 'static-routes', + 'vswitch-controller-fail-mode', + 'vswitch-disable-in-band' ] \ + + _ETHTOOL_OTHERCONFIG_ATTRS _NETWORK_ATTRS = { 'uuid': (_str_to_xml,_str_from_xml), 'bridge': (_str_to_xml,_str_from_xml), @@ -503,9 +508,8 @@ class DatabaseCache(object): host = session.xenapi.host.get_by_uuid(inventory['INSTALLATION_UUID']) self.__get_pif_records_from_xapi(session, host) - - self.__get_tunnel_records_from_xapi(session) self.__get_pool_records_from_xapi(session) + self.__get_tunnel_records_from_xapi(session) self.__get_vlan_records_from_xapi(session) self.__get_bond_records_from_xapi(session) self.__get_network_records_from_xapi(session) @@ -571,9 +575,11 @@ class DatabaseCache(object): for (ref,rec) in self.__pools.items(): self.__to_xml(xml, xml.documentElement, _POOL_XML_TAG, ref, rec, _POOL_ATTRS) - f = open(cache_file, 'w') + temp_file = cache_file + ".%d" % os.getpid() + f = open(temp_file, 'w') f.write(xml.toprettyxml()) f.close() + os.rename(temp_file, cache_file) def get_pif_by_uuid(self, uuid): pifs = map(lambda (ref,rec): ref, @@ -917,7 +923,7 @@ class Datapath(object): Should assume any configuration files changed attached in the preconfigure stage are applied and bring up the - necesary devices to provide the datapath for the + necessary devices to provide the datapath for the PIF. Should not bring up the IPdev.