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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id A2ECC6AC62 for ; Sat, 6 Mar 2021 08:31:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 828FC2C78D for ; Sat, 6 Mar 2021 08:31:14 +0100 (CET) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 54FB42C775 for ; Sat, 6 Mar 2021 08:31:12 +0100 (CET) Received: by mail-wm1-x32a.google.com with SMTP id w7so3026490wmb.5 for ; Fri, 05 Mar 2021 23:31:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=odiso-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version; bh=xsJlIXtTzvVFXhOljFJdyxsYD4tJIFRH7rFBXiaxbcI=; b=LbFbZ/ZDa6bKp3zHOecIlwHxOPlmuuW/T4jZAxeVVplLzJqQMxCcjWnjbOdMpTTwbV 0dUfDPtoALSmhqg6hGMWCJzUFR4VyqsFsMxOG1MyKQ4EF4lAQ9tVQAJ2/W4uOF/XSk5c q7b4JxZ6+OtW2xVmmf8Am6RqDL5kpvinTolQO5byhRRiXdJH4k4EamFENF0LwoQOKaI9 zdN1WaLpjiITgGaCs6u7PsJOot1i9ky5uV1bXUYloxjoVdmnk0SqE/JpAGNkRxY+bi1o TeGHFz219WIJVfB/3JkJzfuKSCAycEHgDuA623RX4gLSR9s2Y8Zw4e57un50PZU8oaBJ q/+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version; bh=xsJlIXtTzvVFXhOljFJdyxsYD4tJIFRH7rFBXiaxbcI=; b=LbFVqgKd9VgVyUa7uhRviNIOR9ExeewGFymLkVnBQ6TxW7mGucGVJU+unxc/bLsmhy xEbEer22qrIcjffTEzw5ediWZUYw+WRilSQy44E4fuF9GO7+jKEoA4FgpQ3ILnawwL1r jsc/I79ZCFfsJLz46ddZ63XSWql6IX8A29GXydHoPHwi2g0l6Hk2ukINM/iuzUG2WDrU 1K99+rLV5YiOX3fH0i5+p5986W/bbh5HhIgjPzUcdKa0+XJllA3KN3bAmdjzPCgeh8Uq wwl2DX8zgSy51MHgV5vZxwm2aynR0QSLk1XrJuMs83tOLpXzLBCvgI7IyXkHOmaBlxQU w7Bg== X-Gm-Message-State: AOAM530FvioO5YwCtXWoCAQAoAtDOeItcLrQVc99WWwHz1lIy+ujozlE c1bk0XS081HhePtpQ5CYb7f1Og== X-Google-Smtp-Source: ABdhPJxwon8BaTBrp0hkzTG478poucOyKeyXATlGcqg+pKLE+wnjMAaN54LLhDpOfwZbBvKE//scgg== X-Received: by 2002:a05:600c:19d1:: with SMTP id u17mr1962676wmq.141.1615015865858; Fri, 05 Mar 2021 23:31:05 -0800 (PST) Received: from [192.168.178.50] ([79.132.253.97]) by smtp.gmail.com with ESMTPSA id s8sm7954337wrn.97.2021.03.05.23.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 23:31:05 -0800 (PST) Message-ID: From: aderumier@odiso.com To: Thomas Lamprecht , Wolfgang Bumiller , Proxmox VE development discussion Date: Sat, 06 Mar 2021 08:31:04 +0100 In-Reply-To: <75c9dea4-4e42-3882-2e83-348ea1c15fe4@proxmox.com> References: <177950241.3608.1614071210039@webmail.proxmox.com> <75c9dea4-4e42-3882-2e83-348ea1c15fe4@proxmox.com> User-Agent: Evolution 3.38.4 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.186 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 HTML_MESSAGE 0.001 HTML included in message 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [pve-devel] cloudinit: question about cloudinit pending values && hostname/mac address changes 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: Sat, 06 Mar 2021 07:31:44 -0000 Hi, I just send a small patch, adding a new hotplug option: cloudinit, to autoregenerate config drive when cloudinit option are updated. What do you think about it ?  (Like this user can choose the behaviour) Le mardi 23 février 2021 à 10:29 +0100, Thomas Lamprecht a écrit : > On 23.02.21 10:06, Wolfgang Bumiller wrote: > > > > > On 02/23/2021 9:27 AM Thomas Lamprecht > > > wrote: > > > > > >   > > > On 21.02.21 18:47, aderumier@odiso.com wrote: > > > > I have some question about cloudinit hotplug pending values. > > > > > > > > Currently, when vm is running, we keep cloudinit specific > > > > values > > > > (ipconfigX, dns, ssh,...)  in pending until we regenerate image > > > > manually. > > > > > > > > But some other change, like vm name (use for hostname), or nic > > > > mac > > > > address . (use to match interface in config nodrive format), > > > > are not > > > > keeped as pending. > > > > > > > > Why don't we simply auto regenerate the cloudinit config drive > > > > after > > > > changes? (and don't use pending values like "pending  cdrom > > > > generation"). > > > > > > IMO OK, wasn't the other stuff done because of some changes > > > cannot be > > > applied live? > > > > Or maybe just an oversight since the VM name used to have no > > influence > > at all before cloud init. > > I'm not sure if automatically regenerating the image is such a good > > idea > > if you consider how programs in the guest might react if they're > > currently reading from a vanishing drive... (Simply because, you > > know, > > these things tend to not be too failure-resistent ;-) ) > > normally the CI service reads this only once at startup and then > should > wait on events? > > Anything basing on a CD ROM device should be able to handle ejects or > inject at any time... > > @Alexandre, did you test how good the Cloudinit clients handle this? > > > This would be different if we used a network-based cloud-init > > solution, > > but that would just "shift" the required effort from the whole > > state > > keeping thomas mentioned below to actually getting this onto a > > network > > interface *per vm* and in a sane way. > > > > But yes, I can honestly also say that if you're changing cloud-init > > data > > while the VM is currently reading it and it just crashes and you > > have to > > hit the reboot button... that's perfectly fine with me actually. > > > > CI crashing means probably that that change is not applied, not that > the > VM is rendered unusable. So you can only win, as at max for applying > changes > you have to do the same as you had to do always without such a change > anyway: reboot >