mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6281: OVS distributed routing: exclude non implemented
networks while sending VPC topology updates as GRE key is not associated with the network unless implemented.
This commit is contained in:
parent
102c1bc9c8
commit
7b08bb7cab
|
|
@ -557,6 +557,9 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage
|
|||
boolean bridgeNotSetup = true;
|
||||
|
||||
for (Network vpcNetwork: vpcNetworks) {
|
||||
if (vpcNetwork.getState() != Network.State.Implemented &&
|
||||
vpcNetwork.getState() != Network.State.Implementing && vpcNetwork.getState() != Network.State.Setup)
|
||||
continue;
|
||||
int key = getGreKey(vpcNetwork);
|
||||
List<Long> toHostIds = new ArrayList<Long>();
|
||||
List<Long> fromHostIds = new ArrayList<Long>();
|
||||
|
|
@ -670,19 +673,10 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage
|
|||
}
|
||||
|
||||
if (VirtualMachine.State.isVmStarted(oldState, event, newState)) {
|
||||
if (s_logger.isTraceEnabled()) {
|
||||
s_logger.trace("Security Group Mgr: handling start of vm id" + vm.getId());
|
||||
}
|
||||
handleVmStateChange((VMInstanceVO)vm);
|
||||
} else if (VirtualMachine.State.isVmStopped(oldState, event, newState)) {
|
||||
if (s_logger.isTraceEnabled()) {
|
||||
s_logger.trace("Security Group Mgr: handling stop of vm id" + vm.getId());
|
||||
}
|
||||
handleVmStateChange((VMInstanceVO)vm);
|
||||
} else if (VirtualMachine.State.isVmMigrated(oldState, event, newState)) {
|
||||
if (s_logger.isTraceEnabled()) {
|
||||
s_logger.trace("Security Group Mgr: handling migration of vm id" + vm.getId());
|
||||
}
|
||||
handleVmStateChange((VMInstanceVO)vm);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ def main(command, vif_raw):
|
|||
ovs_vpc_distributed_vr_network = pluginlib.do_cmd([pluginlib.XE_PATH,"network-param-get",
|
||||
"uuid=%s" % xs_nw_uuid,
|
||||
"param-name=other-config",
|
||||
"param-key=is-ovs_vpc_distributed_vr_network", "--minimal"])
|
||||
"param-key=is-ovs-vpc-distributed-vr-network", "--minimal"])
|
||||
except:
|
||||
pass
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ def main(command, vif_raw):
|
|||
|
||||
if port.startswith('t'):
|
||||
# check tunnel port is in same network as that of plugged vif
|
||||
if vif_network_id != pluginlib.get_network_id_for_tunnel_port(port):
|
||||
if vif_network_id != pluginlib.get_network_id_for_tunnel_port(port)[1:-1]:
|
||||
continue
|
||||
vnet_tunnelif_ofports.append(if_ofport)
|
||||
vnet_all_ofports.append(if_ofport)
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ def setup_ovs_bridge_for_distributed_routing(session, args):
|
|||
lib.do_cmd([lib.XE_PATH, "network-param-set", "uuid=%s" % xs_nw_uuid,
|
||||
"other-config:is-ovs-tun-network=False"])
|
||||
lib.do_cmd([lib.XE_PATH, "network-param-set", "uuid=%s" % xs_nw_uuid,
|
||||
"other-config:is-ovs_vpc_distributed_vr_network=True"])
|
||||
"other-config:is-ovs-vpc-distributed-vr-network=True"])
|
||||
conf_hosts = lib.do_cmd([lib.XE_PATH, "network-param-get",
|
||||
"uuid=%s" % xs_nw_uuid,
|
||||
"param-name=other-config",
|
||||
|
|
@ -302,7 +302,7 @@ def create_tunnel(session, args):
|
|||
ovs_vpc_distributed_vr_network = lib.do_cmd([lib.XE_PATH,"network-param-get",
|
||||
"uuid=%s" % xs_nw_uuid,
|
||||
"param-name=other-config",
|
||||
"param-key=is-ovs_vpc_distributed_vr_network", "--minimal"])
|
||||
"param-key=is-ovs-vpc-distributed-vr-network", "--minimal"])
|
||||
if ovs_tunnel_network == 'True':
|
||||
# add flow entryies for dropping broadcast coming in from gre tunnel
|
||||
lib.add_flow(bridge, priority=1000, in_port=tun_ofport,
|
||||
|
|
|
|||
Loading…
Reference in New Issue