[pve-devel] [PATCH pve-container 1/6] nic hotplug : add|del ips in ipam

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Wed Nov 15 16:19:39 CET 2023


-------- Message initial --------
De: Stefan Hanreich <s.hanreich at proxmox.com>
À: Proxmox VE development discussion <pve-devel at lists.proxmox.com>,
Alexandre Derumier <aderumier at odiso.com>
Objet: Re: [pve-devel] [PATCH pve-container 1/6] nic hotplug : add|del
ips in ipam
Date: 15/11/2023 15:56:18

On 11/15/23 15:21, Alexandre Derumier wrote:
> + if ($have_sdn) {
> +     PVE::Network::SDN::Vnets::add_next_free_cidr($newnet->{bridge},
> $conf->{hostname}, $newnet->{hwaddr}, "vmid: $vmid", undef, 1);
> + }

>>Maybe I missed something, but with Containers we can select either
>>Static or DHCP. How is this handled?

I don't handle it currently. 


>>How should we actually handle this? I would suppose it would make
>>sense
>>that this logic only kicks in when the NIC is actually set to DHCP,
>>otherwise we shouldn't do anything?

I'm not sure, but maybe we you disable static ip field instead and
force dhcp, if a vnet have dhcp enabled.

if not, user could set a static ip which could be use by another vm in
the dhcp range.



>>Also, this is still passing $description rather an a $vmid

oh, sorry, I totally forgot to change it, I'll fix it.





More information about the pve-devel mailing list