From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server 1/3] stop cleanup: remove unnecessary tpmstate cleanup
Date: Fri, 22 Mar 2024 15:54:03 +0100 [thread overview]
Message-ID: <e4aa2aab-a3ff-45bf-ab5a-c5752bf1019c@proxmox.com> (raw)
In-Reply-To: <20240320125158.2094900-2-d.csapak@proxmox.com>
Am 20.03.24 um 13:51 schrieb Dominik Csapak:
> tpmstate0 is already included in `get_vm_volumes`, and our only storage
> plugin that has unmap_volume implemented is the RBDPlugin, where we call
> unmap in `deactivate_volume`. So it's already ummapped by the
> `deactivate_volumes` calls above.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
There are third-party storage plugins too. But it's natural to expect
that deactivate_volume() would also remove a mapping for the volume.
OTOH, there is an explicit map_volume() call in start_swtpm() (can't use
librbd), so it's natural to expect an explicit unmap_volume() call.
However, the order of calls right now is
1. activate_volume()
2. map_volume()
3. deactivate_volume()
4. unmap_volume()
I'd rather expect 3 and 4 to be swapped if doing it "properly".
All that said, I think we can try dropping this and risk the, arguably
unlikely, scenario that a third-party plugin breaks. If it really
happens, then we can adapt according to the actual needs.
Acked-by: Fiona Ebner <f.ebner@proxmox.com>
> PVE/QemuServer.pm | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index ef3aee20..d53e9693 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -6167,14 +6167,6 @@ sub vm_stop_cleanup {
> if (!$keepActive) {
> my $vollist = get_vm_volumes($conf);
> PVE::Storage::deactivate_volumes($storecfg, $vollist);
> -
> - if (my $tpmdrive = $conf->{tpmstate0}) {
> - my $tpm = parse_drive("tpmstate0", $tpmdrive);
> - my ($storeid, $volname) = PVE::Storage::parse_volume_id($tpm->{file}, 1);
> - if ($storeid) {
> - PVE::Storage::unmap_volume($storecfg, $tpm->{file});
> - }
> - }
> }
>
> foreach my $ext (qw(mon qmp pid vnc qga)) {
next prev parent reply other threads:[~2024-03-22 14:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 12:51 [pve-devel] [PATCH qemu-server/manager] pci live migration followups Dominik Csapak
2024-03-20 12:51 ` [pve-devel] [PATCH qemu-server 1/3] stop cleanup: remove unnecessary tpmstate cleanup Dominik Csapak
2024-03-22 14:54 ` Fiona Ebner [this message]
2024-03-20 12:51 ` [pve-devel] [PATCH qemu-server 2/3] migrate: call vm_stop_cleanup after stopping in phase3_cleanup Dominik Csapak
2024-03-22 15:17 ` Fiona Ebner
2024-03-20 12:51 ` [pve-devel] [PATCH qemu-server 3/3] api: include not mapped resources for running vms in migrate preconditions Dominik Csapak
2024-03-22 14:53 ` Stefan Sterz
2024-03-22 16:19 ` Fiona Ebner
2024-04-02 9:39 ` Dominik Csapak
2024-04-10 10:52 ` Fiona Ebner
2024-03-20 12:51 ` [pve-devel] [PATCH manager 1/3] bulk migrate: improve precondition checks Dominik Csapak
2024-03-20 12:51 ` [pve-devel] [PATCH manager 2/3] bulk migrate: include checks for live-migratable local resources Dominik Csapak
2024-03-20 12:51 ` [pve-devel] [PATCH manager 3/3] ui: adapt migration window to precondition api change 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=e4aa2aab-a3ff-45bf-ab5a-c5752bf1019c@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=d.csapak@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