public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Dominik Csapak <d.csapak@proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup] tape: fix regression in restoring key from medium
Date: Fri, 2 Feb 2024 17:07:18 +0100	[thread overview]
Message-ID: <e5adf116-ca29-4eea-9fe8-026be0d0cc19@proxmox.com> (raw)
In-Reply-To: <20240131134233.86370-1-d.csapak@proxmox.com>

Am 31/01/2024 um 14:42 schrieb Dominik Csapak:
> when trying to restore a key from a tape, we automatically try to load
> the key into the drive after reading the media-set label.
> 
> Since the key restore is only useful when the key is not already on
> disk, this fails of course.
> 
> To fix it but leave the automatism in place, introduce a function
> 'read_label_without_loading_key' that does the heavy lifting of reading
> the labels but does not load the encryption key. Then in read_label,
> call that function and explictely load the key (when one exists).
> 
> Then, we only have to use this new function in the 'restore-key' api
> call for the restore to work as intended.
> 
> Fixes: 1343dcaf ("tape: move 'set_encryption' calls to the TapeDriver (and implementation)")
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> should be cherry-pickable for stable-2 if necessary
> 
>  src/api2/tape/drive.rs |  2 +-
>  src/tape/drive/mod.rs  | 42 ++++++++++++++++++++++++++++++------------
>  2 files changed, 31 insertions(+), 13 deletions(-)
> 
>

applied, with a reword commit message, thanks!

But I'm wondering, why exactly caused the key load issues if we are
in the mixed mode anyway?

A reference to the forum post, bugzilla with the report of the user
running into this would have been nice too..

But yeah, as this should not hurt and we got other fixes to roll out
I'm keeping continuing to roll this out nonetheless for now.




  reply	other threads:[~2024-02-02 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 13:42 [pbs-devel] " Dominik Csapak
2024-02-02 16:07 ` Thomas Lamprecht [this message]
2024-02-06  8:07   ` [pbs-devel] applied: " Dominik Csapak

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=e5adf116-ca29-4eea-9fe8-026be0d0cc19@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pbs-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal