public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Kral <d.kral@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] fix #5284: diallow moving vm disks to storages not meant for images
Date: Mon, 9 Sep 2024 14:23:18 +0200	[thread overview]
Message-ID: <2fda111a-2339-47a5-9486-e21d7e5cbd5f@proxmox.com> (raw)
In-Reply-To: <69a860e8-8364-48af-8022-879a5d87a54f@proxmox.com>

On 9/6/24 18:44, Thomas Lamprecht wrote:
> Hmm, code wise it looks OK, but not so sure if this is the best place
> to check, I'd rather look into either moving this into the $load_and_check_move
> closure or into the PVE::QemuServer::clone_disk method, avoiding such an issue
> for all other call sites too, albeit one would need to evaluate those call sites
> if it does not break an existing usecase when disallowing this everywhere.

I will take a closer look into this issue, because - as you already 
pointed out - there are some other commands that allocate disk images, 
but do not check for the storage's content type(s).

In particular it was for moving disks and cloning disks / VMs, but I 
will also check the behavior at other disk allocations with respect to 
the context of the call sites.

> btw. did you check if containers are also affected by this bug?

I forgot to mention it, but I did. I discovered that `pve-container` has 
a check in a "proxy" subroutine (`PVE::LXC::alloc_disk`) that will in 
turn call `PVE::Storage::vdisk_alloc` if it's okay to do so.

I had a talk with Fiona about this and we agreed that it would make 
sense to have a similar subroutine here as well. I will follow up with 
another patch (series) for this in the following days.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2024-09-09 12:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 14:26 Daniel Kral
2024-09-02  9:15 ` Filip Schauer
2024-09-06 16:44 ` Thomas Lamprecht
2024-09-09 12:23   ` Daniel Kral [this message]
2024-09-17  8:30 ` Daniel Kral

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=2fda111a-2339-47a5-9486-e21d7e5cbd5f@proxmox.com \
    --to=d.kral@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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