public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-network 0/5] sdn fixes and improvements
@ 2021-11-05  8:06 Alexandre Derumier
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 1/5] vnet/subnet : add skipdns option Alexandre Derumier
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Alexandre Derumier @ 2021-11-05  8:06 UTC (permalink / raw)
  To: pve-devel

This is a resubmit of last months patches
+ some new fix && features for evpn.



Alexandre Derumier (5):
  vnet/subnet : add skipdns option
  get_local_vnets: add permissions on /sdn/vnets/*
  api2: zones: fix update
  zones: evpn: add disable-arp-nd-suppression option
  vnets: alias: fix regex

 PVE/API2/Network/SDN/Zones.pm                 |  4 +-
 PVE/Network/SDN.pm                            |  2 +-
 PVE/Network/SDN/Subnets.pm                    | 70 +++++++++++--------
 PVE/Network/SDN/VnetPlugin.pm                 |  2 +-
 PVE/Network/SDN/Vnets.pm                      | 16 ++---
 PVE/Network/SDN/Zones/EvpnPlugin.pm           | 10 ++-
 .../expected_controller_config                | 31 ++++++++
 .../expected_sdn_interfaces                   | 40 +++++++++++
 .../disable_arp_nd_suppression/interfaces     |  7 ++
 .../disable_arp_nd_suppression/sdn_config     | 26 +++++++
 10 files changed, 164 insertions(+), 44 deletions(-)
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/interfaces
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/sdn_config

-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH pve-network 1/5] vnet/subnet : add skipdns option
  2021-11-05  8:06 [pve-devel] [PATCH pve-network 0/5] sdn fixes and improvements Alexandre Derumier
@ 2021-11-05  8:06 ` Alexandre Derumier
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 2/5] get_local_vnets: add permissions on /sdn/vnets/* Alexandre Derumier
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2021-11-05  8:06 UTC (permalink / raw)
  To: pve-devel

allow to register ip to ipam without dns registration.
can be used for temp/pending ip for example
---
 PVE/Network/SDN/Subnets.pm | 70 ++++++++++++++++++++++----------------
 PVE/Network/SDN/Vnets.pm   | 16 ++++-----
 2 files changed, 49 insertions(+), 37 deletions(-)

diff --git a/PVE/Network/SDN/Subnets.pm b/PVE/Network/SDN/Subnets.pm
index 0231822..6bb42e5 100644
--- a/PVE/Network/SDN/Subnets.pm
+++ b/PVE/Network/SDN/Subnets.pm
@@ -184,7 +184,7 @@ sub del_subnet {
 }
 
 sub next_free_ip {
-    my ($zone, $subnetid, $subnet, $hostname, $mac, $description) = @_;
+    my ($zone, $subnetid, $subnet, $hostname, $mac, $description, $skipdns) = @_;
 
     my $cidr = undef;
     my $ip = undef;
@@ -199,7 +199,7 @@ sub next_free_ip {
     $hostname .= ".$dnszoneprefix" if $dnszoneprefix;
 
     #verify dns zones before ipam
-    verify_dns_zone($dnszone, $dns);
+    verify_dns_zone($dnszone, $dns) if !$skipdns;
 
     if($ipamid) {
 	my $ipam_cfg = PVE::Network::SDN::Ipams::config();
@@ -215,10 +215,12 @@ sub next_free_ip {
     eval {
 	my $reversednszone = get_reversedns_zone($subnetid, $subnet, $reversedns, $ip);
 
-	#add dns
-	add_dns_record($dnszone, $dns, $hostname, $ip);
-	#add reverse dns
-	add_dns_ptr_record($reversednszone, $dnszone, $reversedns, $hostname, $ip);
+	if(!$skipdns) {
+	    #add dns
+	    add_dns_record($dnszone, $dns, $hostname, $ip);
+	    #add reverse dns
+	    add_dns_ptr_record($reversednszone, $dnszone, $reversedns, $hostname, $ip);
+	}
     };
     if ($@) {
 	#rollback
@@ -232,7 +234,7 @@ sub next_free_ip {
 }
 
 sub add_ip {
-    my ($zone, $subnetid, $subnet, $ip, $hostname, $mac, $description, $is_gateway) = @_;
+    my ($zone, $subnetid, $subnet, $ip, $hostname, $mac, $description, $is_gateway, $skipdns) = @_;
 
     return if !$subnet || !$ip; 
 
@@ -249,8 +251,10 @@ sub add_ip {
     $hostname .= ".$dnszoneprefix" if $dnszoneprefix;
 
     #verify dns zones before ipam
-    verify_dns_zone($dnszone, $dns);
-    verify_dns_zone($reversednszone, $reversedns);
+    if(!$skipdns) {
+	verify_dns_zone($dnszone, $dns);
+	verify_dns_zone($reversednszone, $reversedns);
+    }
 
     if ($ipamid) {
 
@@ -265,10 +269,12 @@ sub add_ip {
     }
 
     eval {
-	#add dns
-	add_dns_record($dnszone, $dns, $hostname, $ip);
-	#add reverse dns
-	add_dns_ptr_record($reversednszone, $dnszone, $reversedns, $hostname, $ip);
+	if(!$skipdns) {
+	    #add dns
+	    add_dns_record($dnszone, $dns, $hostname, $ip);
+	    #add reverse dns
+	    add_dns_ptr_record($reversednszone, $dnszone, $reversedns, $hostname, $ip);
+	}
     };
     if ($@) {
 	#rollback
@@ -281,7 +287,7 @@ sub add_ip {
 }
 
 sub update_ip {
-    my ($zone, $subnetid, $subnet, $ip, $hostname, $oldhostname, $mac, $description) = @_;
+    my ($zone, $subnetid, $subnet, $ip, $hostname, $oldhostname, $mac, $description, $skipdns) = @_;
 
     return if !$subnet || !$ip; 
 
@@ -298,8 +304,10 @@ sub update_ip {
     $hostname .= ".$dnszoneprefix" if $dnszoneprefix;
 
     #verify dns zones before ipam
-    verify_dns_zone($dnszone, $dns);
-    verify_dns_zone($reversednszone, $reversedns);
+    if(!$skipdns) {
+	verify_dns_zone($dnszone, $dns);
+	verify_dns_zone($reversednszone, $reversedns);
+    }
 
     if ($ipamid) {
 	my $ipam_cfg = PVE::Network::SDN::Ipams::config();
@@ -314,18 +322,19 @@ sub update_ip {
     return if $hostname eq $oldhostname;
 
     eval {
-	#add dns
-	
-	del_dns_record($dnszone, $dns, $oldhostname, $ip);
-	add_dns_record($dnszone, $dns, $hostname, $ip);
-	#add reverse dns
-	del_dns_ptr_record($reversednszone, $reversedns, $ip);
-	add_dns_ptr_record($reversednszone, $dnszone, $reversedns, $hostname, $ip);
+	if(!$skipdns) {
+	    #add dns
+	    del_dns_record($dnszone, $dns, $oldhostname, $ip);
+	    add_dns_record($dnszone, $dns, $hostname, $ip);
+	    #add reverse dns
+	    del_dns_ptr_record($reversednszone, $reversedns, $ip);
+	    add_dns_ptr_record($reversednszone, $dnszone, $reversedns, $hostname, $ip);
+	}
     };
 }
 
 sub del_ip {
-    my ($zone, $subnetid, $subnet, $ip, $hostname) = @_;
+    my ($zone, $subnetid, $subnet, $ip, $hostname, $skipdns) = @_;
 
     return if !$subnet || !$ip;
 
@@ -340,9 +349,10 @@ sub del_ip {
     my $dnszoneprefix = $subnet->{dnszoneprefix};
     $hostname .= ".$dnszoneprefix" if $dnszoneprefix;
 
-
-    verify_dns_zone($dnszone, $dns);
-    verify_dns_zone($reversednszone, $reversedns);
+    if(!$skipdns) {
+	verify_dns_zone($dnszone, $dns);
+	verify_dns_zone($reversednszone, $reversedns);
+    }
 
     if ($ipamid) {
 	my $ipam_cfg = PVE::Network::SDN::Ipams::config();
@@ -352,8 +362,10 @@ sub del_ip {
     }
 
     eval {
-	del_dns_record($dnszone, $dns, $hostname, $ip);
-	del_dns_ptr_record($reversednszone, $reversedns, $ip);
+	if(!$skipdns) {
+	    del_dns_record($dnszone, $dns, $hostname, $ip);
+	    del_dns_ptr_record($reversednszone, $reversedns, $ip);
+	}
     };
     if ($@) {
 	warn $@;
diff --git a/PVE/Network/SDN/Vnets.pm b/PVE/Network/SDN/Vnets.pm
index 86967a3..caa6bfc 100644
--- a/PVE/Network/SDN/Vnets.pm
+++ b/PVE/Network/SDN/Vnets.pm
@@ -100,7 +100,7 @@ sub get_subnet_from_vnet_cidr {
 }
 
 sub get_next_free_cidr {
-    my ($vnetid, $hostname, $mac, $description, $ipversion) = @_;
+    my ($vnetid, $hostname, $mac, $description, $ipversion, $skipdns) = @_;
 
     my $vnet = PVE::Network::SDN::Vnets::get_vnet($vnetid);
     my $zoneid = $vnet->{zone};
@@ -121,7 +121,7 @@ sub get_next_free_cidr {
 	$subnetcount++;
 
 	eval {
-	    $ip = PVE::Network::SDN::Subnets::next_free_ip($zone, $subnetid, $subnet, $hostname, $mac, $description);
+	    $ip = PVE::Network::SDN::Subnets::next_free_ip($zone, $subnetid, $subnet, $hostname, $mac, $description, $skipdns);
 	};
 	warn $@ if $@;
 	last if $ip;
@@ -132,30 +132,30 @@ sub get_next_free_cidr {
 }
 
 sub add_cidr {
-    my ($vnetid, $cidr, $hostname, $mac, $description) = @_;
+    my ($vnetid, $cidr, $hostname, $mac, $description, $skipdns) = @_;
 
     return if !$vnetid;
     
     my ($zone, $subnetid, $subnet, $ip) = PVE::Network::SDN::Vnets::get_subnet_from_vnet_cidr($vnetid, $cidr);
-    PVE::Network::SDN::Subnets::add_ip($zone, $subnetid, $subnet, $ip, $hostname, $mac, $description);
+    PVE::Network::SDN::Subnets::add_ip($zone, $subnetid, $subnet, $ip, $hostname, $mac, $description, undef, $skipdns);
 }
 
 sub update_cidr {
-    my ($vnetid, $cidr, $hostname, $oldhostname, $mac, $description) = @_;
+    my ($vnetid, $cidr, $hostname, $oldhostname, $mac, $description, $skipdns) = @_;
 
     return if !$vnetid;
 
     my ($zone, $subnetid, $subnet, $ip) = PVE::Network::SDN::Vnets::get_subnet_from_vnet_cidr($vnetid, $cidr);
-    PVE::Network::SDN::Subnets::update_ip($zone, $subnetid, $subnet, $ip, $hostname, $oldhostname, $mac, $description);
+    PVE::Network::SDN::Subnets::update_ip($zone, $subnetid, $subnet, $ip, $hostname, $oldhostname, $mac, $description, $skipdns);
 }
 
 sub del_cidr {
-    my ($vnetid, $cidr, $hostname) = @_;
+    my ($vnetid, $cidr, $hostname, $skipdns) = @_;
 
     return if !$vnetid;
 
     my ($zone, $subnetid, $subnet, $ip) = PVE::Network::SDN::Vnets::get_subnet_from_vnet_cidr($vnetid, $cidr);
-    PVE::Network::SDN::Subnets::del_ip($zone, $subnetid, $subnet, $ip, $hostname);
+    PVE::Network::SDN::Subnets::del_ip($zone, $subnetid, $subnet, $ip, $hostname, $skipdns);
 }
 
 
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH pve-network 2/5] get_local_vnets: add permissions on /sdn/vnets/*
  2021-11-05  8:06 [pve-devel] [PATCH pve-network 0/5] sdn fixes and improvements Alexandre Derumier
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 1/5] vnet/subnet : add skipdns option Alexandre Derumier
@ 2021-11-05  8:06 ` Alexandre Derumier
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 3/5] api2: zones: fix update Alexandre Derumier
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2021-11-05  8:06 UTC (permalink / raw)
  To: pve-devel

---
 PVE/Network/SDN.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Network/SDN.pm b/PVE/Network/SDN.pm
index d3399ce..b95dd5b 100644
--- a/PVE/Network/SDN.pm
+++ b/PVE/Network/SDN.pm
@@ -193,7 +193,7 @@ sub get_local_vnets {
 	my $privs = [ 'SDN.Audit', 'SDN.Allocate' ];
 
 	next if !$zoneid;
-	next if !$rpcenv->check_any($authuser, "/sdn/zones/$zoneid", $privs, 1);
+	next if !$rpcenv->check_any($authuser, "/sdn/zones/$zoneid", $privs, 1) && !$rpcenv->check_any($authuser, "/sdn/vnets/$vnetid", $privs, 1);
 
 	my $zone_config = PVE::Network::SDN::Zones::sdn_zones_config($zones_cfg, $zoneid);
 
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH pve-network 3/5] api2: zones: fix update
  2021-11-05  8:06 [pve-devel] [PATCH pve-network 0/5] sdn fixes and improvements Alexandre Derumier
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 1/5] vnet/subnet : add skipdns option Alexandre Derumier
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 2/5] get_local_vnets: add permissions on /sdn/vnets/* Alexandre Derumier
@ 2021-11-05  8:06 ` Alexandre Derumier
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 4/5] zones: evpn: add disable-arp-nd-suppression option Alexandre Derumier
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2021-11-05  8:06 UTC (permalink / raw)
  To: pve-devel

---
 PVE/API2/Network/SDN/Zones.pm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/PVE/API2/Network/SDN/Zones.pm b/PVE/API2/Network/SDN/Zones.pm
index 9485590..6e53240 100644
--- a/PVE/API2/Network/SDN/Zones.pm
+++ b/PVE/API2/Network/SDN/Zones.pm
@@ -284,9 +284,7 @@ __PACKAGE__->register_method ({
 		}
 	    }
 
-	    for my $k (%$opts) {
-		$scfg->{$k} = $opts->{$k};
-	    }
+	    $zone_cfg->{ids}->{$id} = $opts;
 
 	    my $dnsserver = $opts->{dns};
 	    raise_param_exc({ dns => "$dnsserver don't exist"}) if $dnsserver && !$dns_cfg->{ids}->{$dnsserver};
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH pve-network 4/5] zones: evpn: add disable-arp-nd-suppression option
  2021-11-05  8:06 [pve-devel] [PATCH pve-network 0/5] sdn fixes and improvements Alexandre Derumier
                   ` (2 preceding siblings ...)
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 3/5] api2: zones: fix update Alexandre Derumier
@ 2021-11-05  8:06 ` Alexandre Derumier
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 5/5] vnets: alias: fix regex Alexandre Derumier
  2021-11-09 18:01 ` [pve-devel] applied-series: [PATCH pve-network 0/5] sdn fixes and improvements Thomas Lamprecht
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2021-11-05  8:06 UTC (permalink / raw)
  To: pve-devel

arp-nd-suppression can break ip mobility,
when an ip from a vm is moved to another vm, with different mac.
For example, with a keepalived vip, the garp is filtered.
---
 PVE/Network/SDN/Zones/EvpnPlugin.pm           | 10 ++++-
 .../expected_controller_config                | 31 ++++++++++++++
 .../expected_sdn_interfaces                   | 40 +++++++++++++++++++
 .../disable_arp_nd_suppression/interfaces     |  7 ++++
 .../disable_arp_nd_suppression/sdn_config     | 26 ++++++++++++
 5 files changed, 112 insertions(+), 2 deletions(-)
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/interfaces
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/sdn_config

diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm b/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 648f7c7..50ea619 100644
--- a/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -44,6 +44,11 @@ sub properties {
 	    type => 'boolean',
 	    description => "Advertise evpn subnets if you have silent hosts",
 	    optional => 1
+	},
+	'disable-arp-nd-suppression' => {
+	    type => 'boolean',
+	    description => "Disable ipv4 arp && ipv6 neighbour discovery suppression",
+	    optional => 1
 	}
     };
 }
@@ -56,6 +61,7 @@ sub options {
 	exitnodes => { optional => 1 },
 	'exitnodes-local-routing' => { optional => 1 },
 	'advertise-subnets' => { optional => 1 },
+	'disable-arp-nd-suppression' => { optional => 1 },
 	mtu => { optional => 1 },
 	mac => { optional => 1 },
 	dns => { optional => 1 },
@@ -99,7 +105,7 @@ sub generate_sdn_config {
     push @iface_config, "vxlan-id $tag";
     push @iface_config, "vxlan-local-tunnelip $ifaceip" if $ifaceip;
     push @iface_config, "bridge-learning off";
-    push @iface_config, "bridge-arp-nd-suppress on";
+    push @iface_config, "bridge-arp-nd-suppress on" if !$plugin_config->{'disable-arp-nd-suppression'};
 
     push @iface_config, "mtu $mtu" if $mtu;
     push(@{$config->{$vxlan_iface}}, @iface_config) if !$config->{$vxlan_iface};
@@ -186,7 +192,7 @@ sub generate_sdn_config {
 	    push @iface_config, "vxlan-id $vrfvxlan";
 	    push @iface_config, "vxlan-local-tunnelip $ifaceip" if $ifaceip;
 	    push @iface_config, "bridge-learning off";
-	    push @iface_config, "bridge-arp-nd-suppress on";
+	    push @iface_config, "bridge-arp-nd-suppress on" if !$plugin_config->{'disable-arp-nd-suppression'};
 	    push @iface_config, "mtu $mtu" if $mtu;
 	    push(@{$config->{$iface_vrf_vxlan}}, @iface_config) if !$config->{$iface_vrf_vxlan};
 
diff --git a/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config b/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
new file mode 100644
index 0000000..c0ca898
--- /dev/null
+++ b/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
@@ -0,0 +1,31 @@
+log syslog informational
+ip forwarding
+ipv6 forwarding
+frr defaults datacenter
+service integrated-vtysh-config
+hostname localhost
+!
+!
+vrf vrf_myzone
+ vni 1000
+exit-vrf
+!
+router bgp 65000
+ bgp router-id 192.168.0.1
+ no bgp default ipv4-unicast
+ coalesce-time 1000
+ neighbor VTEP peer-group
+ neighbor VTEP remote-as 65000
+ neighbor VTEP bfd
+ neighbor 192.168.0.2 peer-group VTEP
+ neighbor 192.168.0.3 peer-group VTEP
+ !
+ address-family l2vpn evpn
+  neighbor VTEP activate
+  advertise-all-vni
+ exit-address-family
+!
+router bgp 65000 vrf vrf_myzone
+!
+line vty
+!
\ No newline at end of file
diff --git a/test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces b/test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces
new file mode 100644
index 0000000..bbde906
--- /dev/null
+++ b/test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces
@@ -0,0 +1,40 @@
+#version:1
+
+auto myvnet
+iface myvnet
+	address 10.0.0.1/24
+	hwaddress A2:1D:CB:1A:C0:8B
+	bridge_ports vxlan_myvnet
+	bridge_stp off
+	bridge_fd 0
+	mtu 1450
+	ip-forward on
+	arp-accept on
+	vrf vrf_myzone
+
+auto vrf_myzone
+iface vrf_myzone
+	vrf-table auto
+	post-up ip route add vrf vrf_myzone unreachable default metric 4278198272
+
+auto vrfbr_myzone
+iface vrfbr_myzone
+	bridge-ports vrfvx_myzone
+	bridge_stp off
+	bridge_fd 0
+	mtu 1450
+	vrf vrf_myzone
+
+auto vrfvx_myzone
+iface vrfvx_myzone
+	vxlan-id 1000
+	vxlan-local-tunnelip 192.168.0.1
+	bridge-learning off
+	mtu 1450
+
+auto vxlan_myvnet
+iface vxlan_myvnet
+	vxlan-id 100
+	vxlan-local-tunnelip 192.168.0.1
+	bridge-learning off
+	mtu 1450
diff --git a/test/zones/evpn/disable_arp_nd_suppression/interfaces b/test/zones/evpn/disable_arp_nd_suppression/interfaces
new file mode 100644
index 0000000..66bb826
--- /dev/null
+++ b/test/zones/evpn/disable_arp_nd_suppression/interfaces
@@ -0,0 +1,7 @@
+auto vmbr0
+iface vmbr0 inet static
+	address 192.168.0.1/24
+	gateway 192.168.0.254
+        bridge-ports eth0
+        bridge-stp off
+        bridge-fd 0
diff --git a/test/zones/evpn/disable_arp_nd_suppression/sdn_config b/test/zones/evpn/disable_arp_nd_suppression/sdn_config
new file mode 100644
index 0000000..199596b
--- /dev/null
+++ b/test/zones/evpn/disable_arp_nd_suppression/sdn_config
@@ -0,0 +1,26 @@
+{
+  version => 1,
+  vnets   => {
+               ids => {
+                        myvnet => { tag => "100", type => "vnet", zone => "myzone" },
+                      },
+             },
+
+  zones   => {
+               ids => { myzone => { ipam => "pve", type => "evpn", controller => "evpnctl", 'vrf-vxlan' => 1000, 'mac' => 'A2:1D:CB:1A:C0:8B', 'disable-arp-nd-suppression' => 1 } },
+             },
+  controllers  => {
+               ids => { evpnctl => { type => "evpn", 'peers' => '192.168.0.1,192.168.0.2,192.168.0.3', asn => "65000" } },
+             },
+
+  subnets => {
+              ids => { 'myzone-10.0.0.0-24' => {
+							'type' => 'subnet',
+							'vnet' => 'myvnet',
+							'gateway' => '10.0.0.1',
+						  }
+		     }
+	     }
+}
+
+
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH pve-network 5/5] vnets: alias: fix regex
  2021-11-05  8:06 [pve-devel] [PATCH pve-network 0/5] sdn fixes and improvements Alexandre Derumier
                   ` (3 preceding siblings ...)
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 4/5] zones: evpn: add disable-arp-nd-suppression option Alexandre Derumier
@ 2021-11-05  8:06 ` Alexandre Derumier
  2021-11-09 18:01 ` [pve-devel] applied-series: [PATCH pve-network 0/5] sdn fixes and improvements Thomas Lamprecht
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2021-11-05  8:06 UTC (permalink / raw)
  To: pve-devel

---
 PVE/Network/SDN/VnetPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Network/SDN/VnetPlugin.pm b/PVE/Network/SDN/VnetPlugin.pm
index 121fb7f..062904c 100644
--- a/PVE/Network/SDN/VnetPlugin.pm
+++ b/PVE/Network/SDN/VnetPlugin.pm
@@ -68,7 +68,7 @@ sub properties {
         alias => {
             type => 'string',
             description => "alias name of the vnet",
-            pattern => qr/[a-z0-9\._\-\+\s]{1,256}/i,
+            pattern => qr/[\(\)-_.\w\d\s]{0,256}/i,
             maxLength => 256,
 	    optional => 1,
         },
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] applied-series: [PATCH pve-network 0/5] sdn fixes and improvements
  2021-11-05  8:06 [pve-devel] [PATCH pve-network 0/5] sdn fixes and improvements Alexandre Derumier
                   ` (4 preceding siblings ...)
  2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 5/5] vnets: alias: fix regex Alexandre Derumier
@ 2021-11-09 18:01 ` Thomas Lamprecht
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Lamprecht @ 2021-11-09 18:01 UTC (permalink / raw)
  To: Proxmox VE development discussion, Alexandre Derumier

On 05.11.21 09:06, Alexandre Derumier wrote:
> This is a resubmit of last months patches
> + some new fix && features for evpn.
> 
> 
> 
> Alexandre Derumier (5):
>   vnet/subnet : add skipdns option
>   get_local_vnets: add permissions on /sdn/vnets/*
>   api2: zones: fix update
>   zones: evpn: add disable-arp-nd-suppression option
>   vnets: alias: fix regex
> 
>  PVE/API2/Network/SDN/Zones.pm                 |  4 +-
>  PVE/Network/SDN.pm                            |  2 +-
>  PVE/Network/SDN/Subnets.pm                    | 70 +++++++++++--------
>  PVE/Network/SDN/VnetPlugin.pm                 |  2 +-
>  PVE/Network/SDN/Vnets.pm                      | 16 ++---
>  PVE/Network/SDN/Zones/EvpnPlugin.pm           | 10 ++-
>  .../expected_controller_config                | 31 ++++++++
>  .../expected_sdn_interfaces                   | 40 +++++++++++
>  .../disable_arp_nd_suppression/interfaces     |  7 ++
>  .../disable_arp_nd_suppression/sdn_config     | 26 +++++++
>  10 files changed, 164 insertions(+), 44 deletions(-)
>  create mode 100644 test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
>  create mode 100644 test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces
>  create mode 100644 test/zones/evpn/disable_arp_nd_suppression/interfaces
>  create mode 100644 test/zones/evpn/disable_arp_nd_suppression/sdn_config
> 



applied series (albeit the "add permissions on /sdn/vnets/*" was already applied), thanks!




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-09 18:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05  8:06 [pve-devel] [PATCH pve-network 0/5] sdn fixes and improvements Alexandre Derumier
2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 1/5] vnet/subnet : add skipdns option Alexandre Derumier
2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 2/5] get_local_vnets: add permissions on /sdn/vnets/* Alexandre Derumier
2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 3/5] api2: zones: fix update Alexandre Derumier
2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 4/5] zones: evpn: add disable-arp-nd-suppression option Alexandre Derumier
2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 5/5] vnets: alias: fix regex Alexandre Derumier
2021-11-09 18:01 ` [pve-devel] applied-series: [PATCH pve-network 0/5] sdn fixes and improvements Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal