From: "Michael Köppl" <m.koeppl@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] superseded: [PATCH container/docs/ha-manager/manager/proxmox-widget-toolkit/qemu-server v2 0/8] fix #6613: update HA rules upon resource deletion
Date: Tue, 30 Sep 2025 17:03:56 +0200 [thread overview]
Message-ID: <2bdeefc2-4342-4327-830b-6f7f6560639e@proxmox.com> (raw)
In-Reply-To: <20250924160747.430018-1-m.koeppl@proxmox.com>
Superseded-by:
https://lore.proxmox.com/pve-devel/20250930145848.263162-1-m.koeppl@proxmox.com/
On 9/24/25 6:07 PM, Michael Köppl wrote:
> This patch series aims to fix #6613 [0]. Although an implementation was
> proposed in the past, it was not applied since it was unclear how to
> handle the case where the removed resource is the last resource in a
> rule.
>
> The approach in this patch series is the following:
> - With the purge param activated (default), the
> resource is removed from any rule referencing it.
> - Without the purge param, rules are left untouched, making the removal
> of resources from rules "opt-out", as was suggested in the previous
> implementation [1].
> - If the resource was the last resource in the rule *and* the purge
> param is set, the rule will also be deleted.
> - For guest destruction, the "Purge from job configurations" option will
> also set the purge parameter for removing the HA resource
> - The purge param is set by default for resource removal in the GUI and
> CLI
>
> After some back-and-forth, I settled in this approach as the most
> intuitive and transparent. Alternative approaches considered were the
> following:
> - Updating rules even without the purge flag set, but failing and
> showing an error to the user if a rule would be deleted, prompting the
> user to enable the purge flag. This approach seems to be to
> restrictive and IMO doesn't add any UX value.
> - By default not setting the purge flag. This would by default leave
> "zombie" rules with non-existent resources. This is IMO intransparent
> if it happens by default. Users might be removing resources, not even
> knowing they're leaving behind rules that still reference said
> resources.
>
> But I'm also asking for input here if someone has a different opinion or
> suggestions for alternative approaches.
>
> Changes since v1:
> - Pulled read_rules_config and write_rules_config into conditional block
> in delete_service_from_config
> - Set `disabled: true` for the resource remove button, such that is can
> only be clicked if a resource was selected
> - Use ConfirmRemoveDialog as base for SafeDestroyResource to get a
> yes/no dialog with the additional checkbox instead of the SafeDestroy
> dialog that displays a warning and requires entering the ID of the
> resource again.
>
> Thanks to @Daniel for the review of v1!
>
> pve-ha-manager:
>
> Michael Köppl (2):
> fix #6613: update rules containing the resource to be deleted
> api: add purge parameter for resource deletion
>
> src/PVE/API2/HA/Resources.pm | 10 +++++++++-
> src/PVE/HA/Config.pm | 13 ++++++++++++-
> 2 files changed, 21 insertions(+), 2 deletions(-)
>
>
> qemu-server:
>
> Michael Köppl (1):
> fix #6613: pass purge param to delete_service_from_config
>
> src/PVE/API2/Qemu.pm | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>
> pve-container:
>
> Michael Köppl (1):
> fix #6613: pass purge param to delete_service_from_config
>
> src/PVE/API2/LXC.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> proxmox-widget-toolkit:
>
> Michael Köppl (1):
> window: add ConfirmRemoveDialog
>
> src/Makefile | 1 +
> src/window/ConfirmRemoveDialog.js | 242 ++++++++++++++++++++++++++++++
> 2 files changed, 243 insertions(+)
> create mode 100644 src/window/ConfirmRemoveDialog.js
>
>
> pve-manager:
>
> Michael Köppl (2):
> ui: add SafeDestroyResource window
> ui: use SafeDestroyResource window for removing resources
>
> www/manager6/Makefile | 1 +
> www/manager6/ha/Resources.js | 16 ++++++---
> www/manager6/window/SafeDestroyResource.js | 41 ++++++++++++++++++++++
> 3 files changed, 54 insertions(+), 4 deletions(-)
> create mode 100644 www/manager6/window/SafeDestroyResource.js
>
>
> pve-docs:
>
> Michael Köppl (1):
> add notes about effects of purge flag for resource and guest removal
>
> ha-manager.adoc | 4 ++++
> pct.adoc | 3 +++
> qm.adoc | 3 +++
> 3 files changed, 10 insertions(+)
>
>
> Summary over all repositories:
> 12 files changed, 332 insertions(+), 8 deletions(-)
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-09-30 15:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 16:07 [pve-devel] " Michael Köppl
2025-09-24 16:07 ` [pve-devel] [PATCH ha-manager v2 1/2] fix #6613: update rules containing the resource to be deleted Michael Köppl
2025-09-24 16:07 ` [pve-devel] [PATCH ha-manager v2 2/2] api: add purge parameter for resource deletion Michael Köppl
2025-09-24 16:07 ` [pve-devel] [PATCH qemu-server v2 1/1] fix #6613: pass purge param to delete_service_from_config Michael Köppl
2025-09-24 16:07 ` [pve-devel] [PATCH container " Michael Köppl
2025-09-24 16:07 ` [pve-devel] [PATCH widget-toolkit v2 1/1] window: add ConfirmRemoveDialog Michael Köppl
2025-09-26 14:15 ` Daniel Kral
2025-09-30 8:03 ` Michael Köppl
2025-09-24 16:07 ` [pve-devel] [PATCH manager v2 1/2] ui: add ConfirmRemoveResource window Michael Köppl
2025-09-24 16:07 ` [pve-devel] [PATCH manager v2 2/2] ui: use ConfirmRemoveResource window for removing resources Michael Köppl
2025-09-24 16:07 ` [pve-devel] [PATCH docs v2 1/1] add notes about effects of purge flag for resource and guest removal Michael Köppl
2025-09-26 14:23 ` [pve-devel] [PATCH container/docs/ha-manager/manager/proxmox-widget-toolkit/qemu-server v2 0/8] fix #6613: update HA rules upon resource deletion Daniel Kral
2025-09-30 15:03 ` Michael Köppl [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=2bdeefc2-4342-4327-830b-6f7f6560639e@proxmox.com \
--to=m.koeppl@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