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 E2DB560D9D for ; Fri, 25 Sep 2020 11:06:11 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D8BDB19D52 for ; Fri, 25 Sep 2020 11:06:11 +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 5164319D48 for ; Fri, 25 Sep 2020 11:06:11 +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 10F1C45576; Fri, 25 Sep 2020 11:06:11 +0200 (CEST) To: Alexandre DERUMIER Cc: Proxmox VE development discussion References: <20200924084054.611548-1-aderumier@odiso.com> <20200924084054.611548-10-aderumier@odiso.com> <0660b2c5-c733-7f3c-42ea-52425323fc1a@proxmox.com> <1270427221.1250623.1601022902478.JavaMail.zimbra@odiso.com> <2072648578.1250758.1601023192168.JavaMail.zimbra@odiso.com> From: Thomas Lamprecht Message-ID: Date: Fri, 25 Sep 2020 11:06:10 +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: <2072648578.1250758.1601023192168.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.067 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 -0.214 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 v8 pve-network 09/25] api2: increase version on apply/reload only 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: Fri, 25 Sep 2020 09:06:12 -0000 On 25.09.20 10:35, Alexandre DERUMIER wrote: >>> but how do you detect pending changes now? >=20 > Well, the feature was mainly to detect pending change after reload.=20 > if a reload don't have applied correctly on a node, or if a node was do= wn.=20 >=20 > I don't known if we want to display to user "pending config" changes, n= ot yet applied ? I'd like to have that. >=20 > Befor this commit, It's displaying warning after any config change,=20 > and it's difficult to known if a problem occur after the reload.=20 On 25.09.20 10:39, Alexandre DERUMIER wrote: > also, >=20 > for example, when you add a new vnet in a zone, >=20 > it was displaying a warning all vnets/zones for pending changes. >=20 > as I don't have enough granularity currently (a global version info in = /etc/network/interfaces.d/sdn, or we should have some kind of versioning = info by vnet in /etc/network/interfaces.d/sdn) >=20 >=20 Having two versions, the enacted and a pending, could be enough * if both are the same all is applied * if pending is newer we can show it, but new changes should not further increase the version, they are seen as part of the current pending stuf= f. * if pending is older, bug but don't care? So on each change we bump $pending to $enacted + 1 (*not* $pending++) aft= er we wrote the changes out. We could make /etc/pve/sdn/.version more structure= d, either json map or something like: enacted=3D3 pending=3D4 (json could be more flexible) An apply sets $enacted to $pending once finished (without errors). This would be simple, not much to track but still give the admin info if = anything is pending. What do you think?