pve-network.git
2 weeks agoapi: add apply and revert cluster network configuration master
Alexandre Derumier [Mon, 6 May 2019 12:47:14 +0000 (14:47 +0200)]
api: add apply and revert cluster network configuration

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 weeks agowrite configuration to networks.cfg.new
Alexandre Derumier [Mon, 6 May 2019 12:47:13 +0000 (14:47 +0200)]
write configuration to networks.cfg.new

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 weeks agovlan, vxlan plugin : add on_delete_hook
Alexandre Derumier [Mon, 6 May 2019 12:47:12 +0000 (14:47 +0200)]
vlan, vxlan plugin : add on_delete_hook

verify that a vnet is not using this transport

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 weeks agovxlanmultuicast: on_update_hook: check vnet tag in allowed vxlan
Alexandre Derumier [Fri, 3 May 2019 09:00:20 +0000 (11:00 +0200)]
vxlanmultuicast: on_update_hook: check vnet tag in allowed vxlan

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 weeks agovlan: on_update_hook: check vnet tag in allowed vlan
Alexandre Derumier [Fri, 3 May 2019 09:00:19 +0000 (11:00 +0200)]
vlan: on_update_hook: check vnet tag in allowed vlan

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 weeks agoapi2: update_hook: also verify transport associated to vnet
Alexandre Derumier [Fri, 3 May 2019 09:00:18 +0000 (11:00 +0200)]
api2: update_hook: also verify transport associated to vnet

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 weeks agovnet: update_hook: verify if tag already exist in another vnet
Alexandre Derumier [Fri, 3 May 2019 09:00:17 +0000 (11:00 +0200)]
vnet: update_hook: verify if tag already exist in another vnet

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 weeks agovnet: rename read_local_vm_config to read_cluster_vm_config
Alexandre Derumier [Fri, 3 May 2019 09:00:16 +0000 (11:00 +0200)]
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>
2 weeks agovnet: dynamic require of qemuserver && lxc
Alexandre Derumier [Fri, 3 May 2019 09:00:15 +0000 (11:00 +0200)]
vnet: dynamic require of qemuserver && lxc

like for firewall, to avoid dependency loop

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 weeks agovxlanmulticast: add mtu to vxlan interface too.
Alexandre Derumier [Fri, 3 May 2019 09:00:14 +0000 (11:00 +0200)]
vxlanmulticast: add mtu to vxlan interface too.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
7 weeks agovnetplugin: on_delete_hook : verify if vnet exist in vm && ct
Alexandre Derumier [Thu, 4 Apr 2019 14:12:45 +0000 (16:12 +0200)]
vnetplugin: on_delete_hook : verify if vnet exist in vm && ct

7 weeks agorename vnet "name" option to "alias"
Alexandre Derumier [Thu, 4 Apr 2019 14:12:44 +0000 (16:12 +0200)]
rename vnet "name" option to "alias"

and use it with ifupdown2 alias.

7 weeks agoadd on_update_hook
Alexandre Derumier [Thu, 4 Apr 2019 08:18:35 +0000 (10:18 +0200)]
add on_update_hook

do nothing for now

7 weeks agoadd on_delete_hook
Alexandre Derumier [Thu, 4 Apr 2019 08:18:34 +0000 (10:18 +0200)]
add on_delete_hook

empty for now

7 weeks agovlanplugin : make uplink-id non optional
Alexandre Derumier [Thu, 4 Apr 2019 08:18:33 +0000 (10:18 +0200)]
vlanplugin : make uplink-id non optional

7 weeks agovxlanmulticast plugin : make uplink-id && multicast addres non optional
Alexandre Derumier [Thu, 4 Apr 2019 08:18:32 +0000 (10:18 +0200)]
vxlanmulticast plugin : make uplink-id && multicast addres non optional

7 weeks agovnetplugin: make tag && transportzone non optional
Alexandre Derumier [Thu, 4 Apr 2019 08:18:31 +0000 (10:18 +0200)]
vnetplugin: make tag && transportzone non optional

7 weeks agoadd missing Network.pm
Alexandre Derumier [Thu, 4 Apr 2019 07:14:22 +0000 (09:14 +0200)]
add missing Network.pm

forgot to add them in last patches

7 weeks agofix generateconfig.pl test
Alexandre Derumier [Wed, 3 Apr 2019 15:27:29 +0000 (17:27 +0200)]
fix generateconfig.pl test

7 weeks agomerge Transport && Vnet to PVE::Network::Network
Alexandre Derumier [Wed, 3 Apr 2019 13:36:07 +0000 (15:36 +0200)]
merge Transport && Vnet to PVE::Network::Network

config is now merged in /etc/pve/networks.cfg
Vnet is a Plugin

7 weeks agoapi2: add networkconfig
Alexandre Derumier [Tue, 2 Apr 2019 22:19:11 +0000 (00:19 +0200)]
api2: add networkconfig

/cluster/network/vnet
/cluster/network/transport

7 weeks agomove transport plugins to Network/Transport/
Alexandre Derumier [Tue, 2 Apr 2019 22:19:10 +0000 (00:19 +0200)]
move transport plugins to Network/Transport/

7 weeks agoadd vnet api
Alexandre Derumier [Tue, 2 Apr 2019 22:19:09 +0000 (00:19 +0200)]
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

7 weeks agoadd network transport api
Alexandre Derumier [Tue, 2 Apr 2019 10:09:10 +0000 (12:09 +0200)]
add network transport api

7 weeks agovlanplugin : fix vlan-aware option
Alexandre Derumier [Tue, 2 Apr 2019 10:09:09 +0000 (12:09 +0200)]
vlanplugin : fix vlan-aware option

8 weeks agoremove $interfaces arg from generate_network_config
Alexandre Derumier [Thu, 28 Mar 2019 23:23:52 +0000 (00:23 +0100)]
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>
8 weeks agogenerateconfig: print config before test
Alexandre Derumier [Thu, 28 Mar 2019 23:23:51 +0000 (00:23 +0100)]
generateconfig: print config before test

easier to debug if verification fail after

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
8 weeks agovlanplugin: define vlan interface and fix vlan-protocol
Alexandre Derumier [Thu, 28 Mar 2019 23:23:50 +0000 (00:23 +0100)]
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>
8 weeks agofix copyright data
Dietmar Maurer [Thu, 28 Mar 2019 11:21:01 +0000 (12:21 +0100)]
fix copyright data

8 weeks agoget version from changelog
Dietmar Maurer [Thu, 28 Mar 2019 11:14:16 +0000 (12:14 +0100)]
get version from changelog

8 weeks agoPVE/Network/Makefile: fix installation path
Dietmar Maurer [Thu, 28 Mar 2019 11:12:24 +0000 (12:12 +0100)]
PVE/Network/Makefile: fix installation path

8 weeks agoset package version to 0.1-1
Dietmar Maurer [Thu, 28 Mar 2019 10:55:20 +0000 (11:55 +0100)]
set package version to 0.1-1

This is experimental code.

8 weeks agoadd a sample test to generate config
Alexandre Derumier [Wed, 27 Mar 2019 17:24:10 +0000 (18:24 +0100)]
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>
8 weeks agoadd vnet
Alexandre Derumier [Wed, 27 Mar 2019 17:24:09 +0000 (18:24 +0100)]
add vnet

This allow to define bridges with a tag (can be vxlan or vlan tag),
and use configuration from transportzone

/etc/pve/network/vnet.cfg

vnet1:
      tag 2
      transportzone vlanzone1
      name network1
      ipv4 10.0.0.1
      ipv6 2a03:2880:f003:c07:face:b00c::2
      mtu 1500

vnet2:
      transportzone vlanzone1
      tag 3
      name network2
      ipv6 2a03:2880:f003:c07:face:b00c::2

vnet3:
      transportzone vxlanmulticastzone1
      tag 100000
      name network3
      mtu 1400

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
8 weeks agoadd vxlan multicast plugin
Alexandre Derumier [Wed, 27 Mar 2019 17:24:08 +0000 (18:24 +0100)]
add vxlan multicast plugin

/etc/pve/network/transports.cfg

vxlanmulticast: vxlanmulticastzone1
                uplink-id 1
                multicast-address 225.20.21.1
                vxlan-allowed 4-5

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
8 weeks agoadd vlan plugin
Alexandre Derumier [Wed, 27 Mar 2019 17:24:07 +0000 (18:24 +0100)]
add vlan plugin

/etc/pve/network/transports.cfg

vlan: vlanzone1
      uplink-id 1
      vlan-aware 1
      vlan-allowed 2-4,6,10
      vlan-protocol 802.1ad

vlan: vlanzone2
      uplink-id 2
      vlan-aware 1

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
8 weeks agoadd transport plugin infrastructure
Alexandre Derumier [Wed, 27 Mar 2019 17:24:06 +0000 (18:24 +0100)]
add transport plugin infrastructure

used to generate network configuration for differents kind of plugins (vlan,vxlan....)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
8 weeks agoinitial package commit
Alexandre Derumier [Wed, 27 Mar 2019 17:24:05 +0000 (18:24 +0100)]
initial package commit

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>