1078 elif l2type == L2_TYPE_VLAN: |
1078 elif l2type == L2_TYPE_VLAN: |
1079 self._do_ml2_vlan_range(config) |
1079 self._do_ml2_vlan_range(config) |
1080 self._write_config(conf_file, config) |
1080 self._write_config(conf_file, config) |
1081 move(conf_file, ML2_INI) |
1081 move(conf_file, ML2_INI) |
1082 |
1082 |
1083 def update_ovs_neutron_plugin_ini(self): |
1083 def update_ovs_neutron_plugin_ini(self, bmap_reqd): |
1084 """ |
1084 """ |
1085 Reference target configuration state: |
1085 Reference target configuration state: |
1086 [ovs] |
1086 [ovs] |
1087 integration_bridge = br_int0 |
1087 integration_bridge = br_int0 |
1088 bridge_mappings = physnet1:l3stub0 (for VLAN) |
1088 bridge_mappings = physnet1:l3stub0 (for VLAN) |
1107 config.set('ovs', 'local_ip', local_ip) |
1107 config.set('ovs', 'local_ip', local_ip) |
1108 else: |
1108 else: |
1109 msg = """Could not determine IP address for VXLAN endpoint. |
1109 msg = """Could not determine IP address for VXLAN endpoint. |
1110 Manually set the local_ip option in ovs_neutron_plugin.ini""" |
1110 Manually set the local_ip option in ovs_neutron_plugin.ini""" |
1111 log_msg(LOG_WARN, msg) |
1111 log_msg(LOG_WARN, msg) |
1112 else: |
1112 if bmap_reqd: |
1113 config.set('ovs', 'bridge_mappings', self.bridge_mappings) |
1113 config.set('ovs', 'bridge_mappings', self.bridge_mappings) |
1114 self._do_rabbit_host(config) |
1114 self._do_rabbit_host(config) |
1115 self._write_config(conf_file, config) |
1115 self._write_config(conf_file, config) |
1116 move(conf_file, OVS_INI) |
1116 move(conf_file, OVS_INI) |
1117 |
1117 |
1570 if not is_svc_online(SVC_OVSDB_SERVER, exit_on_maintenance=True): |
1570 if not is_svc_online(SVC_OVSDB_SERVER, exit_on_maintenance=True): |
1571 enable_svc(SVC_OVSDB_SERVER, exit_on_fail=True) |
1571 enable_svc(SVC_OVSDB_SERVER, exit_on_fail=True) |
1572 if not is_svc_online(SVC_VSWITCH_SERVER, exit_on_maintenance=True): |
1572 if not is_svc_online(SVC_VSWITCH_SERVER, exit_on_maintenance=True): |
1573 enable_svc(SVC_VSWITCH_SERVER, exit_on_fail=True) |
1573 enable_svc(SVC_VSWITCH_SERVER, exit_on_fail=True) |
1574 add_ovs_bridge(OVS_INT_BRIDGE) |
1574 add_ovs_bridge(OVS_INT_BRIDGE) |
1575 migr_conf_obj.update_ovs_neutron_plugin_ini() |
1575 # bridge_mappings is only required if l2-type is VLAN or FLAT or if |
1576 if l2type != L2_TYPE_VXLAN or SVC_L3_AGENT in curnode_svcs: |
1576 # neutron-l3-agent is running on this node. |
|
1577 bmap_reqd = (l2type != L2_TYPE_VXLAN) or (SVC_L3_AGENT in curnode_svcs) |
|
1578 migr_conf_obj.update_ovs_neutron_plugin_ini(bmap_reqd) |
|
1579 if bmap_reqd: |
1577 migr_conf_obj.update_Open_vSwitch_other_config() |
1580 migr_conf_obj.update_Open_vSwitch_other_config() |
1578 # we will enable the OVS agent later |
1581 # we will enable the OVS agent later |
1579 |
1582 |
1580 svc_func_map = { |
1583 svc_func_map = { |
1581 SVC_NEUTRON_SERVER: neutron_evs_to_ovs, |
1584 SVC_NEUTRON_SERVER: neutron_evs_to_ovs, |