Commit Graph

285 Commits

Author SHA1 Message Date
Alexandre Derumier
55686084a5 frr: remove "no bgp default ipv6-unicast"
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-09 18:03:11 +02:00
Thomas Lamprecht
ede0f04a04 followup trailing whitespace cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-09 16:37:30 +02:00
Alexandre Derumier
074d270b1d move gateway-nodes option to frr plugin and add gateway-external-peers
It's make more sense, as We use default vrf for routing.
Also add gateway-external-peers to define an external bgp peer.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-09 16:36:43 +02:00
Alexandre Derumier
bc49b410e2 vxlan: frr : remove unneeded prefix-list
no bgp default ipv4-unicast already deny redistribution
of routes in default vrf

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-09 16:36:43 +02:00
Alexandre Derumier
6c8d238282 vxlan: evpn: fix routing to local vms on gateway nodes
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-09 16:36:43 +02:00
Alexandre Derumier
17854295b8 generate_frr_config: cleanup hash and ordering
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-09 16:36:43 +02:00
Alexandre Derumier
62e54fb752 don't regenerate frr config if no router is defined
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-04 17:10:08 +02:00
Alexandre Derumier
79939ff70b vxlan: add ip-forward|ip6-forward|arp-accept for routing
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 16:04:30 +02:00
Alexandre Derumier
e3dca2334b vxlan: add gateway-nodes option
Allow to define 1 or more gateway node,
to route the traffic to the outside world

import vrf is bugged in frr 7.1
works fine with current stable/7.1 branch
https://github.com/FRRouting/frr/issues/4905

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 16:04:30 +02:00
Thomas Lamprecht
7d35eaf551 trailing whitespace cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-03 08:25:00 +02:00
Alexandre Derumier
d0b4e1c2ca add documentation.txt
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
ecdd8c12c2 sdn: add write_frr_config
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
5bda8607a4 add update_delete hook on frr related options
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
87d8b62369 sdn: add generate_frr_config
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
93dea3aad0 generate network config in a hash
more clean and avoid duplicate interface

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
5b31292c0f vxlan: add support for ipv4/ipv6/mac for anycast routing
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
126fc68c72 vxlanplugin: add vrf and vrfvxlan
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
32602a38ae add frr plugin
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
3ee45e4ce1 make Vxlanplugin generic for multicast/unicast/frr
if no multicast or unicast address is defined, default to frr

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
0022a9189e api2: add local endpoint for listing transportzones status
pvesh get /nodes/<node>/sdn/
┌─────────────────┬───────────┐
│ sdn             │ status    │
├─────────────────┼───────────┤
│ transportzone10 │ error     │
├─────────────────┼───────────┤
│ zone1           │ available │
├─────────────────┼───────────┤
│ zone4           │ available │
└─────────────────┴───────────┘

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
903e2f5e91 api2: add local endpoint for listing content of a transportzone
pveset get /nodes/<node>/sdn/<transportzone>/content

┌─────────┬────────┐
│ vnet    │ status │
├─────────┼────────┤
│ vnet100 │ error  │
├─────────┼────────┤
│ vnet101 │ error  │
└─────────┴────────┘

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
e424c7ac28 add new status sub and move code from test
old status sub was renamed ifquery_check

also check if local config exist or if local config is too old.
(fixme : compare mtime, maybe could we use some kind of version for this?)

we can have 4 status code:

- pending : local config is absent but sdn.cfg exist
- unknown : local config is too old, we can't be sure of the running state
- error : local config is present, but don't match the running state
- available : all is ok, local config is present and match running state.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Alexandre Derumier
80348b2d6f add generate_etc_network_config && write_etc_network_config subs
moved from test script,
also skip vnet generation instead die in case of error

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 08:22:56 +02:00
Thomas Lamprecht
564fe87dd4 d/compat: bump level to 11 and fix lintian warnings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 17:53:17 +02:00
Thomas Lamprecht
efe14cf093 buildsys: use dpkg-dev makefile helpers for pkg info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 17:52:49 +02:00
Thomas Lamprecht
c43c4b5f06 bump version to 0.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-18 10:21:26 +02:00
Thomas Lamprecht
6109f3d8e7 buildsys: clean also old build directories when running make clean
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-18 10:21:26 +02:00
Alexandre Derumier
6bffe81932 rename $network to $sdn everywhere
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-18 07:05:59 +02:00
Alexandre Derumier
d134f98659 api: add missing additional properties=0 on network reload/revert
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-18 07:05:59 +02:00
Alexandre Derumier
fe61b14cc4 add pve-network-id jsonschema
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-18 07:05:59 +02:00
Thomas Lamprecht
9925d85b1b d/control: depend on defined ${perl:Depends}
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-12 07:04:16 +02:00
Alexandre Derumier
86d22462d9 rename PVE::Network::Network to PVE::Network::SDN
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-12 06:54:36 +02:00
Alexandre Derumier
cf5816ef42 remove vnet bridge delete hook
We can check that in local reload when we'll generate config

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-12 06:54:36 +02:00
Alexandre Derumier
1c793d30ba vxlan interface : use vxlan$vnetid
vxlan number can be huge (16millions), don't use tag for interface name.
(my last ifupdown2 patch ifdown/ifup vxlan interface on reload)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-06 14:45:43 +02:00
Thomas Lamprecht
83d209f5e1 vlan plug: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-06 08:28:41 +02:00
Alexandre Derumier
6e9fff39fd cleanup status sub
don't mix stderr and stdout of the ifquery command, as it can break
JSON encoding afterweards

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-06 08:24:54 +02:00
Alexandre Derumier
c1ae848652 vxlanmulticast : fix mtu
vxlan mtu must be 50bytes lower than physdev mtu

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-06 08:24:05 +02:00
Alexandre Derumier
e5a4bde157 plugins: generate config: don't check vlan range
we already have done it on create/modify hooks

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-04 09:43:14 +02:00
Alexandre Derumier
3b04bcb3ac generateconfig test: remove verify merge config
we can check conflict with ifquery now

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-04 09:43:14 +02:00
Alexandre Derumier
ef8d35c862 generateconfig: use uplink$id if interface don't exist
don't die, generate config, and we'll check error
with ifquery as interface don't exist

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-04 09:43:14 +02:00
Alexandre Derumier
4394cbf294 vxlan: use vxlan<id> interface name
we can't change online vxlan tag,
better to map interface name to vxlan tag.
(ifreload with delete old interface, and create a new with correct vxlan)

also vxlan-id are unique

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-04 09:43:14 +02:00
Thomas Lamprecht
9f6f58f0ed d/control: fix priority-extra-is-replaced-by-priority-optional
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 06:38:11 +02:00
Thomas Lamprecht
0c5021ada5 followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 06:37:52 +02:00
Thomas Lamprecht
434125ce94 import run_command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 06:35:00 +02:00
Alexandre Derumier
bc9e5709ea add test statuscheck.pl
could be reuse later in pvestatd to broadcast status.
2019-06-04 06:08:23 +02:00
Alexandre Derumier
c665cefc2b add ifquery compare status 2019-06-04 06:07:47 +02:00
Alexandre Derumier
e57e08d3e6 create api: test if $scfg vnet exist 2019-06-04 06:06:52 +02:00
Alexandre Derumier
80c0e9c474 api: add apply and revert cluster network configuration
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-08 08:03:27 +02:00
Alexandre Derumier
39d04c823f write configuration to networks.cfg.new
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-08 08:02:52 +02:00
Alexandre Derumier
a8ad27897a vlan, vxlan plugin : add on_delete_hook
verify that a vnet is not using this transport

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-08 08:02:28 +02:00