From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <s.lendl@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 6E1FE9C7E3
 for <pve-devel@lists.proxmox.com>; Wed, 22 Nov 2023 14:46:02 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 4891618FC2
 for <pve-devel@lists.proxmox.com>; Wed, 22 Nov 2023 14:45:32 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Wed, 22 Nov 2023 14:45:31 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 6D321429C7;
 Wed, 22 Nov 2023 14:45:31 +0100 (CET)
From: Stefan Lendl <s.lendl@proxmox.com>
To: Stefan Hanreich <s.hanreich@proxmox.com>, pve-devel@lists.proxmox.com
In-Reply-To: <20231122122951.215905-1-s.hanreich@proxmox.com>
References: <20231122122951.215905-1-s.hanreich@proxmox.com>
Date: Wed, 22 Nov 2023 14:45:30 +0100
Message-ID: <87ttpdzyth.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.048 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [subnets.pm]
Subject: Re: [pve-devel] [PATCH pve-network] ipam: improve update / delete
 behavior
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Wed, 22 Nov 2023 13:46:02 -0000


I tested this with multiple Subnets:

It works if MAC is 1x in IPv4 subnet and 1x in IPv6 subnet.
- updating either IPv4 or IPv6
  - other one persists
- update IPv4 to be in another subnet
  - auto-selects the new subnet

Encountered issues:
- change IPv4 to IPv6 (and vice versa)
> can't find any subnet for ip at /usr/share/perl5/PVE/Network/SDN/Subnets.pm line 114. (500)

- When manually creating a mapping, there is no way to set a VMID (but works)

- consecutive updating the mapping does not work
> vmid: type check ('integer') failed - got ''

- Updates to the IPAM mapping do not propagate to dnsmasq's ethers file
  - also not after Reload
  - In comparison `qm set 109 --net1 model=virtio,bridge=dhcpnat3` will
    update ethers immediately