public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Hannes Laimer <h.laimer@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-common] inotify: interfaces: also set type 'bridge' for empty bridges
Date: Fri, 08 Aug 2025 11:21:31 +0200	[thread overview]
Message-ID: <1754644807.wp2ggdbc7i.astroid@yuna.none> (raw)
In-Reply-To: <8c798e16-4448-4c34-a31a-b1b98681f17d@proxmox.com>

On August 8, 2025 10:58 am, Hannes Laimer wrote:
> On 08.08.25 10:40, Fabian Grünbichler wrote:
>> On August 7, 2025 4:21 pm, Hannes Laimer wrote:
>>> If a bridge has `bridge_ports` set to `none` we just skip the field.
>>> Later we use the existance of the field to determine whether the type
>>> should be `bridge`. This led to bridges without `bridge_ports` not
>>> being recognized as bridges.
>>>
>>> In the `/nodes/{}/network` we do permissions checks but only for ifaces
>>> with type `bridge`(or `OVSBridge`). So interfaces were returned by the
>>> endpoint even if the user did not have permissions the correct
>>> permissions because the interface did not have type `bridge`.
>>>
>>> This fixes this by also setting the type to `bridge` for empty bridges.
>>>
>>> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
>>> ---
>> 

[..]

>> do we also need special handling of "empty" bonds (which make less sense
>> in practice, but might still exist?) - in particular if we ever plan on
>> dropping the naming restrictions there?
>> 
> 
> we allow something like this
> ```
> auto bond0
> iface bond0 inet manual
> 	bond-slaves none
> 	bond-miimon 100
> 	bond-mode balance-rr
> ```
> to be set (even through the UI), but it does trip up `ifreload`. I think
> we should at least not allow setting `bond_slaves none` through the UI.

not sure if somebody might use this as an intermediate state (without
applying)?

as in, remove bond port A (bond has no ports), add port A to other bond,
remove port B from other bond, add port B to this bond, apply?

IIRC we don't allow ports to be shared in multiple devices..


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

  reply	other threads:[~2025-08-08  9:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-07 14:21 Hannes Laimer
2025-08-08  8:40 ` Fabian Grünbichler
2025-08-08  8:58   ` Hannes Laimer
2025-08-08  9:21     ` Fabian Grünbichler [this message]
2025-08-08  9:33 ` [pve-devel] superseded: " Hannes Laimer

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=1754644807.wp2ggdbc7i.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=h.laimer@proxmox.com \
    --cc=pve-devel@lists.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