public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH container v3 0/2] fix #7164: restore: apply password and ssh keys
@ 2026-07-31 11:59 Elias Huhsovitz
  2026-07-31 11:59 ` [PATCH container v3 1/2] " Elias Huhsovitz
  2026-07-31 11:59 ` [PATCH container v3 2/2] restore: check systemd nesting Elias Huhsovitz
  0 siblings, 2 replies; 3+ messages in thread
From: Elias Huhsovitz @ 2026-07-31 11:59 UTC (permalink / raw)
  To: pve-devel; +Cc: Elias Huhsovitz

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-31 12:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 11:59 [PATCH container v3 0/2] fix #7164: restore: apply password and ssh keys Elias Huhsovitz
2026-07-31 11:59 ` [PATCH container v3 1/2] " Elias Huhsovitz
2026-07-31 11:59 ` [PATCH container v3 2/2] restore: check systemd nesting Elias Huhsovitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal