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 52DDC70870 for ; Sun, 4 Apr 2021 14:12:33 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 444401CF1C for ; Sun, 4 Apr 2021 14:12:33 +0200 (CEST) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id A70121CF0F for ; Sun, 4 Apr 2021 14:12:32 +0200 (CEST) Received: by mail-wm1-x32d.google.com with SMTP id p19so4525399wmq.1 for ; Sun, 04 Apr 2021 05:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=odiso-com.20150623.gappssmtp.com; s=20150623; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=Jpw0s9rCZXAqbASq/iycA9jeWtuNCoqsPwU3oxzSDL0=; b=xezEMUXL/uDbprTIAJE24VD1N0Vt5/DA9EVIbN9OZMFy2XRLhACtYGJTKDDLcgueL8 FLEkHsDoXhi3VMWo6Xb+VUKFO5zQRhv9MjwQWFqY9U5ZkJXzD1GFrsmT371vcIywMeqI XOa9GboWKsFC/49Jkq+zxhVLE6Wc7AUSKfxz96SLjO7HVDOxkeZVKdRK9c/NNRLa+0ma qHaXcdhaSByDQR6GSHJlaBw2jw7bHr2l3BTy1NPfE76lsSIBFJNhYOh4hAHFcekHJWe/ egSIrZw6HwbDY5fCQrCev81L9uTXGi4FPC5RzJxp8qiynnvg/Ia06OHelcVfECnzuuDw LJMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Jpw0s9rCZXAqbASq/iycA9jeWtuNCoqsPwU3oxzSDL0=; b=OSCr8Y0SK9IIsnxce30wLn1FovzBdxNX19iTsILwsaJfEjHTpM7pvIQd2aFGXLKQUK cFbKHBeEScgPagssSZwfrr4fLp8QfkhASrNNSahJM53qWVJoF2l5308u4cfR1HSjFdTA S8ms1KiUA2bof0cHVSmOCF5T9Ovm5vUjh6MIE2S9+9Kjf6Nvx2pEww0Bc9i5w9aT3oi0 m6BVfLZwQmKlPL88YDLLJbeS2tGixbHu0yiTpcZw0z6RdsWT6XCOgAtbKD9FhhdQAiVo W+u/AfOatI03lOf/tN7O0Dd1Y40VR4GF6eYgxqSNwaUnHKi76oGbQINDmk8Ns+hxd4S5 Zz6g== X-Gm-Message-State: AOAM530YdJm8jZc3IsIwFzWw4Ujj5QKQJCSoHffCHywIDll1Ox17fjv3 R8v01msStskM78Xhhdt/2Akoqg6LrulsgeM4 X-Google-Smtp-Source: ABdhPJyVXlZFNRLYWlnzRtlUYU/jVd7AICTZI/OJMZ/YzVQDKSRZiYT9/Pt5oJJWE/ZyrZCiUNBQzw== X-Received: by 2002:a7b:c219:: with SMTP id x25mr10545552wmi.163.1617538345899; Sun, 04 Apr 2021 05:12:25 -0700 (PDT) Received: from [192.168.178.50] ([79.132.236.200]) by smtp.gmail.com with ESMTPSA id q4sm19064378wma.20.2021.04.04.05.12.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 04 Apr 2021 05:12:25 -0700 (PDT) From: alexandre derumier To: Thomas Lamprecht , Proxmox VE development discussion References: <20210328151203.2063706-1-aderumier@odiso.com> <20210328151203.2063706-2-aderumier@odiso.com> <93b9f005-6922-5903-31a9-a72ea6fc7d49@proxmox.com> <716d60aa36860a8ed739cd45af8c5bfd99bf973e.camel@odiso.com> Message-ID: <85609aca-dbda-0545-2c1e-16128cc38072@odiso.com> Date: Sun, 4 Apr 2021 14:12:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-SPAM-LEVEL: Spam detection results: 0 AWL 0.144 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature NICE_REPLY_A -0.001 Looks like a legit reply (A) RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no 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 qemu-server 1/6] cloudinit: add cloudinit section for current generated config. 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: Sun, 04 Apr 2021 12:12:33 -0000 Hi, if you really want to keep the current pending behaviour, I think the only way is add new pending values, like "hostname" example , and for ipconfig, add the mac attribute. so, this should give something like: name change:  name(pending -->fastplug)--->hostname(pending)---regenerate-->hostname nic hotplug :  net0 (pending)---->net0 (main config ok)--->ipconfi0g:...,newmac.(pending)---generate--->ipconfig0 Note that we shouldn't allow revert of ipconfig0. (It's not exposed to gui, but we can do revert from command line) On 02/04/2021 11:22, aderumier@odiso.com wrote: > Maybe, another way, > instead writing [cloudnit:special] section, > > we could write this config section inside the drive image directly when > we generate it (to avoid to reparse format generate config) > > so we could read the drive to display the diff in the gui > (we already have an cloudinit dump api, don't seem to be slow) > > what do you think about this ? > > > Le jeudi 01 avril 2021 à 12:22 +0200, aderumier@odiso.com a écrit : >> Le jeudi 01 avril 2021 à 10:54 +0200, Thomas Lamprecht a écrit : >>> actually, why isn't the pending section enough for this? >>> >>> If stuff can be hot plugged then we can do so and if only that >>> changed we >>> can just remove it from pending, as normally? >> Well, for example, if you change the vm name , how to you manage that >> ? >> do you want to keep it as pending  until we regenerate cloudinit >> drive? >> >> or more complex, if you change the mac address of the vm. (so >> unplug/replug the nic) >> for the nic, you don't want to keep it as pending, as technically, is >> really plugged. >> >> or if you change the storage of the cloudinit drive, currently they a >> no way to known if we need to regenerate it. >> >> The main problem is that pending section, is more for pending qemu >> change, >> not pending cloudinit config drive regeneration. >> >> For me, both are differents. >> >> >> Currently,it's working well when vm is offline, because we don't have >> any pending, and we regenerate the disk at vm startup. >> >> >> (I'm really looking to use cloudinit for online config changes, like >> for containers) >> >> >> >> >> >> >> >> >> >