]> git.proxmox.com Git - pve-network.git/log
pve-network.git
4 years agovlan plug: code cleanup
Thomas Lamprecht [Thu, 6 Jun 2019 06:28:41 +0000 (08:28 +0200)]
vlan plug: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocleanup status sub
Alexandre Derumier [Thu, 6 Jun 2019 06:20:14 +0000 (08:20 +0200)]
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>
4 years agovxlanmulticast : fix mtu
Alexandre Derumier [Thu, 6 Jun 2019 06:20:13 +0000 (08:20 +0200)]
vxlanmulticast : fix mtu

vxlan mtu must be 50bytes lower than physdev mtu

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agoplugins: generate config: don't check vlan range
Alexandre Derumier [Tue, 4 Jun 2019 05:03:43 +0000 (07:03 +0200)]
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>
4 years agogenerateconfig test: remove verify merge config
Alexandre Derumier [Tue, 4 Jun 2019 05:03:42 +0000 (07:03 +0200)]
generateconfig test: remove verify merge config

we can check conflict with ifquery now

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agogenerateconfig: use uplink$id if interface don't exist
Alexandre Derumier [Tue, 4 Jun 2019 05:03:41 +0000 (07:03 +0200)]
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>
4 years agovxlan: use vxlan<id> interface name
Alexandre Derumier [Tue, 4 Jun 2019 05:03:40 +0000 (07:03 +0200)]
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>
4 years agod/control: fix priority-extra-is-replaced-by-priority-optional
Thomas Lamprecht [Tue, 4 Jun 2019 04:38:11 +0000 (06:38 +0200)]
d/control: fix priority-extra-is-replaced-by-priority-optional

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofollowup code cleanup
Thomas Lamprecht [Tue, 4 Jun 2019 04:35:12 +0000 (06:35 +0200)]
followup code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoimport run_command
Thomas Lamprecht [Tue, 4 Jun 2019 04:35:00 +0000 (06:35 +0200)]
import run_command

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd test statuscheck.pl
Alexandre Derumier [Mon, 3 Jun 2019 15:57:39 +0000 (17:57 +0200)]
add test statuscheck.pl

could be reuse later in pvestatd to broadcast status.

4 years agoadd ifquery compare status
Alexandre Derumier [Mon, 3 Jun 2019 15:57:38 +0000 (17:57 +0200)]
add ifquery compare status

4 years agocreate api: test if $scfg vnet exist
Alexandre Derumier [Mon, 3 Jun 2019 15:57:37 +0000 (17:57 +0200)]
create api: test if $scfg vnet exist

4 years agoapi: add apply and revert cluster network configuration
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>
4 years 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>
4 years 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>
4 years 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>
4 years 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>
4 years 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>
4 years 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>
4 years 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>
4 years 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>
4 years 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>
5 years 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

5 years 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.

5 years 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

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

empty for now

5 years 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

5 years 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

5 years 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

5 years 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

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

5 years 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

5 years 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

5 years 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/

5 years 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

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

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

5 years 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>
5 years 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>
5 years 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>
5 years agofix copyright data
Dietmar Maurer [Thu, 28 Mar 2019 11:21:01 +0000 (12:21 +0100)]
fix copyright data

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

5 years 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

5 years 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.

5 years 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>
5 years 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>
5 years 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>
5 years 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>
5 years 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>
5 years 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>