[pve-devel] [PATCH container] setup: fedora: fix wrong systemd-networkd preset

2023-06-23 Thread Stoiko Ivanov
The refactoring of the systemd-preset handling inadvertendly changed
the preset for Fedora >= 37 to disabled

Reported in our community forum:
https://forum.proxmox.com/threads/.129395/

Tested with a Fedora 38 container on PVE 8.0

Fixes: e11806e0de064e6570d40e7c04bc4656687b2c62
Signed-off-by: Stoiko Ivanov 
---
 src/PVE/LXC/Setup/Fedora.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Setup/Fedora.pm b/src/PVE/LXC/Setup/Fedora.pm
index 80ee85f..1a487c6 100644
--- a/src/PVE/LXC/Setup/Fedora.pm
+++ b/src/PVE/LXC/Setup/Fedora.pm
@@ -39,7 +39,7 @@ sub setup_init {
$self->setup_systemd_preset({
# systemd-networkd is disabled by the preset in >=37 in favor of
# NetworkManager, reenable it, since we make use of it.
-   'systemd-networkd.service' => 0,
+   'systemd-networkd.service' => 1,
});
 }
 }
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH docs] faq: fix typo in release names

2023-06-23 Thread Stoiko Ivanov
Reported-by: Daniela Häsler 
Signed-off-by: Stoiko Ivanov 
---
 pve-faq.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pve-faq.adoc b/pve-faq.adoc
index ce22ad5..a0b838d 100644
--- a/pve-faq.adoc
+++ b/pve-faq.adoc
@@ -89,7 +89,7 @@ recommended.
 [width="100%",cols="5*d",options="header"]
 
|===
 | {pve} Version | Debian Version  | First Release | Debian EOL | Proxmox 
EOL
-| {pve} 8.x | Debian 12 (Bokworm) | 2023-06   | tba| tba
+| {pve} 8.x | Debian 12 (Bookworm)| 2023-06   | tba| tba
 | {pve} 7.x | Debian 11 (Bullseye)| 2021-07   | 2024-07| 2024-07
 | {pve} 6.x | Debian 10 (Buster)  | 2019-07   | 2022-07| 2022-07
 | {pve} 5.x | Debian 9 (Stretch)  | 2017-07   | 2020-07| 2020-07
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH stable-7 manager] pve7to8: Add check for dkms modules

2023-06-23 Thread Thomas Lamprecht
Am 23/06/2023 um 15:28 schrieb Christian Ebner:
> ... and warn if at least one is present.
> 
> Signed-off-by: Christian Ebner 
> ---
>  PVE/CLI/pve7to8.pm | 35 +++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/PVE/CLI/pve7to8.pm b/PVE/CLI/pve7to8.pm
> index da1e15bc..ecfb4011 100644
> --- a/PVE/CLI/pve7to8.pm
> +++ b/PVE/CLI/pve7to8.pm
> @@ -1287,6 +1287,40 @@ sub check_bootloader {
>  }
>  }
>  
> +sub check_dkms_modules {
> +log_info("Check if dkms is installed...");
> +
> +my $path;
> +my $filter_path = sub {
> + $path = shift;
> + chomp $path;

nit: why chomp if only used for a boolean check?

> +};
> +
> +run_command(['which', 'dkms'], outfunc => $filter_path, noerr => 1);

please don't use which, it's not standardized and may do weird things,
basically only safe to use if it's a built-in from ones shell.

Maybe just work with the exit code of the run_command execution below?

Otherwise `command -v dkms` would be POSIX
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html

> +
> +if (!$path) {
> + log_skip("dkms not installed, no need to check for installed modules");
> + return;
> +}
> +
> +log_info("Check for installed dkms modules...");
> +
> +my $count;
> +my $set_count = sub {
> + $count = scalar @_;
> +};
> +
> +eval {
> + run_command(['dkms', 'status', '-k', '`uname -r`'], outfunc => 
> $set_count, noerr => 1);
> +};

E.g., maybe it's enough to do:

my $exit_code = eval { run_command(["foo"], outfunc => $set_count, noerr => 1) 
};

if ($exit_code != 0) {
   # skip
} elsif (!$count) [
 # ...

> +
> +if (!$count) {
> + log_pass("no dkms modules found");
> +} else {
> + log_warn("dkms modules found, this might cause issues during upgrade.");
> +}
> +}
> +
>  sub check_misc {
>  print_header("MISCELLANEOUS CHECKS");
>  my $ssh_config = eval { 
> PVE::Tools::file_get_contents('/root/.ssh/config') };
> @@ -1388,6 +1422,7 @@ sub check_misc {
>  check_apt_repos();
>  check_nvidia_vgpu_service();
>  check_bootloader();
> +check_dkms_modules();
>  }
>  
>  my sub colored_if {



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] Is Proxmox VE vulnerable to ransomware like VMware vSphere?

2023-06-23 Thread Turritopsis Dohrnii Teo En Ming via pve-devel
--- Begin Message ---
Subject: Is Proxmox VE vulnerable to ransomware like VMware vSphere?

Good day from Singapore,

Recently, VMware vSphere has come under the spotlight because tens of
thousands of VMware vSphere installations are vulnerable to
ransomware. Ransomware gangs are actively targeting VMware vSphere. Is
Proxmox VE vulnerable to ransomware like VMware vSphere?

Please advise. Thank you.

Regards,

Mr. Turritopsis Dohrnii Teo En Ming
Targeted Individual in Singapore
Blogs:
https://tdtemcerts.blogspot.com
https://tdtemcerts.wordpress.com
GIMP also stands for Government-Induced Medical Problems.

--- End Message ---
___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH stable-7 manager] pve7to8: Add check for dkms modules

2023-06-23 Thread Christian Ebner
... and warn if at least one is present.

Signed-off-by: Christian Ebner 
---
 PVE/CLI/pve7to8.pm | 35 +++
 1 file changed, 35 insertions(+)

diff --git a/PVE/CLI/pve7to8.pm b/PVE/CLI/pve7to8.pm
index da1e15bc..ecfb4011 100644
--- a/PVE/CLI/pve7to8.pm
+++ b/PVE/CLI/pve7to8.pm
@@ -1287,6 +1287,40 @@ sub check_bootloader {
 }
 }
 
+sub check_dkms_modules {
+log_info("Check if dkms is installed...");
+
+my $path;
+my $filter_path = sub {
+   $path = shift;
+   chomp $path;
+};
+
+run_command(['which', 'dkms'], outfunc => $filter_path, noerr => 1);
+
+if (!$path) {
+   log_skip("dkms not installed, no need to check for installed modules");
+   return;
+}
+
+log_info("Check for installed dkms modules...");
+
+my $count;
+my $set_count = sub {
+   $count = scalar @_;
+};
+
+eval {
+   run_command(['dkms', 'status', '-k', '`uname -r`'], outfunc => 
$set_count, noerr => 1);
+};
+
+if (!$count) {
+   log_pass("no dkms modules found");
+} else {
+   log_warn("dkms modules found, this might cause issues during upgrade.");
+}
+}
+
 sub check_misc {
 print_header("MISCELLANEOUS CHECKS");
 my $ssh_config = eval { PVE::Tools::file_get_contents('/root/.ssh/config') 
};
@@ -1388,6 +1422,7 @@ sub check_misc {
 check_apt_repos();
 check_nvidia_vgpu_service();
 check_bootloader();
+check_dkms_modules();
 }
 
 my sub colored_if {
-- 
2.39.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH pve-network 1/2] sdn: config generation : check if interfaces.d/sdn is sourced

2023-06-23 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier 
---
 src/PVE/Network/SDN.pm | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm
index 1ad85e5..7ff550b 100644
--- a/src/PVE/Network/SDN.pm
+++ b/src/PVE/Network/SDN.pm
@@ -13,7 +13,7 @@ use PVE::Network::SDN::Subnets;
 
 use PVE::Tools qw(extract_param dir_glob_regex run_command);
 use PVE::Cluster qw(cfs_read_file cfs_write_file cfs_lock_file);
-
+use PVE::RESTEnvironment qw(log_warn);
 
 my $running_cfg = "sdn/.running-config";
 
@@ -208,6 +208,15 @@ sub get_local_vnets {
 
 sub generate_zone_config {
 my $raw_config = PVE::Network::SDN::Zones::generate_etc_network_config();
+if ($raw_config) {
+   eval {
+   my $net_cfg = PVE::INotify::read_file('interfaces', 1);
+   my $opts = $net_cfg->{data}->{options};
+   warn "missing 'source /etc/network/interfaces.d/sdn' directive for 
SDN support!\n"
+   if ! grep { $_->[1] =~ m!^source 
/etc/network/interfaces.d/(:?sdn|\*)! } @$opts;
+   };
+   log_warn("Failed to read network interfaces definition - $@") if $@;
+}
 PVE::Network::SDN::Zones::write_etc_network_config($raw_config);
 }
 
-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH pve-network 2/2] zones: status: display specific message if vnet is not generated.

2023-06-23 Thread Alexandre Derumier
also cleanup duplicate code in plugins

Signed-off-by: Alexandre Derumier 
---
 src/PVE/Network/SDN/Zones/Plugin.pm   | 18 +-
 src/PVE/Network/SDN/Zones/QinQPlugin.pm   |  8 +---
 src/PVE/Network/SDN/Zones/SimplePlugin.pm | 17 -
 src/PVE/Network/SDN/Zones/VlanPlugin.pm   |  8 +---
 4 files changed, 15 insertions(+), 36 deletions(-)

diff --git a/src/PVE/Network/SDN/Zones/Plugin.pm 
b/src/PVE/Network/SDN/Zones/Plugin.pm
index 2c707b3..c2f496f 100644
--- a/src/PVE/Network/SDN/Zones/Plugin.pm
+++ b/src/PVE/Network/SDN/Zones/Plugin.pm
@@ -190,14 +190,13 @@ sub parse_tag_number_or_range {
 return (scalar(@elements) > 1);
 }
 
-sub status {
-my ($class, $plugin_config, $zone, $vnetid, $vnet, $status) = @_;
+sub generate_status_message {
+my ($class, $vnetid, $status, $ifaces) = @_;
 
 my $err_msg = [];
 
-# ifaces to check
-my $ifaces = [ $vnetid ];
-
+return ["vnet is not generated. Please check you reload network task 
log."] if !$status->{$vnetid}->{status};
+
 foreach my $iface (@{$ifaces}) {
 if (!$status->{$iface}->{status}) {
push @$err_msg, "missing $iface";
@@ -205,7 +204,16 @@ sub status {
push @$err_msg, "error $iface";
 }
 }
+
+return $err_msg;
+}
+
+sub status {
+my ($class, $plugin_config, $zone, $vnetid, $vnet, $status) = @_;
+
+my $err_msg = $class->generate_status_message($vnetid, $status);
 return $err_msg;
+
 }
 
 
diff --git a/src/PVE/Network/SDN/Zones/QinQPlugin.pm 
b/src/PVE/Network/SDN/Zones/QinQPlugin.pm
index 8b9de43..7160434 100644
--- a/src/PVE/Network/SDN/Zones/QinQPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/QinQPlugin.pm
@@ -198,13 +198,7 @@ sub status {
push @$ifaces, $svlan_iface;
 }
 
-foreach my $iface (@{$ifaces}) {
-   if (!$status->{$iface}->{status}) {
-   push @$err_msg, "missing $iface";
-} elsif ($status->{$iface}->{status} ne 'pass') {
-   push @$err_msg, "error $iface";
-   }
-}
+$err_msg = $class->generate_status_message($vnetid, $status, $ifaces);
 return $err_msg;
 }
 
diff --git a/src/PVE/Network/SDN/Zones/SimplePlugin.pm 
b/src/PVE/Network/SDN/Zones/SimplePlugin.pm
index 7757747..4922903 100644
--- a/src/PVE/Network/SDN/Zones/SimplePlugin.pm
+++ b/src/PVE/Network/SDN/Zones/SimplePlugin.pm
@@ -123,23 +123,6 @@ sub generate_sdn_config {
 return $config;
 }
 
-sub status {
-my ($class, $plugin_config, $zone, $vnetid, $vnet, $status) = @_;
-
-# ifaces to check
-my $ifaces = [ $vnetid ];
-my $err_msg = [];
-foreach my $iface (@{$ifaces}) {
-   if (!$status->{$iface}->{status}) {
-   push @$err_msg, "missing $iface";
-   } elsif ($status->{$iface}->{status} ne 'pass') {
-   push @$err_msg, "error iface $iface";
-   }
-}
-return $err_msg;
-}
-
-
 sub vnet_update_hook {
 my ($class, $vnet_cfg, $vnetid, $zone_cfg) = @_;
 
diff --git a/src/PVE/Network/SDN/Zones/VlanPlugin.pm 
b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
index 0bb6b8a..f39b71d 100644
--- a/src/PVE/Network/SDN/Zones/VlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
@@ -165,13 +165,7 @@ sub status {
push @$ifaces, $vnet_uplinkpeer;
 }
 
-foreach my $iface (@{$ifaces}) {
-   if (!$status->{$iface}->{status}) {
-   push @$err_msg, "missing $iface";
-} elsif ($status->{$iface}->{status} ne 'pass') {
-   push @$err_msg, "error iface $iface";
-   }
-}
+$err_msg = $class->generate_status_message($vnetid, $status, $ifaces);
 return $err_msg;
 }
 
-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH pve-network 0/2] add warning if sdn config in not include in /etc/network/interfaces

2023-06-23 Thread Alexandre Derumier
- add a check at config generation
- display specific message on status if vnet is not generated


Alexandre Derumier (2):
  sdn: config generation : check if interfaces.d/sdn is sourced
  zones: status: display specific message if vnet is not generated.

 src/PVE/Network/SDN.pm| 11 ++-
 src/PVE/Network/SDN/Zones/Plugin.pm   | 18 +-
 src/PVE/Network/SDN/Zones/QinQPlugin.pm   |  8 +---
 src/PVE/Network/SDN/Zones/SimplePlugin.pm | 17 -
 src/PVE/Network/SDN/Zones/VlanPlugin.pm   |  8 +---
 5 files changed, 25 insertions(+), 37 deletions(-)

-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



Re: [pve-devel] [PATCH container] fix #4765: lxc: report cpu usage correctly

2023-06-23 Thread Fiona Ebner
Am 20.06.23 um 17:46 schrieb Maximiliano Sandoval:
> When running `pct status VMID` the variable

Issue is only present with --verbose.

> $last_proc_vmid_stat->{$vmid} is not set and pct reports no cpu usage.
> 
> We address this by computing the used cpu time over the total uptime of
> the container.
> 

qm would have the same issue, but there, we don't even output a line for
"cpu:" ;)

IMHO, the average of the CPU usage across the whole uptime is not what
most people would expect this value to be. Maybe we should just remove
the line from the output like in qm (technically a breaking change) or
maybe query the CPU stats twice with a small time window in between?

No matter what approach we go for, the behavior of qm and pct should be
made consistent here (if no good reason against it pops up).


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH guest-common] replication: avoid passing removed storages to target

2023-06-23 Thread Fiona Ebner
After removing a storage, replication states can still contain
references to it, even if no volume references it anymore.

If a storage does not exist in the storage configuration, the
replication target runs into an error when preparing the job locally.
This error prevents both running and removing the replication job. Fix
it by not passing the invalid storage ID in the first place.

Signed-off-by: Fiona Ebner 
---
 src/PVE/Replication.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/PVE/Replication.pm b/src/PVE/Replication.pm
index 469ca19..bd627e5 100644
--- a/src/PVE/Replication.pm
+++ b/src/PVE/Replication.pm
@@ -275,6 +275,9 @@ sub replicate {
 $logfunc->("guest => $guest_name, running => $running");
 $logfunc->("volumes => " . join(',', @$sorted_volids));
 
+# filter out left-over non-existing/removed storages - avoids error on 
target
+$state->{storeid_list} = [ grep { $storecfg->{ids}->{$_} } 
$state->{storeid_list}->@* ];
+
 if (my $remove_job = $jobcfg->{remove_job}) {
 
$logfunc->("start job removal - mode '${remove_job}'");
-- 
2.39.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH v2 pve-manager 1/1] ui: ceph status: add pg warning state

2023-06-23 Thread Alexandre Derumier
Like ceph mgr dashboard, we need a warning state.

- set degraded as warning instead working
- set undersized as warning instead error
- rename error as critical
- add "working" (info-blue) color for working state
- use warning (orange) color for warning state

Signed-off-by: Alexandre Derumier 
---
 www/manager6/ceph/StatusDetail.js | 31 +++
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/www/manager6/ceph/StatusDetail.js 
b/www/manager6/ceph/StatusDetail.js
index d6c0763b..cac6445d 100644
--- a/www/manager6/ceph/StatusDetail.js
+++ b/www/manager6/ceph/StatusDetail.js
@@ -94,6 +94,7 @@ Ext.define('PVE.ceph.StatusDetail', {
colors: [
'#CFCFCF',
'#21BF4B',
+   '#3892d4',
'#FFCC00',
'#FF6C59',
],
@@ -152,7 +153,6 @@ Ext.define('PVE.ceph.StatusDetail', {
backfilling: 2,
creating: 2,
deep: 2,
-   degraded: 2,
forced_backfill: 2,
forced_recovery: 2,
peered: 2,
@@ -165,17 +165,20 @@ Ext.define('PVE.ceph.StatusDetail', {
snaptrim: 2,
snaptrim_wait: 2,
 
-   // error
-   backfill_toofull: 3,
-   backfill_unfound: 3,
-   down: 3,
-   incomplete: 3,
-   inconsistent: 3,
-   recovery_toofull: 3,
-   recovery_unfound: 3,
-   snaptrim_error: 3,
-   stale: 3,
+   //warning
+   degraded: 3,
undersized: 3,
+
+   // critical
+   backfill_toofull: 4,
+   backfill_unfound: 4,
+   down: 4,
+   incomplete: 4,
+   inconsistent: 4,
+   recovery_toofull: 4,
+   recovery_unfound: 4,
+   snaptrim_error: 4,
+   stale: 4,
 },
 
 statecategories: [
@@ -191,10 +194,14 @@ Ext.define('PVE.ceph.StatusDetail', {
},
{
text: gettext('Working'),
+   cls: 'working',
+   },
+   {
+   text: gettext('Warning'),
cls: 'warning',
},
{
-   text: gettext('Error'),
+   text: gettext('Critical'),
cls: 'critical',
},
 ],
-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH-SERIE proxmox-widget-toolkit/pve-manager] ceph ui: add pg warning state

2023-06-23 Thread Alexandre Derumier
This patch serie improve ceph dashboard adding a new pg warning state.
Currently undersized pg displayed as error state, and degraded as working state.

working is now displayed with blue color, and warning with orange color

changelog v2:
 - fix Aaron comments

proxmox-widget-toolkit:

Alexandre Derumier (1):
  css: add .working color #3892d4

 src/css/ext6-pmx.css | 4 
 1 file changed, 4 insertions(+)

pve-manager:

Alexandre Derumier (1):
  ui: ceph status: add pg warning state

 www/manager6/ceph/StatusDetail.js | 31 +++
 1 file changed, 19 insertions(+), 12 deletions(-)

-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH proxmox-widget-toolkit 1/1] css: add .working color #3892d4

2023-06-23 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier 
---
 src/css/ext6-pmx.css | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/css/ext6-pmx.css b/src/css/ext6-pmx.css
index 2ffd2a8..9344595 100644
--- a/src/css/ext6-pmx.css
+++ b/src/css/ext6-pmx.css
@@ -113,6 +113,10 @@
 color: #3892d4;
 }
 
+.working {
+color: #3892d4;
+}
+
 .pwt-eol-icon {
 position: relative;
 float: left;
-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH ifupdown2 2/2] patch: ethtool: add rx-vlan-filter support

2023-06-23 Thread Alexandre Derumier
to fix nic like mellanox && vlan-aware-bridge

upstream pull request:
https://github.com/CumulusNetworks/ifupdown2/pull/266

Signed-off-by: Alexandre Derumier 
---
 debian/patches/series |  1 +
 ...01-addons-ethtool-add-rx-vlan-filter.patch | 43 +++
 ifupdown2 |  2 +-
 3 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 
debian/patches/upstream/0001-addons-ethtool-add-rx-vlan-filter.patch

diff --git a/debian/patches/series b/debian/patches/series
index 628fed1..9f2936f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ pve/0007-allow-vlan-tag-inside-vxlan-tunnel.patch
 pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch
 pve/0009-gvgeb-fix-python-interpreter-shebang.patch
 upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch
+upstream/0001-addons-ethtool-add-rx-vlan-filter.patch
diff --git 
a/debian/patches/upstream/0001-addons-ethtool-add-rx-vlan-filter.patch 
b/debian/patches/upstream/0001-addons-ethtool-add-rx-vlan-filter.patch
new file mode 100644
index 000..aad6c24
--- /dev/null
+++ b/debian/patches/upstream/0001-addons-ethtool-add-rx-vlan-filter.patch
@@ -0,0 +1,43 @@
+From a087295ba496680b81ecafe72f999d4e9076e737 Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier 
+Date: Fri, 23 Jun 2023 09:13:39 +0200
+Subject: [PATCH] addons: ethtool: add rx-vlan-filter
+
+some nic like mellanox connectx don't work well with
+vlan aware bridge && rx-vlan-filter.
+(They are limited in number of vlans in hardware filtering,
+and break with big number of vlans like bridge-vids 2-4096)
+
+Signed-off-by: Alexandre Derumier 
+---
+ ifupdown2/addons/ethtool.py | 7 +++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/ifupdown2/addons/ethtool.py b/ifupdown2/addons/ethtool.py
+index 2134329..8a79472 100644
+--- a/ifupdown2/addons/ethtool.py
 b/ifupdown2/addons/ethtool.py
+@@ -117,6 +117,12 @@ class ethtool(Addon, moduleBase):
+ 'validvals': ['on', 'off'],
+ 'default': 'varies by interface'
+ },
++'rx-vlan-filter': {
++'help': 'RX Vlan Filter',
++'example': ['rx-vlan-filter off'],
++'validvals': ['on', 'off'],
++'default': 'varies by interface'
++},
+ 'ring-rx': {
+ 'help': 'Ring RX Parameter',
+ 'example': ['ring-rx 512'],
+@@ -384,6 +390,7 @@ class ethtool(Addon, moduleBase):
+ self.do_offload_settings(ifaceobj, 'ufo-offload', 'ufo')
+ self.do_offload_settings(ifaceobj, 'tx-offload', 'tx')
+ self.do_offload_settings(ifaceobj, 'rx-offload', 'rx')
++self.do_offload_settings(ifaceobj, 'rx-vlan-filter', 'rx-vlan-filter')
+ 
+ def _pre_down(self, ifaceobj):
+ pass #self._post_up(ifaceobj,operation="_pre_down")
+-- 
+2.39.2
+
diff --git a/ifupdown2 b/ifupdown2
index a052254..a087295 16
--- a/ifupdown2
+++ b/ifupdown2
@@ -1 +1 @@
-Subproject commit a0522546b848435115a20eb647f87ade01761a33
+Subproject commit a087295ba496680b81ecafe72f999d4e9076e737
-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH pve-common 1/1] network_interfaces: disable rx-vlan-filter for physical interfaces ports of a vlan-aware bridge

2023-06-23 Thread Alexandre Derumier
some nic like mellanox connectx or intel i40e don't work well vlan-aware bridge
because they are limited in number of vlan filtering in hardware

Signed-off-by: Alexandre Derumier 
---
 src/PVE/INotify.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index c86c2de..c4dd85d 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -1668,6 +1668,8 @@ sub __write_etc_network_interfaces {
$iface = $bondslaves->{$iface} if $bondslaves->{$iface};
if ($bridgeports->{$iface} && 
$bridges->{$bridgeports->{$iface}}->{bridge_vlan_aware}) {
$ifaces->{$phys_iface}->{'rx-vlan-filter'} = 'off' if 
!defined($ifaces->{$phys_iface}->{'rx-vlan-filter'});
+   } else {
+   delete $ifaces->{$phys_iface}->{'rx-vlan-filter'};
}
 }
 
-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH ifupdown2 1/2] add ethtool as depend

2023-06-23 Thread Alexandre Derumier
some users need to disable some buggy features for their nic,
install ethtool by default

Signed-off-by: Alexandre Derumier 
---
 debian/control | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 4eea122..29eef2e 100644
--- a/debian/control
+++ b/debian/control
@@ -17,8 +17,8 @@ Architecture: all
 Provides: ifupdown
 Conflicts: ifupdown
 Replaces: ifupdown
-Depends: ${python3:Depends}, ${misc:Depends}, iproute2, python3-six, 
python3-setuptools, python3-systemd
-Suggests: isc-dhcp-client, bridge-utils, ethtool, python3-gvgen, python3-mako
+Depends: ${python3:Depends}, ${misc:Depends}, iproute2, python3-six, 
python3-setuptools, python3-systemd, ethtool
+Suggests: isc-dhcp-client, bridge-utils, python3-gvgen, python3-mako
 Description: Network Interface Management tool similar to ifupdown
  ifupdown2 is ifupdown re-written in Python. It replaces ifupdown and provides
  the same user interface as ifupdown for network interface configuration.
-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH-SERIE ifupdown2/common] disable rx-vlan-filter on iface in vlan-aware-bridge

2023-06-23 Thread Alexandre Derumier
Hi,

Some nics like mellanox connect-x  or intel i40e don't work with 
vlan-aware-bridge
when too many vlans are defined.
Depend of the model, connectx-3 is limited to 64 vlans, connect-x4 to 128vlans
https://forum.proxmox.com/threads/proxmox-7-and-mellanox-connectx4-and-vlan-aware-bridge.104926/#post-555269

i40e seem to throw errors like
Jan 18 14:44:27 jupiter kernel: [ 145.060365] i40e :3d:00.0: Error 
I40E_AQ_RC_ENOSPC, forcing overflow promiscuous on PF
https://forum.proxmox.com/threads/error-i40e_aq_rc_enospc-forcing-overflow-promiscuous-on-pf.62875/
https://forum.proxmox.com/threads/proxmox-8-and-i40e-driver-kernel-6-2.129364/

rx-vlan-filter is only a protection to drop packets with unknown vlan at nic 
level.
(not related to vlan offloading, where nic can support any number of vlan)

When vlan-aware is enabled, bridge is already doing the vlan filtering, so it's 
pretty safe to disable it.
(AFAIK, it was not enabled on proxmox 5, as I didn't have mellanox problem at 
this time)

This patch serie add support to ifupdown2 to "rx-vlan-filter" and add ethtool 
as depend
and rx-vlan-filter is added to /etc/network/interfaces on phys nic if the nic 
is port of vlan aware bridge.
(or slave of bond port of vlan-aware-bridge)

fix:
https://bugzilla.proxmox.com/show_bug.cgi?id=2329
https://bugzilla.proxmox.com/show_bug.cgi?id=3893

(maybe they are other related bug reports)


ifupdown2:

Alexandre Derumier (2):
  add ethtool as depend
  patch: ethtool: add rx-vlan-filter support

 debian/control|  4 +-
 debian/patches/series |  1 +
 ...01-addons-ethtool-add-rx-vlan-filter.patch | 43 +++
 ifupdown2 |  2 +-
 4 files changed, 47 insertions(+), 3 deletions(-)
 create mode 100644 
debian/patches/upstream/0001-addons-ethtool-add-rx-vlan-filter.patch

pve-common:

Alexandre Derumier (1):
  network_interfaces: disable rx-vlan-filter for physical interfaces
ports of a vlan-aware bridge

 src/PVE/INotify.pm | 2 ++
 1 file changed, 2 insertions(+)


-- 
2.39.2


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



Re: [pve-devel] applied-series: [PATCH widget-toolkit/http-server/apiclient 0/4] Set SameSite=Strict on Auth Cookies

2023-06-23 Thread Max Carrara
On 6/6/23 17:17, Thomas Lamprecht wrote:
> Am 15/03/2023 um 17:26 schrieb Max Carrara:
>> This series sets the `SameSite` attribute of authentication cookies
>> to `Strict` as per RFC 6265[1]. This prevents browsers from nagging;
>> for example, FireFox 102.8.0esr would complain in the following manner:
>>
>>> Cookie “PVEAuthCookie” does not have a proper “SameSite” attribute 
>>> value. Soon, cookies without the “SameSite” attribute or with an
>>> invalid value will be treated as “Lax”. This means that the cookie
>>> will no longer be sent in third-party contexts. If your application
>>> depends on this cookie being available in such contexts, please add
>>> the “SameSite=None“ attribute to it. To know more about the
>>> “SameSite“ attribute, read 
>>> https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
>>
>> Since setting `SameSite` to `Strict` enforces that the cookie be only
>> sent in a first-party context - so, only to the web UI and no other
>> site - it seemed like the best thing to choose. I'm not aware of the
>> cookie being used in any other contexts; if that's the case, I'll
>> gladly provide a v2.
> 
> now, with the upcomming beta, it's the best time to find that out ^^
> 
>>
>> The attribute is set wherever it makes sense; the only repo in which
>> it's not set would be 'pve-client', as that one's apparently not being
>> used at all (it wouldn't even build). Please let me know if I have
>> missed any spots.
>>
>> [1] 
>> https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html#name-the-samesite-attribute
>>
>>
>> proxmox-widget-toolkit:
>>
>> Max Carrara (2):
>>   toolkit/utils: set SameSite attr of auth cookie to 'strict'
>>   toolkit/utils: fix whitespace
>>
>>  src/Toolkit.js | 513 ++---
>>  src/Utils.js   |   6 +-
>>  2 files changed, 276 insertions(+), 243 deletions(-)
>>
>>
>> pve-http-server:
>>
>> Max Carrara (1):
>>   formatter/bootstrap: set SameSite attr of auth cookie to 'strict'
>>
>>  src/PVE/APIServer/Formatter.pm   | 2 +-
>>  src/PVE/APIServer/Formatter/Bootstrap.pm | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>>
>> pve-apiclient:
>>
>> Max Carrara (1):
>>   lwp: set SameSite attr of auth cookie to 'strict'
>>
>>  PVE/APIClient/LWP.pm | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
> 
> 
> applied, thanks!

FYI, I was also about to scour through the PBS code to apply the
`SameSite` attribute to `PBSAuthCookie` as well - turns out that PBS
sets its cookie only via Ext JS, so this should work for PBS as well,
once the version of the `proxmox-widget-toolkit` dependency is bumped
(unless I've missed something). I'll keep an eye on it in regards to
PBS too.


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager v3 1/1] try using 'pve-eslint' if it exists

2023-06-23 Thread Dominik Csapak
but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht 
Signed-off-by: Dominik Csapak 
---
 defines.mk| 2 ++
 www/manager6/Makefile | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/defines.mk b/defines.mk
index 3a5792ad..811f3483 100644
--- a/defines.mk
+++ b/defines.mk
@@ -19,3 +19,5 @@ WWWTOUCHDIR=${WWWBASEDIR}/touch
 WWWCSSDIR=${WWWBASEDIR}/css
 WWWFONTSDIR=${WWWBASEDIR}/css/fonts
 WWWJSDIR=${WWWBASEDIR}/js
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
+
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 2d884f4a..ff113aa2 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -314,13 +314,13 @@ 
WIDGETKIT=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
 all:
 
 .lint-incremental: $(JSSRC)
-   eslint $?
+   $(ESLINT) $?
touch "$@"
 
 .PHONY: lint
 check: lint
 lint: $(JSSRC)
-   eslint --strict $(JSSRC)
+   $(ESLINT) --strict $(JSSRC)
touch ".lint-incremental"
 
 pvemanagerlib.js: .lint-incremental OnlineHelpInfo.js $(JSSRC)
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH widget-toolkit v3 1/1] try using 'pve-eslint' if it exists

2023-06-23 Thread Dominik Csapak
but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht 
Signed-off-by: Dominik Csapak 
---
 src/Makefile   | 6 +++---
 src/defines.mk | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 7cff5dd..2fca191 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -110,14 +110,14 @@ all: $(SUBDIRS)
set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done
 
 .lint-incremental: $(JSSRC)
-   eslint $?
+   $(ESLINT) $?
touch "$@"
 
 .PHONY: lint
 check: lint
-   eslint --strict api-viewer/APIViewer.js
+   $(ESLINT) --strict api-viewer/APIViewer.js
 lint: $(JSSRC)
-   eslint --strict $(JSSRC)
+   $(ESLINT) --strict $(JSSRC)
touch ".lint-incremental"
 
 BUILD_TIME=$(or $(SOURCE_DATE_EPOCH),$(shell date '+%s.%N'))
diff --git a/src/defines.mk b/src/defines.mk
index 36d5353..936b51e 100644
--- a/src/defines.mk
+++ b/src/defines.mk
@@ -6,3 +6,4 @@ WWWBASEDIR=$(DESTDIR)/usr/share/javascript/$(PACKAGE)
 WWWCSSDIR=$(WWWBASEDIR)/css
 WWWIMAGESDIR=$(WWWBASEDIR)/images
 WWWTHEMEDIR=$(WWWBASEDIR)/themes
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH eslint v3 1/1] change binary name from 'eslint' to 'pve-eslint'

2023-06-23 Thread Dominik Csapak
so that we don't conflict with 'eslint' package in debian, which ships
the same binary

Signed-off-by: Dominik Csapak 
---
 debian/links | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/links b/debian/links
index 99342ed..0a1546f 100644
--- a/debian/links
+++ b/debian/links
@@ -1 +1 @@
-usr/share/nodejs/pve-eslint/bin/app.js usr/bin/eslint
+usr/share/nodejs/pve-eslint/bin/app.js usr/bin/pve-eslint
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH proxmox-backup v3 1/1] try using 'pve-eslint' if it exists

2023-06-23 Thread Dominik Csapak
but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht 
Signed-off-by: Dominik Csapak 
---
 defines.mk   | 1 +
 www/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/defines.mk b/defines.mk
index cd5b52a2..c113d4e1 100644
--- a/defines.mk
+++ b/defines.mk
@@ -10,6 +10,7 @@ DOCDIR = $(PREFIX)/share/doc/proxmox-backup
 JSDIR = $(DATAROOTDIR)/javascript/proxmox-backup
 SYSCONFDIR = /etc
 ZSH_COMPL_DEST = $(PREFIX)/share/zsh/vendor-completions
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
 
 # For local overrides
 -include local.mak
diff --git a/www/Makefile b/www/Makefile
index 476c80b6..2f1df442 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -133,11 +133,11 @@ js/proxmox-backup-gui.js: .lint-incremental js 
OnlineHelpInfo.js ${JSSRC}
 
 .PHONY: check
 check:
-   eslint --strict ${JSSRC}
+   $(ESLINT) --strict ${JSSRC}
touch ".lint-incremental"
 
 .lint-incremental: ${JSSRC}
-   eslint $?
+   $(ESLINT) $?
touch "$@"
 
 .PHONY: clean
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v3] change eslint

2023-06-23 Thread Dominik Csapak
from 'eslint' to 'pve-eslint' to avoid a conflict with debians 'eslint'
package which ships the same binary

to avoid breakage, pull out the eslint binary into a make variable and
use pve-eslint if it exists, and eslint otherwise

changes from v2:
* use $(shell command) instead of $(wildcard), thanks @thomas for the
  suggestions, this makes it shorter + we don't have to use the full
  path
* added Suggested-by trailers

changes from v1:
* use $(ESLINT)
* use $(wildcard) make builtin to check if pve-eslint exists, use eslint as 
fallback
* introduce defines.mk in pmg-gui for ESLINT variable

pve-eslint:

Dominik Csapak (1):
  change binary name from 'eslint' to 'pve-eslint'

 debian/links | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

pve-manager:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 defines.mk| 2 ++
 www/manager6/Makefile | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

proxmox-widget-toolkit:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 src/Makefile   | 6 +++---
 src/defines.mk | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

pmg-gui:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 defines.mk | 1 +
 js/Makefile| 6 --
 js/mobile/Makefile | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)
 create mode 100644 defines.mk

proxmox-backup:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 defines.mk   | 1 +
 www/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH pmg-gui v3 1/1] try using 'pve-eslint' if it exists

2023-06-23 Thread Dominik Csapak
but fallback to 'eslint' otherwise

introduce the defines.mk for this

Suggested-by: Thomas Lamprecht 
Signed-off-by: Dominik Csapak 
---
 defines.mk | 1 +
 js/Makefile| 6 --
 js/mobile/Makefile | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)
 create mode 100644 defines.mk

diff --git a/defines.mk b/defines.mk
new file mode 100644
index 000..15d118f
--- /dev/null
+++ b/defines.mk
@@ -0,0 +1 @@
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
diff --git a/js/Makefile b/js/Makefile
index fad2bd6..612a185 100644
--- a/js/Makefile
+++ b/js/Makefile
@@ -1,3 +1,5 @@
+include ../defines.mk
+
 JSSRC= \
Utils.js\
FilterProxy.js  \
@@ -106,7 +108,7 @@ OnlineHelpInfo.js: /usr/bin/asciidoc-pmg
mv $@.tmp $@
 
 .lint-incremental: ${JSSRC}
-   eslint $?
+   $(ESLINT) $?
touch "$@"
 
 .PHONY: lint
@@ -114,7 +116,7 @@ lint: .lint-incremental
 
 .PHONY: check
 check: ${JSSRC}
-   eslint --strict ${JSSRC}
+   $(ESLINT) --strict ${JSSRC}
touch ".lint-incremental"
 
 pmgmanagerlib.js: OnlineHelpInfo.js ${JSSRC}
diff --git a/js/mobile/Makefile b/js/mobile/Makefile
index 3e379d2..31afab8 100644
--- a/js/mobile/Makefile
+++ b/js/mobile/Makefile
@@ -1,3 +1,4 @@
+include ../../defines.mk
 
 # caution: order is important
 MOBILESRC= \
@@ -10,7 +11,7 @@ MOBILESRC=\
  app.js\
 
 lint: pmgmanagerlib-mobile.js
-   eslint $^
+   $(ESLINT) $^
 
 .PHONY: check
 check: lint
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



Re: [pve-devel] health check uri for proxmox web front end?

2023-06-23 Thread Thomas Lamprecht
Hi,

Am 23/06/2023 um 00:33 schrieb Wolf Noble:
> Im aware of the existing api face, however what exists now requires 
> authentication, and seems a little heavy for my intended use:
> 
>  (hey, you alive? yes? cool! i’ll check again in a couple seconds) 
> 
> Ideally, there’d be a super lightweight check face that responds with a 
> 200/ok, perhaps even with some light metadata cached from other normal 
> operations…

We are normally reluctant when adding world-readable API calls, but one
could imagine something like the "ping" one from PBS:

https://pbs.proxmox.com/docs/api-viewer/index.html#/ping

> 
> the ideal (from my perspective) would be a target endpoint that requires no 
> auth, but the authorized calling hosts must be explicitly whitelisted for the 
> node to respond to the query.
> 
> ideally logging of ‘good’ state request responses would be optional.
> 
> ideally, data included in the response, and it’s acceptable freshness would 
> also be configurable.. but i don’t want to overcomplicate things either….
> 
> does such a mechanism exist already, and I just couldn’t find it?

Well, you already got a proxy in-between and API tokens exists [0][1], so you
can always make a API path world-readable to all that can access the reverse
proxy by adding a separate "virtual" URL path, that doesn't clash with existing
Proxmox VE ones, and make that point to the, e.g., node status endpoint [2] and
make it add the API token, restricted to just auditing, on any request as
Authorization header.

[0]: https://pve.proxmox.com/pve-docs/chapter-pveum.html#pveum_tokens
[1]: https://pve.proxmox.com/wiki/Proxmox_VE_API#API_Tokens
[2]: https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/status

> 
> if not, is there already a feature request, or someplace this was already 
> discussed?
> 

Adding some health API call, that is less focused on the underlying host system
metrics, and more a central point to check if API and core services are up
could be done, albeit certainly with requiring audit permissions on anything but
a simple "yes API is there" (which can be figured out anyway by simply doing any
API request, as even getting a permission denied is a good sign that API is 
working).

Anyhow, we should check closely what this endpoint should return and if it 
wouldn't
be already covered by an existing ones (sorry, I do not have every one 
memorised ^^)
but the "/nodes/{node}/services" [3] might be also a candidate.

[3]: 
https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/services

> —- TANGENT
> 
> another thought I had which seemed totally tangental at first blush was 
> wondering if the web ui for a cluster could additionally (ie not exclusively) 
> be served by a different class of node (i was thinking pi4’s … ) the thought 
> was that by having an ‘administrative function only’ cluster node type could 
> be a way to as a way to slowly build arm64 support… 
> … as i imagine this could be useful, but getting EVERYTHING working on a dif 
> arch is a monumentally complex task not likely to bear much fruit terribly 
> quickly, but I digress…

If we do another architecture then with all of Proxmox VE's as otherwise the 
stream
of confusion and feature request will never end.

FWIW, we evaluated arm64 in 2016, and the codebase is partially still 
containing the
fundamentals for that, so community projects like Pimox [3] can exist, but for 
us
then the performance, boot situation and availability of server hardware was 
just
rather to disappointing them - and while the latter has improved a bit in recent
time, the boot situation and HW support is still rather bare bones.

[4] https://github.com/pimox/pimox7

While not totally ruling some form of arm64 support out for the future, we're 
eyeing
more towards RISC-V, an actual open architecture.


> tia! 
> I’ve been really happy with my proxmox experience over the last several 
> years…. 
> 
> thanks for all the hard work you’ve done keeping proxmox such a stable 
> abstraction layer… its greatly appreciated.

thank you for your kind words!

regards,
 Thomas


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v2] change eslint

2023-06-23 Thread Dominik Csapak

sorry i forgot to add,

basically all patches (feel free to fixup on commit):

Suggested-by: Thomas Lamprecht 


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH pmg-gui v2 1/1] try using 'pve-eslint' if it exists

2023-06-23 Thread Dominik Csapak
but fallback to 'eslint' otherwise

introduce the defines.mk for this

Signed-off-by: Dominik Csapak 
---
 defines.mk | 5 +
 js/Makefile| 6 --
 js/mobile/Makefile | 3 ++-
 3 files changed, 11 insertions(+), 3 deletions(-)
 create mode 100644 defines.mk

diff --git a/defines.mk b/defines.mk
new file mode 100644
index 000..b88eef1
--- /dev/null
+++ b/defines.mk
@@ -0,0 +1,5 @@
+ifneq ("$(wildcard /usr/bin/pve-eslint)", "")
+ESLINT ?= /usr/bin/pve-eslint
+else
+ESLINT ?= /usr/bin/eslint
+endif
diff --git a/js/Makefile b/js/Makefile
index fad2bd6..612a185 100644
--- a/js/Makefile
+++ b/js/Makefile
@@ -1,3 +1,5 @@
+include ../defines.mk
+
 JSSRC= \
Utils.js\
FilterProxy.js  \
@@ -106,7 +108,7 @@ OnlineHelpInfo.js: /usr/bin/asciidoc-pmg
mv $@.tmp $@
 
 .lint-incremental: ${JSSRC}
-   eslint $?
+   $(ESLINT) $?
touch "$@"
 
 .PHONY: lint
@@ -114,7 +116,7 @@ lint: .lint-incremental
 
 .PHONY: check
 check: ${JSSRC}
-   eslint --strict ${JSSRC}
+   $(ESLINT) --strict ${JSSRC}
touch ".lint-incremental"
 
 pmgmanagerlib.js: OnlineHelpInfo.js ${JSSRC}
diff --git a/js/mobile/Makefile b/js/mobile/Makefile
index 3e379d2..31afab8 100644
--- a/js/mobile/Makefile
+++ b/js/mobile/Makefile
@@ -1,3 +1,4 @@
+include ../../defines.mk
 
 # caution: order is important
 MOBILESRC= \
@@ -10,7 +11,7 @@ MOBILESRC=\
  app.js\
 
 lint: pmgmanagerlib-mobile.js
-   eslint $^
+   $(ESLINT) $^
 
 .PHONY: check
 check: lint
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH widget-toolkit v2 1/1] try using 'pve-eslint' if it exists

2023-06-23 Thread Dominik Csapak
but fallback to 'eslint' otherwise

Signed-off-by: Dominik Csapak 
---
 src/Makefile   | 6 +++---
 src/defines.mk | 6 ++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 7cff5dd..2fca191 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -110,14 +110,14 @@ all: $(SUBDIRS)
set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done
 
 .lint-incremental: $(JSSRC)
-   eslint $?
+   $(ESLINT) $?
touch "$@"
 
 .PHONY: lint
 check: lint
-   eslint --strict api-viewer/APIViewer.js
+   $(ESLINT) --strict api-viewer/APIViewer.js
 lint: $(JSSRC)
-   eslint --strict $(JSSRC)
+   $(ESLINT) --strict $(JSSRC)
touch ".lint-incremental"
 
 BUILD_TIME=$(or $(SOURCE_DATE_EPOCH),$(shell date '+%s.%N'))
diff --git a/src/defines.mk b/src/defines.mk
index 36d5353..545560c 100644
--- a/src/defines.mk
+++ b/src/defines.mk
@@ -6,3 +6,9 @@ WWWBASEDIR=$(DESTDIR)/usr/share/javascript/$(PACKAGE)
 WWWCSSDIR=$(WWWBASEDIR)/css
 WWWIMAGESDIR=$(WWWBASEDIR)/images
 WWWTHEMEDIR=$(WWWBASEDIR)/themes
+
+ifneq ("$(wildcard /usr/bin/pve-eslint)", "")
+ESLINT ?= /usr/bin/pve-eslint
+else
+ESLINT ?= /usr/bin/eslint
+endif
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH eslint/manager/wt/pmg-gui/proxmox-backup v2] change eslint

2023-06-23 Thread Dominik Csapak
from 'eslint' to 'pve-eslint' to avoid a conflict with debians 'eslint'
package which ships the same binary

to avoid breakage, pull out the eslint binary into a make variable and
use pve-eslint if it exists, and eslint otherwise

changes from v1:
* use $(ESLINT)
* use $(wildcard) make builtin to check if pve-eslint exists, use eslint as 
fallback
* introduce defines.mk in pmg-gui for ESLINT variable

pve-eslint:

Dominik Csapak (1):
  change binary name from 'eslint' to 'pve-eslint'

 debian/links | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

pve-manager

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 defines.mk| 7 +++
 www/manager6/Makefile | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

proxmox-widget-toolkit:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 src/Makefile   | 6 +++---
 src/defines.mk | 6 ++
 2 files changed, 9 insertions(+), 3 deletions(-)

pmg-gui:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 defines.mk | 5 +
 js/Makefile| 6 --
 js/mobile/Makefile | 3 ++-
 3 files changed, 11 insertions(+), 3 deletions(-)
 create mode 100644 defines.mk

proxmox-backup:

Dominik Csapak (1):
  try using 'pve-eslint' if it exists

 defines.mk   | 6 ++
 www/Makefile | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH manager v2 1/1] try using 'pve-eslint' if it exists

2023-06-23 Thread Dominik Csapak
but fallback to 'eslint' otherwise

Signed-off-by: Dominik Csapak 
---
 defines.mk| 7 +++
 www/manager6/Makefile | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/defines.mk b/defines.mk
index 3a5792ad..b75671f4 100644
--- a/defines.mk
+++ b/defines.mk
@@ -19,3 +19,10 @@ WWWTOUCHDIR=${WWWBASEDIR}/touch
 WWWCSSDIR=${WWWBASEDIR}/css
 WWWFONTSDIR=${WWWBASEDIR}/css/fonts
 WWWJSDIR=${WWWBASEDIR}/js
+
+ifneq ("$(wildcard /usr/bin/pve-eslint)", "")
+ESLINT ?= /usr/bin/pve-eslint
+else
+ESLINT ?= /usr/bin/eslint
+endif
+
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 2d884f4a..ff113aa2 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -314,13 +314,13 @@ 
WIDGETKIT=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
 all:
 
 .lint-incremental: $(JSSRC)
-   eslint $?
+   $(ESLINT) $?
touch "$@"
 
 .PHONY: lint
 check: lint
 lint: $(JSSRC)
-   eslint --strict $(JSSRC)
+   $(ESLINT) --strict $(JSSRC)
touch ".lint-incremental"
 
 pvemanagerlib.js: .lint-incremental OnlineHelpInfo.js $(JSSRC)
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH proxmox-backup v2 1/1] try using 'pve-eslint' if it exists

2023-06-23 Thread Dominik Csapak
but fallback to 'eslint' otherwise

Signed-off-by: Dominik Csapak 
---
 defines.mk   | 6 ++
 www/Makefile | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/defines.mk b/defines.mk
index cd5b52a2..68e7741c 100644
--- a/defines.mk
+++ b/defines.mk
@@ -11,5 +11,11 @@ JSDIR = $(DATAROOTDIR)/javascript/proxmox-backup
 SYSCONFDIR = /etc
 ZSH_COMPL_DEST = $(PREFIX)/share/zsh/vendor-completions
 
+ifneq ("$(wildcard /usr/bin/pve-eslint)", "")
+ESLINT ?= /usr/bin/pve-eslint
+else
+ESLINT ?= /usr/bin/eslint
+endif
+
 # For local overrides
 -include local.mak
diff --git a/www/Makefile b/www/Makefile
index 476c80b6..2f1df442 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -133,11 +133,11 @@ js/proxmox-backup-gui.js: .lint-incremental js 
OnlineHelpInfo.js ${JSSRC}
 
 .PHONY: check
 check:
-   eslint --strict ${JSSRC}
+   $(ESLINT) --strict ${JSSRC}
touch ".lint-incremental"
 
 .lint-incremental: ${JSSRC}
-   eslint $?
+   $(ESLINT) $?
touch "$@"
 
 .PHONY: clean
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH eslint v2 1/1] change binary name from 'eslint' to 'pve-eslint'

2023-06-23 Thread Dominik Csapak
so that we don't conflict with 'eslint' package in debian, which ships
the same binary

Signed-off-by: Dominik Csapak 
---
 debian/links | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/links b/debian/links
index 99342ed..0a1546f 100644
--- a/debian/links
+++ b/debian/links
@@ -1 +1 @@
-usr/share/nodejs/pve-eslint/bin/app.js usr/bin/eslint
+usr/share/nodejs/pve-eslint/bin/app.js usr/bin/pve-eslint
-- 
2.30.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH proxmox-kernel-helper] boot tool: fix grep misinterpretation of arguments starting with a hyphen

2023-06-23 Thread Hannes Laimer
`proxmox-boot-tool kernel remove --help`, or any version agrument
that started with a '-', lead to the grep usage message being written
into /etc/kernel/proxmox-boot-manual-kernels. The problem was `grep`
interpreted the kernel version agrument as an option since it starts
with '-'.
---
 src/bin/proxmox-boot-tool | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/proxmox-boot-tool b/src/bin/proxmox-boot-tool
index 913b0f6..302974b 100755
--- a/src/bin/proxmox-boot-tool
+++ b/src/bin/proxmox-boot-tool
@@ -27,7 +27,7 @@ _remove_entry_from_list_file() {
fi
 
if [ -e "$file" ]; then
-   grep -vFx "$entry" "$file" > "$file.new" || true
+   grep -vFx -- "$entry" "$file" > "$file.new" || true
mv "$file.new" "$file"
else
echo "'$file' does not exist.."
@@ -279,7 +279,7 @@ remove_kernel() {
exit 1
fi
 
-   if grep -sqFx "$ver" "$MANUAL_KERNEL_LIST"; then
+   if grep -sqFx -- "$ver" "$MANUAL_KERNEL_LIST"; then
_remove_entry_from_list_file "$MANUAL_KERNEL_LIST" "$ver"
echo "Removed kernel '$ver' from manual kernel list. Use the 
'refresh' command to update the ESPs."
else
-- 
2.39.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel