cloudstack/plugins
James Peru b8d069e127 feat(backup): cascade-delete + chain repair for NAS incrementals
Adds the delete-with-chain-repair semantics agreed in the RFC review:

  scripts/vm/hypervisor/kvm/nasbackup.sh
    - New '-o rebase' operation: rebases an existing on-NAS qcow2 onto
      a new backing parent. Uses a SAFE rebase (no -u) so the target
      absorbs blocks of the about-to-be-deleted parent before the
      backing pointer is moved up to the grandparent. Writes the new
      backing reference relative to the target's directory so it
      survives mount-point changes.
    - New CLI flags --rebase-target, --rebase-new-backing (both passed
      mount-relative).

  RebaseBackupCommand + LibvirtRebaseBackupCommandWrapper
    - New agent command that wraps the script's rebase operation. The
      provider sends one of these per child that needs re-pointing.

  NASBackupProvider.deleteBackup
    - Now plans the chain repair before touching files via
      computeChainRepair():
        * No chain metadata     -> single-file delete (legacy behaviour)
        * Tail incremental      -> single delete, no rebase
        * Middle incremental    -> rebase immediate child onto our
                                   parent, then delete; shift
                                   chain_position of all later
                                   descendants by -1
        * Full with descendants -> refuse unless forced=true; with
                                   forced=true delete full + every
                                   descendant newest-first
    - Updates parent_backup_id, chain_position metadata in
      backup_details after each rebase so the model in the DB matches
      the on-disk chain.

This implements the cascade-delete behaviour requested in @abh1sar's
review point #7.

Refs: apache/cloudstack#12899
2026-04-27 19:24:02 +03:00
..
acl Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
affinity-group-processors Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
alert-handlers Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
api Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
backup feat(backup): cascade-delete + chain repair for NAS incrementals 2026-04-27 19:24:02 +03:00
ca/root-ca Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
database Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
dedicated-resources Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
deployment-planners Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
drs/cluster Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
event-bus Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
ha-planners/skip-heurestics Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
host-allocators/random Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
hypervisors feat(backup): cascade-delete + chain repair for NAS incrementals 2026-04-27 19:24:02 +03:00
integrations Merge branch '4.22' 2026-04-17 04:35:25 +05:30
maintenance Remove unnecessary stubbings in ManagementServerMaintenanceManagerImplTest (#11914) (#12623) 2026-03-12 12:29:31 +05:30
metrics Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
network-elements fix: NsxResource.executeRequest DeleteNsxNatRuleCommand comparison bug (#12833) 2026-04-17 04:53:36 +05:30
outofbandmanagement-drivers Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
storage Merge branch '4.22' 2026-04-14 14:50:44 +02:00
storage-allocators/random Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
user-authenticators Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
user-two-factor-authenticators Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
pom.xml Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage (#12563) 2026-04-13 08:38:15 -03:00