From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 A447261F02 for ; Tue, 8 Sep 2020 09:44:21 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 985D512272 for ; Tue, 8 Sep 2020 09:44:21 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 id F22E51225F for ; Tue, 8 Sep 2020 09:44:20 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C8EF344A78; Tue, 8 Sep 2020 09:44:20 +0200 (CEST) To: Proxmox VE development discussion , Alexandre DERUMIER References: <20200824164923.12652-1-aderumier@odiso.com> <1480692740.435706.1599537124012.JavaMail.zimbra@odiso.com> From: Thomas Lamprecht Message-ID: <65ed6f59-a12b-c331-4b65-a9e95afda377@proxmox.com> Date: Tue, 8 Sep 2020 09:44:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Thunderbird/81.0 MIME-Version: 1.0 In-Reply-To: <1480692740.435706.1599537124012.JavaMail.zimbra@odiso.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.734 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -1.825 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH v2 pve-container] POC : add/del/update ip from vnet-subnet-ipam X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2020 07:44:21 -0000 On 08.09.20 05:52, Alexandre DERUMIER wrote: >>> When trying this I got the gateway IP returned for both, as CT IP and= gateway IP.=20 >>> Did not checked this patch closer, but I figured that this behavior i= s caused by=20 >>> the SDN code.=20 >=20 > mmm, that's strange.=20 >=20 > When you create or update the subnet, the gateway ip you define on the = subnet should be registered in the ipam. > (you have enable an ipam right ?) Yes, the built-in "PVE" one >=20 >=20 > Then, when you create CT, without any ip, it'll try to find first avail= able ip in ipam. I did it on an existing CT, changing from a normal bridge to that vnet. > (So if the gateway was not registered in ipam (bug maybe), that could e= xplain why you have it both). >=20 > for internal ipam, i'm writing ipam database in /etc/pve/priv/ipam.db. = (BTW,I'm not sure that it's the best path location) I'd like to have stuff in priv/ folder prefixed with a directory namespace, maybe "sdn" here. Besides that, how big can this get on huge setups? We only can have 512k = files for now. >=20 >>> On another node, do you think it makes sense to have vnets, subnets, = IPam, DNS completely=20 >>> split and separated from each other? I mean, it is flexible, but a us= er needs to do a lot=20 >>> of, almost boilerplate-like, work to get this started.=20 >>> Advanced users may profit from this, maybe we just need a "simple wiz= ard" for the easiest=20 >>> beginner case..=20 >=20 > Well for subnet, you can assign multiple subnets by vnet, so yes, it's = really need to by separated. > (Somebody at hertzner for example, buying subnets or /32 failovers ips,= and want to add them to a vnet) > IPAM/DNS, are more reusable configurations. (like api url,key,....). So= I think you'll define 1 or 2 of them max. >=20 > I think subnet+ipam+dns are ip features. > zones,vnets,controller are physical network features Could it make sense to have subnets and vnets at least in the same sectio= n config, with different types? (a bit like storage.cfg) So that we reduce the conf= iguration file amount a bit. Maybe we could also visualize this in the gui a bit "easier". We could merge VNet and SubNet management into one panel, maybe with spli= t view like FW ipsets, you won't have the same subnet in different VNets after a= ll, or? We could also merge DNS and IP management into one panel, maybe with spli= t view like HA or vertical like FW ipsets. But this is not too relevant for now, can always be fine tuned once the A= PI/backend stuff is in. On another note, are there some unit/regressions tests for this stuff? Would give a bit more confidence with this. skimming through the code currently, seems mostly OK for now, need to thi= nk a bit about how the general concepts are implemented and if that fits all OK.