From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id C48F41FF161 for ; Wed, 4 Dec 2024 11:46:17 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 280125727; Wed, 4 Dec 2024 11:46:15 +0100 (CET) Date: Wed, 4 Dec 2024 11:45:41 +0100 From: Gabriel Goller To: Dominik Csapak Message-ID: References: <20241202104626.166056-1-g.goller@proxmox.com> <20241202104626.166056-2-g.goller@proxmox.com> <5kqws66tg5bi2efn4mtbya25avhs6gkvypd3xukdorme57hiav@cub27f5gv4os> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20241002-35-39f9a6 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.036 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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 manager 1/2] lxc: show dynamically assigned IPs in network tab 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: , Reply-To: Proxmox VE development discussion Cc: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 04.12.2024 11:10, Dominik Csapak wrote: >On 12/4/24 10:52, Gabriel Goller wrote: >>On 04.12.2024 10:17, Dominik Csapak wrote: >>>generally looks good but i have one high level comment/question >>>(and some nits inline) >>> >>>one thing i'd like to see here is to retain the info what is configured, >>>so previously the info was either 'dhcp'/'auto' (slaac) or an ip address >>> >>>now we only show the ip adress >>> >>>what i mean is something like >>> >>>'x.y.z.w (dhcp)' >>> >>>or >>> >>>'xx00::1 (static)' >>> >>>etc. so one can still see what mode is configured >> >>This is a nice idea, but it could be a bit tricky. To get the ip info we >>execute `ip a` in the container's netns, but for some reason I can't see >>the 'dynamic' option which is usually shown on a dynamically acquired >>address. >>I could use `ip route` and check if the route was inserted by 'dhcp' or >>'kernel', but no idea how foolproof this is... >> > >but you should have the info what is configured from the confResponse, no? > >so something like > > >if (net.ip === 'dhcp' || ...) { >net.ip = `${iface.inet} (${net.ip})`; >... >} > >? Oh, yeah didn't notice this, this is nice. Though I still have to change the api endpoint to return multiple ip-addresses so that we also support a static ip with a dhcp-enabled bridge (this will set two addresses on the interface). Then I can match the static ip from the config with the set ip and find out which one is static and which one is dynamic. Thanks! _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel