From: aderumier@odiso.com
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] cloud-init: don't regenerate ssh hosts key on config change when vm is running
Date: Thu, 14 Jan 2021 09:45:49 +0100 [thread overview]
Message-ID: <10aad3d47b2290b54d40a70939d28f4099d14116.camel@odiso.com> (raw)
In-Reply-To: <cd71a89b-a1aa-d3c9-de11-d4972c1ff7a6@gilouweb.com>
> Hi,
>
> There is something indeed annoying with that module, as I always end
> up
> adding ssh_deletekeys: false in a provisionned server, but I like
> that
> it does it the first time indeed…
>
> Maybe we could let it be configurable though!
Yes, I don't known too much how to handle it at first boot only.
Maybe when we create a template, we could add an option like:
ssh_deleteys:true."
then remove it from vm config when vm start ? (and add in gui an option
to reset it to true manually ?)
i'm looking to use cloud-init to online change too, currently I'm able
to it with this udev rules
/etc/udev/rules.d/90-cloudinit.rules
ACTION=="change", SUBSYSTEM=="block", KERNEL=="sr[0-9]*",
ENV{ID_FS_LABEL}=="config-2", RUN+="/usr/local/bin/cloudinit-reload.sh"
/usr/local/bin/cloudinit-reload.sh
---------------------------------------------
#!/bin/bash
if test -f /tmp/cloudinitreload.lock; then
rm /run/cloud-init/.instance-id
rm /run/cloud-init/network-config-ready
systemctl restart cloud-init-local.service
systemctl restart cloud-init.service
systemctl reload networking
rm /tmp/cloudinitreload.lock
exit 1
fi
touch /tmp/cloudinitreload.lock
Le mercredi 13 janvier 2021 à 17:40 +0100, Gilles Pietri a écrit :
> Le 13/01/2021 à 10:01, Alexandre Derumier a écrit :
> > Currently, we always regenerate sshkeys on any config change.
> >
> > It should be done only before the first vm start, but currently
> > can't known that.
> >
> > So, this patch only do it when vm is running.
>
> Hi,
>
> There is something indeed annoying with that module, as I always end
> up
> adding ssh_deletekeys: false in a provisionned server, but I like
> that
> it does it the first time indeed…
>
> Maybe we could let it be configurable though!
>
> Gilou
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2021-01-14 8:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 9:01 Alexandre Derumier
2021-01-13 11:26 ` Mira Limbeck
2021-01-14 15:20 ` aderumier
2021-01-15 11:08 ` aderumier
2021-01-13 16:40 ` Gilles Pietri
2021-01-14 8:45 ` aderumier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10aad3d47b2290b54d40a70939d28f4099d14116.camel@odiso.com \
--to=aderumier@odiso.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox