32 Commits

Author SHA1 Message Date
John Bampton
6f4503488b
pre-commit: apply end-of-file-fixer to all files (#7551) 2023-08-02 13:47:21 +02:00
Wei Zhou
09fce75047
OVS/GRE: bug fixes (#5446)
* OVS/GRE: fix failed to fetch cloudbr* info on host

* OVS/GRE: move ovstunnel.py to python3

* OVS: add test_privategw_acl_ovs_gre.py for automatic testing

(1) VR <-> VM should work
(2) Private GW should work

* OVS: fix an issue on xenserver

ovs bridges are deleted by xenserver/ovs automatically
```
[root@ref-trl-1797-x-M7-wei-zhou-xs2 ~]# grep -r xapi7 /var/log/ |grep del-br
/var/log/xensource.log:Sep 15 07:13:44 ref-trl-1797-x-M7-wei-zhou-xs2 xcp-networkd: [ info|localhost|611 |org.xen.xapi.xenops.classic events D:4a3d931cd89f|network_utils] /usr/bin/ovs-vsctl --timeout=20 -- --if-exists del-br xapi7
/var/log/daemon.log:Sep 15 07:13:45 ref-trl-1797-x-M7-wei-zhou-xs2 ovs-vsctl: ovs|00001|vsctl|INFO|Called as /usr/bin/ovs-vsctl --timeout=20 -- --if-exists del-br xapi7
```

which results that xe network exists but bridge does not exist, and operation stuck for 20 minutes at
```
2021-09-15 16:06:56    DEBUG [root] #### VMOPS enter  create_tunnel ####
2021-09-15 16:06:56    DEBUG [root] Creating tunnel from host 2 to host 1 with GRE key 2116
2021-09-15 16:06:56    DEBUG [root] Executing:['/usr/bin/ovs-vsctl', '--timeout=0', 'wait-until', 'bridge', 'xapi7', '--', 'get', 'bridge', 'xapi7', 'name']
2021-09-15 16:26:56    DEBUG [root] bridge xapi7 for creating tunnel - VERIFIED
2021-09-15 16:26:56    DEBUG [root] Executing:['/usr/bin/ovs-vsctl', 'add-port', 'xapi7', 't2116-2-1', '--', 'set', 'interface', 't2116-2-1', 'type=gre', 'options:key=2116', 'options:remote_ip=10.0.34.230']
```

* OVS/GRE: component test test_vpc_distributed_routing_offering.py passes on xenserver

* OVS: support Shared network with GRE protocol

* update #5446: use lang3.StringUtils

* OVS/GRE: VPC with distributed routing on kvm (still not working)
2021-10-03 14:47:52 +05:30
Murali Reddy
63f6888588 CLOUDSTACK-6668: OVS distributed routing: ensure bridge is deleted when
last VM from the VPC is deleted on a host

OVS distributed routing: ensure bridge is deleted when last VM from the
VPC is deleted on a host. This fix ensures that bridge is
destroyed.
2014-05-14 16:41:56 +05:30
Murali Reddy
55111e2284 CLOUDSTACK-6609: OVS distributed routing: ensure tunnels are created if
not created already when OvsVpcPhysicalTopologyConfigCommand update is
recived

Currently if the tunnel creation fails, there is no retry logic. Fix
ensures OvsVpcPhysicalTopologyConfigCommand updates as an opputiunity to ensure
proper tunnels are established between the hosts.
2014-05-08 15:58:16 +05:30
Murali Reddy
2df5df1b68 CLOUDSTACK-6592: OVS distributed routing: make populate flooding rules
transactional

creats a file with all openflow rules updates and using ovs-ofctl file
option updates the brige in one go
2014-05-07 20:05:32 +05:30
Murali Reddy
9e98cbf1c1 CLOUDSTACK-6564: OVS distributed routing: use file based OF rule updates
use ovs-ofctl replace flows by file name option to update the OF rules
instead of sequenetially configuring the rules.
2014-05-02 18:54:30 +05:30
Murali Reddy
213a68dc39 CLOUDSTACK-6507: ensure sequence numbers are honoured while processing
OvsVpcPhysicalTopologyConfigCommand and OvsVpcRoutingPolicyConfigCommand

fix ensures only latest updates are applied (new openflow rules) to the
bidge enabled for distributed routing.
2014-04-25 15:02:19 +05:30
Murali Reddy
095151c98a add support for sequence numner in the VPC topology updates and VPC
routing policy updates

Conflicts:
	setup/db/db/schema-430to440.sql
2014-04-25 15:02:17 +05:30
Murali Reddy
cc2892c782 fix typos in xenserver scripts to setup OVS tunnel network 2014-04-07 17:31:25 +05:30
Murali Reddy
f6ff11c7d6 OVS distributed routing: fix the issues related to applying network
ACL's on OVS. OVS OF rules does not accept 0.0.0.0/0 so while applying
ACL dont include source CIDR in the OF rule if source CIDR is 0.0.0.0/0
2014-03-28 17:09:55 +05:30
Murali Reddy
7b08bb7cab 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.
2014-03-25 16:43:46 +05:30
Murali Reddy
c838f3abb8 fix scripts that handle setting up bridge for tunnel network and for
distributed routing. Fix ensures there is approproate flag in other
config of the network to indicate the bridge type.

Conflicts:
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
2014-03-20 16:30:07 +05:30
Murali Reddy
423a748807 adds hypervisor script to convert JSON routing polcies (ACL) config in
to flow rules and applies them on the bridge

add event subscriber in OvsTunnelManager, that listens to
replaceNetworkAcl events. On event sends the updated policy info to all
the hosts in the VPC
2014-03-14 16:56:37 +05:30
Murali Reddy
2c7786992f some bug fixes 2014-03-14 16:56:37 +05:30
Murali Reddy
e045883c52 introduce OvsNetworkTopologyGuru that has convinenace functions to
- get the hosts on which VPC spans given vpc id
   - get the VM's in the VPC
   - get the hosts on which a network spans
   - get the VPC's to which a hosts is part of
   - get VM's of a VPC on a hosts

introduces capability to build a physical toplogy representation of a
VPC. This json file is encapsulated in
OvsVpcPhysicalTopologyConfigCommand, and is used to send full topology
to hypervisor hosts. On hypervisor this json config can be used to setup
tunnels, configure bridge, add flow rules etc

Ovs GURU, to use different broasdcast scheme VS://vpcid.gerkey for the
networks in VPC that use distributed routing

each VIF and tunnel interface to carry the network UUID in other/options
config
2014-03-14 16:56:37 +05:30
Murali Reddy
100df92455 Scripts that use ovs-vsctl and ovs-ofctl to setup a bridge for VPC in
distributed routing mode, and setup flows appropriatley

script to handle the VPC topology sent from management server in JSOn
format. From the JSON file, reqired configuration (tunnel setup and flow
rules setup) is setup on the bridge
2014-03-14 16:56:36 +05:30
tuna
a3b7248a16 enable stp on ovstunnel 2013-12-11 15:58:32 +07:00
Anthony Xu
1ddc0b99fe put CS/XS plugin log into seperate directory 2013-12-10 01:23:46 -08:00
tuna
3df8b912fc add kvm support & LB service 2013-12-09 23:33:14 +07:00
tuna
d935d3865a tuna 2013-12-09 23:33:14 +07:00
tuna
3a9c9bd717 fix white-space 2013-12-09 23:33:14 +07:00
tuna
79a7ce871e make SDN GRE work with XCP 1.6 2013-12-09 23:33:14 +07:00
David Nalley
d630fa8697 license header changes for scripts folder from Chip Childers 2012-06-23 00:58:00 -04:00
Salvatore Orlando
b6c2c4c506 CS-14605: OVS cleanup
pep8 fixes to python scripts
removing superflous/unused code from python scripts
2012-04-25 11:32:01 +01:00
Salvatore Orlando
3eef46f8a9 Open vSwitch tunnel manager
Applying patch with new ovs-tunnel-manager on top of cloudstack oss-master
2012-04-23 22:32:52 +01:00
Salvatore Orlando
5568e95d4c Overwriting ovstunnel 2012-04-23 22:32:52 +01:00
Salvatore Orlando
e2cc2c1f6e Fixing remaining issues with per-VIF flow script and removing version-specific scripts.
Now generating XSnetwork names using gre keys

Plus other minor corrections
2012-04-23 22:32:52 +01:00
Salvatore Orlando
8987499cda Now using vnets instead of network id for creating networks
Fixed issues with vif scripts on 5.6FP1
Fixed ipv6 issue on 5.6FP1
Plus other various fixes and improvements

Starting to remove debug code
NOTE: Network is configured correctly but instances do not start. Possibly indefinite wait occuring on some commands
2012-04-23 22:32:52 +01:00
Salvatore Orlando
9f321ffeac Open vSwitch tunnel manager
Applying patch with new ovs-tunnel-manager on top of cloudstack oss-master
2012-04-23 22:32:16 +01:00
Salvatore Orlando
a1a615e018 Overwriting ovstunnel 2012-04-23 22:32:16 +01:00
anthony
44678b60bc add VERSION into to scripts 2011-03-23 14:54:31 -07:00
Frank
276e37115b open vswitch - Implement gre tunnel based network that doesn't use vlan
it allows cross zone communication and no 4096 limitation introduced by vlan
2011-01-21 17:32:02 -08:00