Commit Graph

105 Commits

Author SHA1 Message Date
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
Alexandre Derumier
c723980ee7 vxlanmultuicast: on_update_hook: check vnet tag in allowed vxlan
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-06 07:58:15 +02:00
Alexandre Derumier
da07e2b119 vlan: on_update_hook: check vnet tag in allowed vlan
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-06 07:57:56 +02:00
Alexandre Derumier
b487260d4b api2: update_hook: also verify transport associated to vnet
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-06 07:57:14 +02:00
Alexandre Derumier
6a2db30ae8 vnet: update_hook: verify if tag already exist in another vnet
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-06 07:56:57 +02:00
Alexandre Derumier
b1791012ce vnet: rename read_local_vm_config to read_cluster_vm_config
and remove "next if !$d->{node}"

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-06 07:56:12 +02:00
Alexandre Derumier
46cd4e0614 vnet: dynamic require of qemuserver && lxc
like for firewall, to avoid dependency loop

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-06 07:55:36 +02:00
Alexandre Derumier
9c2f5e3f15 vxlanmulticast: add mtu to vxlan interface too.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-05-06 07:54:58 +02:00
Alexandre Derumier
aa38ba467d vnetplugin: on_delete_hook : verify if vnet exist in vm && ct 2019-04-05 06:13:14 +02:00
Alexandre Derumier
dc7e431e63 rename vnet "name" option to "alias"
and use it with ifupdown2 alias.
2019-04-05 06:13:04 +02:00
Alexandre Derumier
e8d5906ee2 add on_update_hook
do nothing for now
2019-04-04 11:12:44 +02:00
Alexandre Derumier
fe0c6b9eb1 add on_delete_hook
empty for now
2019-04-04 11:12:30 +02:00
Alexandre Derumier
41eec96196 vlanplugin : make uplink-id non optional 2019-04-04 11:12:19 +02:00
Alexandre Derumier
85533e9880 vxlanmulticast plugin : make uplink-id && multicast addres non optional 2019-04-04 11:12:11 +02:00
Alexandre Derumier
205e916625 vnetplugin: make tag && transportzone non optional 2019-04-04 11:12:01 +02:00
Alexandre Derumier
92b6f291bc add missing Network.pm
forgot to add them in last patches
2019-04-04 10:16:30 +02:00
Alexandre Derumier
adf8e91537 fix generateconfig.pl test 2019-04-04 07:51:58 +02:00
Alexandre Derumier
6bad73d02e merge Transport && Vnet to PVE::Network::Network
config is now merged in /etc/pve/networks.cfg
Vnet is a Plugin
2019-04-04 07:50:59 +02:00
Alexandre Derumier
653b2b9040 api2: add networkconfig
/cluster/network/vnet
/cluster/network/transport
2019-04-03 06:20:56 +02:00
Alexandre Derumier
fb4b3e4a64 move transport plugins to Network/Transport/ 2019-04-03 06:20:34 +02:00
Alexandre Derumier
e7939454a0 add vnet api
also for now, use classic sectionconfig format

vnet: vnet1
        ipv4 10.0.0.1
        ipv6 2a03:2880:f003:c07:face:b00c::2
        mtu 1500
        tag 2

vnet: vnet2
        ipv6 2a03:2880:f003:c07:face:b00c::2
        name network2
        tag 3
        transportzone vlanzone1
2019-04-03 06:20:23 +02:00
Alexandre Derumier
eec580bf18 add network transport api 2019-04-02 14:15:10 +02:00
Alexandre Derumier
0ec8cb8742 vlanplugin : fix vlan-aware option 2019-04-02 14:14:03 +02:00
Alexandre Derumier
bad3d113c9 remove $interfaces arg from generate_network_config
and remove verification of existing vlan interface in VlanPlugin.
(we do all verifications later reusing INotify read/write interfaces)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-03-29 08:53:23 +01:00
Alexandre Derumier
02abc721e9 generateconfig: print config before test
easier to debug if verification fail after

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-03-29 08:53:10 +01:00
Alexandre Derumier
f93d43e8a2 vlanplugin: define vlan interface and fix vlan-protocol
vlan-protocol is on vlan interface, better to always define it

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-03-29 08:52:51 +01:00
Dietmar Maurer
1ca159122f fix copyright data 2019-03-28 12:21:01 +01:00
Dietmar Maurer
f0d57613b2 get version from changelog 2019-03-28 12:14:16 +01:00
Dietmar Maurer
74ac5247e8 PVE/Network/Makefile: fix installation path 2019-03-28 12:12:24 +01:00
Dietmar Maurer
4d7560858d set package version to 0.1-1
This is experimental code.
2019-03-28 11:55:20 +01:00
Alexandre Derumier
8df9fab504 add a sample test to generate config
generate /etc/network/interfaces.d/vnet

reloading is not yet implemented

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-03-28 11:53:06 +01:00