public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] network-interface-pinning: ignore comments in .link parser
@ 2026-05-20  9:55 Gabriel Goller
  2026-05-20 10:22 ` Robert Obkircher
  2026-05-20 11:51 ` applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Gabriel Goller @ 2026-05-20  9:55 UTC (permalink / raw)
  To: pve-devel

The parser for the systemd .link files didn't support comments. This
means executing `pve-network-interface-pinning generate` after pinning
interfaces with the installer was broken because we add a comment there.

Skip lines starting with '#' or ';' while parsing (according to `man
systemd.syntax`).

Reported-by: Robert Obkircher <r.obkircher@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---

Note that this bug is old, it was already there in the previous
release.

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

diff --git a/PVE/CLI/pve_network_interface_pinning.pm b/PVE/CLI/pve_network_interface_pinning.pm
index 8e419603be60..9dff181dcd9d 100644
--- a/PVE/CLI/pve_network_interface_pinning.pm
+++ b/PVE/CLI/pve_network_interface_pinning.pm
@@ -158,7 +158,7 @@ my sub parse_link_file {
     my $data = {};
 
     for my $line (@lines) {
-        next if $line =~ m/^\s*$/;
+        next if $line =~ m/^\s*(?:[#;]|$)/;
 
         if ($line =~ m/^\[(Match|Link)\]$/) {
             $section = $1;
-- 
2.47.3





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

* Re: [PATCH manager] network-interface-pinning: ignore comments in .link parser
  2026-05-20  9:55 [PATCH manager] network-interface-pinning: ignore comments in .link parser Gabriel Goller
@ 2026-05-20 10:22 ` Robert Obkircher
  2026-05-20 11:51 ` applied: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Obkircher @ 2026-05-20 10:22 UTC (permalink / raw)
  To: Gabriel Goller, pve-devel


On 20.05.26 11:56, Gabriel Goller wrote:
> The parser for the systemd .link files didn't support comments. This
> means executing `pve-network-interface-pinning generate` after pinning
> interfaces with the installer was broken because we add a comment there.
>
> Skip lines starting with '#' or ';' while parsing (according to `man
> systemd.syntax`).
>
> Reported-by: Robert Obkircher <r.obkircher@proxmox.com>
> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
> ---
>
> Note that this bug is old, it was already there in the previous
> release.
>
>  PVE/CLI/pve_network_interface_pinning.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/CLI/pve_network_interface_pinning.pm b/PVE/CLI/pve_network_interface_pinning.pm
> index 8e419603be60..9dff181dcd9d 100644
> --- a/PVE/CLI/pve_network_interface_pinning.pm
> +++ b/PVE/CLI/pve_network_interface_pinning.pm
> @@ -158,7 +158,7 @@ my sub parse_link_file {
>      my $data = {};
>  
>      for my $line (@lines) {
> -        next if $line =~ m/^\s*$/;
> +        next if $line =~ m/^\s*(?:[#;]|$)/;
I manually applied this to
/usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm and it fixed
the problem.

Tested-by: Robert Obkircher <r.obkircher@proxmox.com>

>  
>          if ($line =~ m/^\[(Match|Link)\]$/) {
>              $section = $1;




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

* applied: [PATCH manager] network-interface-pinning: ignore comments in .link parser
  2026-05-20  9:55 [PATCH manager] network-interface-pinning: ignore comments in .link parser Gabriel Goller
  2026-05-20 10:22 ` Robert Obkircher
@ 2026-05-20 11:51 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2026-05-20 11:51 UTC (permalink / raw)
  To: pve-devel, Gabriel Goller

On Wed, 20 May 2026 11:55:45 +0200, Gabriel Goller wrote:
> The parser for the systemd .link files didn't support comments. This
> means executing `pve-network-interface-pinning generate` after pinning
> interfaces with the installer was broken because we add a comment there.
> 
> Skip lines starting with '#' or ';' while parsing (according to `man
> systemd.syntax`).
> 
> [...]

Applied, thanks!

[1/1] network-interface-pinning: ignore comments in .link parser
      commit: f8a0e7116113fd8c5a32d32bf5ac73a0e7e87be5




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

end of thread, other threads:[~2026-05-20 11:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20  9:55 [PATCH manager] network-interface-pinning: ignore comments in .link parser Gabriel Goller
2026-05-20 10:22 ` Robert Obkircher
2026-05-20 11:51 ` applied: " 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