public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Stefan Hanreich <s.hanreich@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-manager v2 1/1] api/ui: show/return alternative interface names
Date: Tue, 15 Jul 2025 12:33:17 +0200	[thread overview]
Message-ID: <e183e83a-9a89-42fc-9a58-988a04043555@proxmox.com> (raw)
In-Reply-To: <bfff3695-9f32-4d17-ae50-0ce818d71195@proxmox.com>

On 7/15/25 11:41, Stefan Hanreich wrote:
> On 7/15/25 11:30, Dominik Csapak wrote:
>> On 7/15/25 11:21, Stefan Hanreich wrote:
>>> Was formulating my response to v1, but you were too fast with sending a
>>> v2 for me. I think we need to also consider the case where we pinned and
>>> replaced the names in /e/n/i via pveeth already, but the changes to the
>>> network interface names haven't yet been applied. The problem here is
>>> that we also return interfaces contained in /proc/net/dev in the
>>> overview as well [1] - which would lead to duplicate interface names in
>>> the view.
>>>
>>> I considered applying the changes to the network interface names
>>> immediately via `udevadm trigger`. Alternatively, I thought of adding
>>> the old names as altnames when pinning network interfaces, but not in a
>>> persistent manner. I think both would solve this state between
>>> transitioning from the old names to the new names. What do you think?
>>
>>
>> ok, so from what i can tell 'pveeth pin' writes directly into the /e/n/i
>> file?
>> shouldn't it write to /e/n/i.new file (or whatever it's named) so we
>> show it as pending change?
> 
> Currently yes, but I am still considering what would be the best way
> forward. I think you could make an argument for both. The problem is
> that while we have this mechanism of a temporary configuration file for
> /etc/network/interfaces and SDN, we do not have one for the firewall
> configuration. There is a dry_run functionality in pveeth, but it just
> generates the files in a different location.
> 
> It might make more sense to implement it as a two-step process:
> 
> * Pinning generates the new configuration files in the pending config of
> /e/n/i and SDN. For the firewall we'd have to create one as well and
> probably just handle this manually in the following step.
> 
> * Add another command that applies the temporary changes which would
> also include applying the changes via udevadm immediately.
> 
> Then users could inspect the generated changes via our UI (at least for
> Network / SDN). This would then also allow us to remove the dry_run
> functionality, since it would be implicitly included in this create /
> apply process. It would also solve the issue with this weird limbo state.
> 
> I'm just unsure on how we could integrate showing the changes to the FW
> configuration in a nice way.

mhmm on the spot i'd probably say we could color code the fw rule changes
(e.g. yellow for pending changed, red for pending removed, etc.)
maybe also a seperate column with that info as text/symbol
> 
>> then we could do the udevadm trigger in the 'apply config' api handler?
>>
>> also, basically the 'altname' lookup code would also have to lookup the
>> .link files ? (seems like it's a lot of work/disk reading to do?)
> 
> Yes, exactly - hence why I considered adding them as an altname since
> this would save us this procedure of parsing *all* link files in order
> to be able to generate a sensible view of /e/n/i.

ah ok, so you'd do 'ip link property add dev ensX altname nic0' ?
that way you could immediately add that too for the new name, no?

when you'd do that, we would not need to parse the link files
in the api code, since ip would already have that info ?


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


  reply	other threads:[~2025-07-15 10:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15  9:07 [pve-devel] [PATCH manager/widget-toolkit v2 0/2] show altenative interface names in the web ui Dominik Csapak
2025-07-15  9:07 ` [pve-devel] [PATCH widget-toolkit v2 1/1] network: optionally show alternative interface names Dominik Csapak
2025-07-15 19:56   ` Thomas Lamprecht
2025-07-16 22:47   ` Thomas Lamprecht
2025-07-15  9:07 ` [pve-devel] [PATCH pve-manager v2 1/1] api/ui: show/return " Dominik Csapak
2025-07-15  9:21   ` Stefan Hanreich
2025-07-15  9:30     ` Dominik Csapak
2025-07-15  9:41       ` Stefan Hanreich
2025-07-15 10:33         ` Dominik Csapak [this message]
2025-07-15 11:06           ` Stefan Hanreich
2025-07-15 12:36             ` Thomas Lamprecht
2025-07-15 13:08               ` Stefan Hanreich
2025-07-15 13:15                 ` Thomas Lamprecht
2025-07-15 13:47                   ` Stefan Hanreich
2025-07-17 16:00   ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e183e83a-9a89-42fc-9a58-988a04043555@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.hanreich@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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