public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Stefan Hrdlicka <s.hrdlicka@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH V3 qemu-server 4/6] add ignore-storage-errors for removing VM with missing storage
Date: Wed, 16 Nov 2022 11:08:47 +0100	[thread overview]
Message-ID: <0b497cdf-5fc1-419e-38d1-abc0c3aa4aa6@proxmox.com> (raw)
In-Reply-To: <61cfcb3d-ceef-0325-4152-6e0a26d99be2@proxmox.com>

Am 15.11.22 um 15:22 schrieb Stefan Hrdlicka:
> On 11/15/22 13:17, Fiona Ebner wrote:
>> Am 15.11.22 um 11:55 schrieb Stefan Hrdlicka:
>>>   @@ -2370,7 +2375,8 @@ sub destroy_vm {
>>>       include_unused => 1,
>>>       extra_keys => ['vmstate'],
>>>       };
>>> -    PVE::QemuConfig->foreach_volume_full($conf, $include_opts,
>>> $remove_owned_drive);
>>> +    eval { PVE::QemuConfig->foreach_volume_full($conf,
>>> $include_opts, $remove_owned_drive); };
>>> +    die "Couldn't remove one or more disks: $@\n" if $@ &&
>>> !$ignore_storage_errors;
>>
>> So, $removed_owned_drive already ignores all storage errors beside if
>> PVE::Storage::path() fails right? Can't we just add an eval around that
>> and be done? No need for a new ignore-storage-errors parameter. Most
>> storage errors are already ignored even without that parameter right
>> now! I don't think it's a big issue to start ignoring the few missing
>> ones as well?
> 
> Well I wasn't sure. Safe option was to tell the user that there is a
> problem and then the user decides if something should be forced deleted.
> But if you think this is fine without user input lets pretend this never
> existed :).
> 
When there are storage errors, the VM config is removed and the user is
warned about failed volume removal, *except* when the storage errors are
in path() (which can only happen if the storage is gone from the config
or in very few plugins like RBD), where it leads to the VM config
removal failing.

But I don't see why errors in path() should be fundamentally different
here and feel like we should just align the behavior for those too.
After all, that was the intention behind the eval block + warning around
vdisk_free() in commit 31b52247 ("destroy_vm: allow vdisk_free to fail")

To make the warnings more visible, we can switch to log_warn() instead
of plain warn.

For containers, all storage errors just propagate right now (or?), so
the new parameter can be fine there. We could also align the behavior
with what we do for VMs instead (if we do that, it should be done for a
point release), but we don't have to of course.




  reply	other threads:[~2022-11-16 10:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15 10:55 [pve-devel] [PATCH SERIES V3 pve-container/qemu-server/pve-manager 0/6] fix #3711 & adapt drive detach/remove behavior Stefan Hrdlicka
2022-11-15 10:55 ` [pve-devel] [PATCH V3 pve-container 1/6] fix #3711: optionally allow CT deletion to complete on disk volume removal errors Stefan Hrdlicka
2022-11-15 10:55 ` [pve-devel] [PATCH V3 pve-container 2/6] adapt behavior for detaching/removing a mount point Stefan Hrdlicka
2022-11-15 10:55 ` [pve-devel] [PATCH V3 pve-container 3/6] cleanup: remove spaces from empty lines Stefan Hrdlicka
2022-11-15 10:55 ` [pve-devel] [PATCH V3 qemu-server 4/6] add ignore-storage-errors for removing VM with missing storage Stefan Hrdlicka
2022-11-15 12:17   ` Fiona Ebner
2022-11-15 14:22     ` Stefan Hrdlicka
2022-11-16 10:08       ` Fiona Ebner [this message]
2022-11-15 10:55 ` [pve-devel] [PATCH V3 qemu-server 5/6] adapt behavior for detaching drives to deatching container mount points Stefan Hrdlicka
2022-11-15 10:55 ` [pve-devel] [PATCH V3 pve-manager 6/6] fix #3711: optionally allow CT deletion to complete on disk volume removal errors Stefan Hrdlicka

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=0b497cdf-5fc1-419e-38d1-abc0c3aa4aa6@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.hrdlicka@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