Skip to content

Allow multiple backup schedules of the same type - #13663

Open
JoaoJandre wants to merge 6 commits into
apache:mainfrom
scclouds:add-multiple-backup-schedule
Open

JoaoJandre wants to merge 6 commits into
apache:mainfrom
scclouds:add-multiple-backup-schedule

Conversation

@JoaoJandre

Copy link
Copy Markdown
Contributor

Description

This PR adds the ability to create multiple backup schedules of the same type for VMs. To support this operation, the ability to configure the limit of backup schedules that can be created with a given backup offering has also been added. The maxschedules parameter has been added to the updateBackupOffering and importBackupOffering APIs; this parameter accepts a map of schedule types to the maximum number that can be created.

Additionally, the ability to edit specific schedules via the GUI has been added. It is important to note that different schedules of the same type are not allowed to have the same time.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • 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
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Example of how the schedule limits can be configured through the GUI
image

How Has This Been Tested?

  • Configured a offering to have more than 1 as the limit for all of the schedule types.
  • Created multiple schedules of each type for a VM
  • Verified that all of the backups where created, with correct schedule IDs on the database.
  • Updated schedules and confirmed that the specified schedule was updated.
  • Tried updating using VM ID and schedule type (old behavior) and verified it worked.

@codecov

codecov Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 25.00000% with 135 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.77%. Comparing base (2f34b0c) to head (e66083c).

Files with missing lines Patch % Lines
...rg/apache/cloudstack/backup/BackupManagerImpl.java 40.74% 51 Missing and 13 partials ⚠️
...i/command/user/backup/UpdateBackupScheduleCmd.java 0.00% 41 Missing ⚠️
...i/command/user/backup/CreateBackupScheduleCmd.java 0.00% 13 Missing ⚠️
.../command/admin/backup/ImportBackupOfferingCmd.java 0.00% 5 Missing ⚠️
.../command/admin/backup/UpdateBackupOfferingCmd.java 16.66% 3 Missing and 2 partials ⚠️
...i/command/user/backup/CreateBackupOfferingCmd.java 0.00% 5 Missing ⚠️
...e/cloudstack/backup/dao/BackupScheduleDaoImpl.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13663      +/-   ##
============================================
- Coverage     20.77%   20.77%   -0.01%     
- Complexity    20847    20851       +4     
============================================
  Files          6053     6054       +1     
  Lines        548222   548509     +287     
  Branches      73236    73273      +37     
============================================
+ Hits         113896   113940      +44     
- Misses       420984   421216     +232     
- Partials      13342    13353      +11     
Flag Coverage Δ
uitests 3.85% <ø> (-0.02%) ⬇️
unittests 22.21% <25.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@abh1sar

abh1sar commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@JoaoJandre can you please resolve conflicts and update the branch

@DaanHoogland DaanHoogland moved this from Ready to conflict/waiting in CloudStack Testing Sep 8, 2026
@JoaoJandre

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@JoaoJandre 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.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19264

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@JoaoJandre

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@JoaoJandre 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.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19779

@nvazquez

nvazquez commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17520)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 79637 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13663-t17520-kvm-ol8.zip
Smoke tests completed. 155 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_uservm_host_control_state Failure 17.12 test_host_control_state.py
test_08_upgrade_kubernetes_ha_cluster Failure 1057.49 test_kubernetes_clusters.py

@JoaoJandre

Copy link
Copy Markdown
Contributor Author

[SF] Trillian test result (tid-17520) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 79637 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13663-t17520-kvm-ol8.zip Smoke tests completed. 155 look OK, 2 have errors, 0 did not run Only failed and skipped tests results shown below:
Test Result Time (s) Test File
test_uservm_host_control_state Failure 17.12 test_host_control_state.py
test_08_upgrade_kubernetes_ha_cluster Failure 1057.49 test_kubernetes_clusters.py

I checked the results, and they are not related to this PR

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: conflict/waiting

Development

Successfully merging this pull request may close these issues.

4 participants