From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 1166C1FF15F for ; Mon, 9 Sep 2024 14:23:16 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5312112BA1; Mon, 9 Sep 2024 14:23:53 +0200 (CEST) Message-ID: <2fda111a-2339-47a5-9486-e21d7e5cbd5f@proxmox.com> Date: Mon, 9 Sep 2024 14:23:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Thomas Lamprecht , Proxmox VE development discussion References: <20240829142633.158766-1-d.kral@proxmox.com> <69a860e8-8364-48af-8022-879a5d87a54f@proxmox.com> Content-Language: en-US From: Daniel Kral In-Reply-To: <69a860e8-8364-48af-8022-879a5d87a54f@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.005 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH qemu-server] fix #5284: diallow moving vm disks to storages not meant for images X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" 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