project-pegaprox icon indicating copy to clipboard operation
project-pegaprox copied to clipboard

`Feature`: Add ProxSnap alike functions to the web interface

Open gyptazy opened this issue 10 months ago • 7 comments

General

I'd really like to see a snapshot cleanup management in PegaProx, which shows the oldest snapshots in a cluster (not on a VM/guest level, which requires an admin to click through all objects). This allows a quick identification of old and maybe forgotten snapshots that might get deleted safely. It should also provide a filter mechanism to only display snapshots that are older than a specific date (e.g., 2024-12-30).

Tasks

For the overview, it should provide a new API endpoint which allows post actions to provide a specific date for validate against a cutoff-date. While there's already a snapshot path, it doesn't make sense to re-use that one, because it's only in a VM scope, but it can be called from an outer function. The same should be done for the deletion part. While we're talking about a global cluster aware snapshot functionality, it might make sense to scope it directly to /api/snapshots/[...]

  • Create an API endpoint /api/snapshots/overview
    • Allow POST including a date
    • Filter for snapshot objects older than the given date
    • List objects (vmid, vm name, vm type, node, snapshot name, snapshot date, snapsnot age)
    • Provide option to delete snapshots from UI
  • Create an API endpoint /api/snapshots/delete
    • Delete (a) given snapshot(s) by invoking mgr.delete_snapshot

Ideas

This is pretty similar to the idea of my ProxSnap tool for Proxmox based clusters, which is currently only available as a cli tool in Rust.

I already adjusted the front/backend and will provide the PR asap. It currently looks like this - happy about feedback.

Image

gyptazy avatar Jan 26 '26 15:01 gyptazy

Hi @gyptazy , I can't currently add new features without checking with @MrMasterbay first, and he's currently unavailable for health reasons. In the meantime, feel free to submit your pull request – we'll review it as soon as possible.

Regards, Marcus

mkellermann97 avatar Jan 26 '26 15:01 mkellermann97

Hey @mkellermann97,

sure, take your time. I've linked the PR in #14. @MrMasterbay, get well soon!

Cheers, gyptazy

gyptazy avatar Jan 27 '26 07:01 gyptazy

Hi @gyptazy ,

We've now integrated your ProxSnap into our new version v0.6.2. Thank you so much for your contribution!

Image

Please let us know if everything looks good to you. Regards, Marcus

mkellermann97 avatar Jan 27 '26 17:01 mkellermann97

Hey Marcus (@mkellermann97),

looks great. Did you already push it? Couldn't find any new sources in branches or similar.

Cheers, gyptazy

gyptazy avatar Jan 27 '26 18:01 gyptazy

Hi @gyptazy, We'll implement this once we've fixed the current bugs and included the other feature requests.

We're aiming to have it done by tomorrow and release it in the afternoon.

Regards, Marcus

mkellermann97 avatar Jan 27 '26 19:01 mkellermann97

Hi @gyptazy , Please check out the latest version and let us know what you think. Regards, Marcus

mkellermann97 avatar Jan 28 '26 18:01 mkellermann97

Hey @mkellermann97,

looks awesome and works perfectly - also thanks for the minor adjustments to it and the crediting!

Cheers, gyptazy

Image

gyptazy avatar Jan 28 '26 18:01 gyptazy