public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Dominik Rusovac" <d.rusovac@proxmox.com>
To: "Michael Köppl" <m.koeppl@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH cluster 1/2] datacenter config: next-id: reject an empty range
Date: Tue, 24 Nov 2026 07:44:07 +0100	[thread overview]
Message-ID: <DN38KH8KWZJP.1H360PI55H5A2@proxmox.com> (raw)
In-Reply-To: <20261123152100.2920205-2-m.koeppl@proxmox.com>

lgtm, consider as:

Reviewed-by: Dominik Rusovac <d.rusovac@proxmox.com>

On Mon Nov 23, 2026 at 4:20 PM CET, Michael Köppl wrote:
> The upper boundary of the next-id range is exclusive, but writing the
> config only rejected a lower boundary above the upper one. Setting both
> to the same value was accepted and left no guest ID in the range.
> Requesting the next free guest ID would then always fail. With enforce
> set, every guest ID was rejected.
>
> Adapt the condition to check that the value of the upper bound is
> strictly greater than the value of the lower bound.
>
> Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
> ---
>  src/PVE/DataCenterConfig.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
> index 9829241..5ea0587 100644
> --- a/src/PVE/DataCenterConfig.pm
> +++ b/src/PVE/DataCenterConfig.pm
> @@ -767,7 +767,7 @@ sub write_datacenter_config {
>          my $lower = int($next_id->{lower} // $next_id_format->{lower}->{default});
>          my $upper = int($next_id->{upper} // $next_id_format->{upper}->{default});
>  
> -        die "lower ($lower) <= upper ($upper) boundary rule broken\n" if $lower > $upper;
> +        die "lower ($lower) < upper ($upper) boundary rule broken\n" if $lower >= $upper;
>  
>          $cfg->{'next-id'} = PVE::JSONSchema::print_property_string($next_id, $next_id_format);
>      }





  reply	other threads:[~2026-11-24  6:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 15:20 [PATCH cluster/manager 0/2] datacenter config: next-id: reject an empty range Michael Köppl
2026-11-23 15:20 ` [PATCH cluster 1/2] " Michael Köppl
2026-11-24  6:44   ` Dominik Rusovac [this message]
2026-11-23 15:21 ` [PATCH manager 2/2] ui: dc options: next-id: require upper to be above lower Michael Köppl
2026-11-24  7:15   ` Dominik Rusovac
2026-11-24  7:41 ` [PATCH cluster/manager 0/2] datacenter config: next-id: reject an empty range Dominik Rusovac
2026-11-24  9:47 ` 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=DN38KH8KWZJP.1H360PI55H5A2@proxmox.com \
    --to=d.rusovac@proxmox.com \
    --cc=m.koeppl@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