Repository navigation
test(e2e): re-enable and modernize the VM backup e2e (backup path is uncovered) #3236
Copy link
Copy link
Open
Labels
area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)area/testingIssues or PRs related to testing (e2e, bats, unit tests)Issues or PRs related to testing (e2e, bats, unit tests)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Description
Activity
- added 3 commits that reference this issue
on Jul 22, 2026 Refreshed the body after re-verifying against
main(04b742670). Three corrections, all in the issue's favour:- the BATS framing is obsolete: the test was ported to Chainsaw and now sits at
hack/e2e-chainsaw/backup/chainsaw-test.yaml.disabled. It is still not executed, for the same structural reason —hack/select-e2e.shonly enumerateschainsaw-test.yaml, so the.disabledsuffix keeps the suite unselectable. - the API drift is on three axes rather than one, which changes the size of the job from "rename a file" to "rewrite the BackupJob step":
spec.storageRef/spec.strategyRefare gone fromBackupJobSpec(nowApplicationRef+ requiredBackupClassName),velero-strategy-defaultno longer exists (it iscozy-default-velero-vminstance/-vmdisk), andapps.cozystack.io/VirtualMachineis not a package at all — onlyvm-instanceandvm-diskexist. - defect 1 of the two "defaults that break the flow" is fixed and struck through: the endpoint is now derived from the COSI system-credentials Secret as
https://<external S3 ingress>(PR fix(etcd): complete v1alpha2 transition for in-cluster 1.5→1.6 upgrades #3270). Defect 2, the missingchecksumAlgorithm: "", is confirmed still valid —git grep -i checksumAlgorithm -- packages/returns nothing.
Also linked PR #3427, which is open against exactly this.
Found during an audit of all open backup issues.
- the BATS framing is obsolete: the test was ported to Chainsaw and now sits at
- addedtriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
on Aug 12, 2026 - added 4 commits that reference this issue
on Sep 15, 2026 - addedkind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugarea/testingIssues or PRs related to testing (e2e, bats, unit tests)Issues or PRs related to testing (e2e, bats, unit tests)area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to complete
on Sep 23, 2026
Metadata
Metadata
Assignees
Labels
area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)area/testingIssues or PRs related to testing (e2e, bats, unit tests)Issues or PRs related to testing (e2e, bats, unit tests)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Summary
The VM backup end-to-end test is disabled and stale, so the
VMInstancebackup/restore path is not covered by CI. Because of this, config-level regressions in the default backup flow ship unnoticed. On a v1.5.x SeaweedFS-backed cluster the default VM backup flow does not complete out of the box; the issues below would be caught by a working e2e.Current state
Updated 2026-08-03 — the BATS era is over: the test was ported to Chainsaw and now lives at
hack/e2e-chainsaw/backup/chainsaw-test.yaml.disabled. It is still not executed, and for the same reason:hack/select-e2e.shenumerates suites withfind hack/e2e-chainsaw -mindepth 2 -maxdepth 2 -name chainsaw-test.yaml, so the.disabledsuffix keepsbackupunselectable. The sibling app suites all run.The API drift is on three axes, not one, so "re-enable" means rewriting the BackupJob step rather than renaming a file:
spec.storageRef+spec.strategyRef.api/backups/v1alpha1/backupjob_types.gonow definesBackupJobSpecasApplicationRef+ a requiredBackupClassName, with an optionalPlanRef. Both old fields are gone from the type, so the apply is pruned or rejected outright rather than merely mis-routed.velero-strategy-defaultno longer exists;mainshipscozy-default-velero-vminstanceandcozy-default-velero-vmdisk.apps.cozystack.io/VirtualMachine, which is not a package at all —packages/apps/has onlyvm-instanceandvm-disk, andcozy-defaultroutesVMInstanceandVMDisk.Defaults that break the out-of-the-box flow (repo-verified)
BSL endpoint scheme vs S3 TLS.FIXED (2026-08-03 re-check).templates/_helpers.tplnow derives the endpoint from the COSI system-credentials Secret and returnshttps://<external S3 ingress>, which carries an ACME cert; the plaintexthttp://seaweedfs-s3…:8333survives invalues.yamlonly as the documented fallback forprovisionBucket: falseand for offline renders. Landed in PR fix(etcd): complete v1alpha2 transition for in-cluster 1.5→1.6 upgrades #3270; the same forced-httpsstep is tracked as a forward-compatibility note in fix(bucket): endpoint helper unconditionally forces https:// — original scheme lost for provisioned buckets #3317.checksumAlgorithm. Still valid.git grep -i checksumAlgorithm -- packages/returns nothing, andtemplates/velero-bsl.yamlsets onlyregion,s3ForcePathStyleands3Urlunderconfig. Withvelero-plugin-for-awsv1.14.1 (AWS SDK v2) against SeaweedFS,PutObjectof the backup metadata fails with a misleadingInvalidAccessKeyId;checksumAlgorithm: ""resolves it.Proposed
VMInstance+cozy-defaultBackupClassflow.BackupreachesCompletedand that objects are written to the bucket.checksumAlgorithm: "". The endpoint half is already done, see above.PR #3427 "test(vmi): modernize the VMInstance/VMDisk backup/restore e2e to the BackupClass flow" is open against this.