public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Fabian Ebner <f.ebner@proxmox.com>
Subject: [pve-devel] applied: [PATCH storage 1/2] vdisk list: only collect images from storages with an appropriate content type
Date: Mon, 15 Mar 2021 13:57:25 +0100	[thread overview]
Message-ID: <2068feb4-9612-7e35-3ad4-28012a48be64@proxmox.com> (raw)
In-Reply-To: <20210312095027.19451-1-f.ebner@proxmox.com>

On 12.03.21 10:50, Fabian Ebner wrote:
> Only these storages are activated in the first place, and it's bad behavior to
> list images when no appropriate content type is not set.
> 
> For example, on VM destruction, this avoids unreferenced images to be deleted
> from a storage with only 'backup' content type set, which is supposedly what
> happened in this[0] forum thread.
> 
> (Some) callers expect all keys to be present and valid array references in the
> result, so initialization is needed.
> 
> Now, the enabled check is already done by the preceding code for every element
> that is iterated over, and thus isn't needed in the main loop anymore.
> 
> [0]: https://forum.proxmox.com/threads/erasing-all-vm-disks-after-a-failed-vm-migration-task.85068
> 
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
> 
> Why isn't 'iterand' a word?
> 

Seems like it has at least some use in the wild, and may be clear enough to
no cause confusion when used.
https://softwareengineering.stackexchange.com/a/310191

>  PVE/Storage.pm | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
>

applied, thanks!




      parent reply	other threads:[~2021-03-15 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  9:50 [pve-devel] " Fabian Ebner
2021-03-12  9:50 ` [pve-devel] [PATCH storage 2/2] tests: zfs: complain when a first sub-test dies Fabian Ebner
2021-03-15 12:57   ` [pve-devel] applied: " Thomas Lamprecht
2021-03-15 12:34 ` [pve-devel] [PATCH storage 1/2] vdisk list: only collect images from storages with an appropriate content type Thomas Lamprecht
2021-03-15 12:57 ` Thomas Lamprecht [this message]

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=2068feb4-9612-7e35-3ad4-28012a48be64@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=f.ebner@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal