You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "abh1sar (via GitHub)" <gi...@apache.org> on 2026/07/08 18:31:56 UTC
[PR] Incremental nas backup fixes [cloudstack]
abh1sar opened a new pull request, #13571:
URL: https://github.com/apache/cloudstack/pull/13571
### Description
This PR contains some fixes that are required on top of #13074
1. Concurrent deletes can modify the same backup chain in parallel. There is no synchronisation mechanism, so in a race condition a backup can be left in the Hidden state without ever being deleted. Using a per-VM global lock to synchronise deletes.
2. If a backup can be deleted only checks if its immediate child is present or not (not hidden and not removed). But it should check all its dependents. Otherwise it will be wrongly deleted.
3. Removed dead code: findChainTail and findChainParent
4. Added null check before accessing answer.getNeedsCleanup()
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ******************************************************************************* -->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [x] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
Reproduced the failing test cases and verified with the fixes.
1. Create 50 backups and delete them in parallel.
2. Create a backup chain b1->b2->b3->b4 - delete b2 and then delete b1 - b1 should remain hidden and not deleted on the backup repository.
3. Tested backups, delete and restore in general
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
#### How did you try to break this feature and the system with this change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4922886281
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4923451707
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 18512
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4918080644
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4930992285
<b>[SF] Trillian test result (tid-16510)</b>
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 52642 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13571-t16510-kvm-ol8.zip
Smoke tests completed. 152 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_hostha_enable_ha_when_host_disabled | `Error` | 1.00 | test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance | `Error` | 304.41 | test_hostha_kvm.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4918183806
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13571?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 3.46%. Comparing base ([`333973a`](https://app.codecov.io/gh/apache/cloudstack/commit/333973ab3cd1a692dc34d536776c8cc21ebc75e1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`bc5ef78`](https://app.codecov.io/gh/apache/cloudstack/commit/bc5ef78f9deb6e01e2135941921cf457337b2bc2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #13571 +/- ##
======================================
Coverage 3.46% 3.46%
======================================
Files 479 479
Lines 41162 41162
Branches 7793 7793
======================================
Hits 1426 1426
Misses 39543 39543
Partials 193 193
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13571/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/13571/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.46% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cloudstack/pull/13571?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4923564418
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#discussion_r3546424631
##########
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java:
##########
@@ -1000,53 +1035,24 @@ private boolean isDeletePending(Backup backup) {
}
/**
- * Return the live (not delete-pending, not Removed) children of {@code parent} within the
+ * Whether there are any live (not delete-pending, not Removed) children of {@code parent} within the
* same chain. Equivalent to "incrementals whose parent_backup_id points at parent".
*/
Review Comment:
The hasLiveChildren() Javadoc still describes the old behavior (immediate children via PARENT_BACKUP_ID). The implementation now checks for any live descendants via CHAIN_POSITION, so the comment is misleading and makes the chain-delete logic harder to reason about.
##########
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java:
##########
@@ -1000,53 +1035,24 @@ private boolean isDeletePending(Backup backup) {
}
/**
- * Return the live (not delete-pending, not Removed) children of {@code parent} within the
+ * Whether there are any live (not delete-pending, not Removed) children of {@code parent} within the
* same chain. Equivalent to "incrementals whose parent_backup_id points at parent".
*/
- private List<Backup> findLiveChildren(Backup parent) {
- String parentUuid = parent.getUuid();
- String chainId = readDetail(parent, NASBackupChainKeys.CHAIN_ID);
- if (parentUuid == null || chainId == null) {
- return Collections.emptyList();
- }
- List<Backup> children = new ArrayList<>();
- for (Backup b : backupDao.listByVmId(null, parent.getVmId())) {
- if (b.getId() == parent.getId()) {
- continue;
- }
- if (!chainId.equals(readDetail(b, NASBackupChainKeys.CHAIN_ID))) {
- continue;
- }
- if (!parentUuid.equals(readDetail(b, NASBackupChainKeys.PARENT_BACKUP_ID))) {
- continue;
- }
- if (isDeletePending(b)) {
- // Tombstoned children don't keep us alive — they're already on the way out.
- continue;
- }
- children.add(b);
- }
- return children;
- }
-
- /**
- * Look up this backup's immediate parent in the chain (by {@code PARENT_BACKUP_ID}).
- * Returns {@code null} if this is the full (no parent) or the parent row is gone.
- *
- * <p>Prefer {@link #getChainOrderedLeafToRoot(Backup)} when walking the whole chain —
- * this method hits the DB on each call and is O(N²) when used in a loop.
- */
- private Backup findChainParent(Backup backup) {
- String parentUuid = readDetail(backup, NASBackupChainKeys.PARENT_BACKUP_ID);
- if (parentUuid == null || parentUuid.isEmpty()) {
- return null;
+ private boolean hasLiveChildren(Backup backup) {
+ String chainId = readDetail(backup, NASBackupChainKeys.CHAIN_ID);
+ if (chainId == null) {
+ return false;
}
+ int position = chainPosition(backup);
for (Backup b : backupDao.listByVmId(null, backup.getVmId())) {
- if (parentUuid.equals(b.getUuid())) {
- return b;
+ if (b.getId() == backup.getId() || !chainId.equals(readDetail(b, NASBackupChainKeys.CHAIN_ID))) {
+ continue;
+ }
Review Comment:
hasLiveChildren() relies on CHAIN_POSITION ordering, but chainPosition() returns Integer.MAX_VALUE when CHAIN_POSITION is missing/invalid. In that case this method can incorrectly conclude there are no live descendants (because no position is greater than MAX_VALUE) and physically delete a backup that still has dependents in the chain.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4918119826
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#discussion_r3546468945
##########
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java:
##########
@@ -1000,53 +1035,24 @@ private boolean isDeletePending(Backup backup) {
}
/**
- * Return the live (not delete-pending, not Removed) children of {@code parent} within the
- * same chain. Equivalent to "incrementals whose parent_backup_id points at parent".
+ * Whether there are any live (not tombstoned/Hidden, not Removed) descendants of {@code backup} within the
+ * same chain. This uses {@code CHAIN_POSITION} to detect dependents deeper in the chain.
*/
- private List<Backup> findLiveChildren(Backup parent) {
- String parentUuid = parent.getUuid();
- String chainId = readDetail(parent, NASBackupChainKeys.CHAIN_ID);
- if (parentUuid == null || chainId == null) {
- return Collections.emptyList();
- }
- List<Backup> children = new ArrayList<>();
- for (Backup b : backupDao.listByVmId(null, parent.getVmId())) {
- if (b.getId() == parent.getId()) {
- continue;
- }
- if (!chainId.equals(readDetail(b, NASBackupChainKeys.CHAIN_ID))) {
- continue;
- }
- if (!parentUuid.equals(readDetail(b, NASBackupChainKeys.PARENT_BACKUP_ID))) {
- continue;
- }
- if (isDeletePending(b)) {
- // Tombstoned children don't keep us alive — they're already on the way out.
- continue;
- }
- children.add(b);
- }
- return children;
- }
-
- /**
- * Look up this backup's immediate parent in the chain (by {@code PARENT_BACKUP_ID}).
- * Returns {@code null} if this is the full (no parent) or the parent row is gone.
- *
- * <p>Prefer {@link #getChainOrderedLeafToRoot(Backup)} when walking the whole chain —
- * this method hits the DB on each call and is O(N²) when used in a loop.
- */
- private Backup findChainParent(Backup backup) {
- String parentUuid = readDetail(backup, NASBackupChainKeys.PARENT_BACKUP_ID);
- if (parentUuid == null || parentUuid.isEmpty()) {
- return null;
+ private boolean hasLiveChildren(Backup backup) {
+ String chainId = readDetail(backup, NASBackupChainKeys.CHAIN_ID);
+ if (chainId == null) {
+ return false;
}
+ int position = chainPosition(backup);
for (Backup b : backupDao.listByVmId(null, backup.getVmId())) {
- if (parentUuid.equals(b.getUuid())) {
- return b;
+ if (b.getId() == backup.getId() || !chainId.equals(readDetail(b, NASBackupChainKeys.CHAIN_ID))) {
+ continue;
+ }
+ if (!isDeletePending(b) && chainPosition(b) > position) {
+ return true;
Review Comment:
`hasLiveChildren` relies on `CHAIN_POSITION` comparisons. If `CHAIN_POSITION` is missing/invalid for the target backup (or any peer), the current logic can incorrectly conclude there are no live descendants and physically delete a non-leaf backup. Given this is chain-integrity logic, it should behave conservatively when positions are unknown (treat unknown positions as having live descendants if any other live member exists in the chain).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4918126809
@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4932570128
> @weizhouapache test_backup_recovery_nas.py smoke tests passed in the latest run.
cool, thanks @abh1sar
merging
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache merged PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4918818491
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4922913374
> There was integration test failure in test_backup_recovery_nas.py. Fixed and verified by running the test manually multiple times.
great!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4923573487
@abh1sar a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4923161770
@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4918363587
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 18501
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4923224575
> One thing I'd like changed before merge:
>
> In `deleteLeafBackupAndSweepPendingAncestors`, the sweep now ignores the result of `deleteBackupFileAndRow`:
>
> ```java
> for (Backup member : chain) {
> if (member.getId() == backup.getId()) continue;
> if (!isDeletePending(member)) break;
> deleteBackupFileAndRow(member, repo, host); // return value dropped
> }
> ```
>
> The previous version stopped the sweep on failure. Because the sweep walks leaf→root, if a child's on-NAS delete fails and the loop continues, we can delete that child's parent while the failed child still exists on the repository, which orphans the child (its base data is gone and it becomes unrestorable). Can we restore the stop-on-failure behaviour, i.e. break/return when `deleteBackupFileAndRow` returns false, so a partial NAS failure leaves a consistent chain for the next sweep to retry?
>
We are deleting Hidden backups that don't have any dependents. Hidden backups without any live children are by design not restorable. Let's say we have 4 Hidden backups in a chain and one live leaf backup. In case one of the Hidden backup delete fails, and we stop walking the chain to delete rest of the backups. These Hidden backups will never get deleted.
Removing the condition makes the delete best-effort. We delete whatever Hidden backups we can (we know they don't have any live dependents, so it is safe to delete.
> Two smaller points to confirm:
>
> 1. On the `forced` path, `deleteBackup` now holds the per-VM lock and then calls `cascadeDeleteSubtree`. Could you confirm nothing under it re-enters `deleteBackup` for the same VM in a way that unbalances the lock ref-count? (`GlobalLock` is reentrant per thread, so it should be fine, just want to be sure since that method isn't in this diff.)
That's right. deleteBackup is only called from BackupManagerImpl.
> 2. `hasLiveChildren` relies on `chainPosition`. If `CHAIN_POSITION` is ever absent, the `>` comparison could misjudge dependents. Probably a non-issue since position is always written, but a defensive default may be worth it.
Yes, chain position is always written. Not doing anything about it now. Maybe we can add some defensive code later
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4931732379
@weizhouapache
test_backup_recovery_nas.py smoke tests passed in the latest run.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4922891796
There was integration test failure in test_backup_recovery_nas.py. Fixed and verified by running the test manually multiple times.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4927323955
<b>[SF] Trillian test result (tid-16508)</b>
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 69424 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13571-t16508-kvm-ol8.zip
Smoke tests completed. 149 look OK, 4 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
ContextSuite context=TestNASBackupAndRecovery>:setup | `Error` | 0.00 | test_backup_recovery_nas.py
test_05_list_volumes_isrecursive | `Failure` | 0.04 | test_list_volumes.py
test_07_list_volumes_listall | `Failure` | 0.04 | test_list_volumes.py
test_01_deployVMInSharedNetwork | `Failure` | 232.89 | test_network.py
test_01_vpn_usage | `Error` | 1.12 | test_usage.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4923154358
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4918804128
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Incremental nas backup fixes [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #13571:
URL: https://github.com/apache/cloudstack/pull/13571#issuecomment-4918051120
HI @jmsperu
Can you please review the changes?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org