From: Elias Huhsovitz <e.huhsovitz@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Elias Huhsovitz <e.huhsovitz@proxmox.com>
Subject: [PATCH container v3 0/2] fix #7164: restore: apply password and ssh keys
Date: Fri, 31 Jul 2026 13:59:41 +0200 [thread overview]
Message-ID: <20260731115943.94756-1-e.huhsovitz@proxmox.com> (raw)
This patch series fixes Bug #7164. When restoring a container via
`pct restore`, the options `--password` and `--ssh-public-keys` are
silently ignored.
Patch 1/2 fixes the bug by introducing a new `post_restore_hook` to
the LXC setup plugin architecture. This hook applies the provided
credentials if they are provided.
Patch 2/2 adds a `check_systemd_nesting` call to the new
restore hook for consistency with container creation and cloning.
Note: This might cause a `die` in some edge cases and is not
essential to fixing bug #7164. Therefore consider patch 2/2
optional.
Changes v2 -> v3:
-----------------
* Split `check_systemd_nesting()` addition into optional second patch.
* Replace `defined` check for ssh keys with truthy check
to match creation logic.
* Shorten commit message.
* Fix formatting in commit message.
Changes v1 -> v2:
-----------------
* Move logic into new function `post_restore_hook`.
* Do not call `post_create_hook` unconditionally.
* Conditionally call functions to:
- set password
- set ssh keys
* Call `check_systemd_nesting()` for pct restore.
Previous Versions
-----------------
v2: https://lore.proxmox.com/pve-devel/20260729082545.17885-1-e.huhsovitz@proxmox.com/
v1: https://lore.proxmox.com/pve-devel/20260716153959.183045-1-e.huhsovitz@proxmox.com/
Summary of Changes
------------------
Elias Huhsovitz (2):
fix #7164: restore: apply password and ssh keys
restore: check systemd nesting
src/PVE/API2/LXC.pm | 2 +-
src/PVE/LXC/Setup.pm | 9 +++++++++
src/PVE/LXC/Setup/Base.pm | 9 +++++++++
src/PVE/LXC/Setup/Plugin.pm | 5 +++++
src/PVE/LXC/Setup/Unmanaged.pm | 4 ++++
5 files changed, 28 insertions(+), 1 deletion(-)
--
2.47.3
next reply other threads:[~2026-07-31 12:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 11:59 Elias Huhsovitz [this message]
2026-07-31 11:59 ` [PATCH container v3 1/2] fix #7164: restore: apply password and ssh keys Elias Huhsovitz
2026-07-31 11:59 ` [PATCH container v3 2/2] restore: check systemd nesting Elias Huhsovitz
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=20260731115943.94756-1-e.huhsovitz@proxmox.com \
--to=e.huhsovitz@proxmox.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