[pbs-devel] [PATCH v5 proxmox-backup 30/31] api: datastore/namespace: return backup groups delete stats on remove
Fabian Grünbichler
f.gruenbichler at proxmox.com
Thu Oct 31 13:12:26 CET 2024
On October 31, 2024 10:43 am, Christian Ebner wrote:
> On 10/30/24 14:42, Fabian Grünbichler wrote:
>>
>>> Christian Ebner <c.ebner at proxmox.com> hat am 30.10.2024 14:37 CET geschrieben:
>>>
>>>
>>> On 10/25/24 12:10, Fabian Grünbichler wrote:
>>>> On October 18, 2024 10:42 am, Christian Ebner wrote:
>>>>> Add and expose the backup group delete statistics by adding the
>>>>> return type to the corresponding REST API endpoints.
>>>>>
>>>>> Further, add a `ignore-protected` flag to the api endpoints, allowing
>>>>> to return without error when set.
>>>>
>>>> logical changes look good to me, `ignore-protected` is just slightly
>>>> confusing as a name - just reading that, I would think this removes the
>>>> namespace/group even if something protected is found, not that it would
>>>> make that "error" non-fatal.
>>>>
>>>> can't really think of a catchy alternative though, but wanted to mention
>>>> it in case somebody else can ;)
>>>
>>> Renamed this to `error-on-protected` and switched the boolean logic.
>>> That should hopefully make it less susceptible to misinterpretation.
>>>
>>>>
>>>> we should probably switch the UI over to present the results now that we
>>>> can?
>>>
>>> Not sure I fully understood what you mean here, the remove vanished
>>> stats are already exposed in the summary of the sync job.
>>
>> the regular pruning endpoints when called from the UI could now take advantage of this information as well, and print a nice summary of the results.. instead of using the "legacy" query that errors out if there are protected snapshots, and doesn't tell you how much was removed if there were none.
>
>
> Hmm, seems a bit invasive, as e.g. that would trigger a pop-up window
> after e.g. the namespace prune confirmation window? Or how would that
> information be displayed to the user?
we do already get a warning popup if the removal fails cause of
protection at the moment. at least that could be extended to display the
counts ;)
not sure whether we want to have a popup also on success, that might be
a bit intrusive.. maybe it would make sense to make manual removal of a
group or namespace a task with a log? then at least the information
would/could be recorded somewhere.. and I guess for namespace removal
opening the task viewer might be sensible as well then, that is not
something you do 50 times in a row every day, whereas group removal
might be something you do quite a few times when doing a manual cleanup.
> Including this to the prune jobs task log as summary might be a nice
> addition, however.
yes, logging it in the tasks would be nice.
More information about the pbs-devel
mailing list