cloudstack
cloudstack copied to clipboard
Fix backup dates
Description
Currently, the backup date in Veeam is collected as a String
and saved as VARCHAR(255)
in the database, which can lead to errors and inconsistencies.
We are proposing with this PR to persist the backup dates as a DATETIME
object, which will enable us to properly manipulate it, regardless of the date format used in the environment. The UI was also changed to display the complete data format.
When upgrading the DB schema, we delete all backup entries in the DB; these backups are synchronized with Veeam backups by ACS afterwards. In the end, no Veeam backups should be lost. Only dummy backups will be permanently deleted, and since they are not relevant in production, no harm will be caused.
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)
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [X] Minor
- [ ] Trivial
Screenshots (if appropriate):
Storage->Backups
Instances->VM->Backups
How Has This Been Tested?
This was tested in a local lab, by upgrading the DB schema and then checking if ACS would correctly synchronize with Veeam. After that, the UI was checked to see if everything was as expected. New backups were created and checked. The same tests were made using the dummy provider.
@blueorangutan package
@GutoVeronezi a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
@GutoVeronezi a Jenkins job has been kicked to build packages. It will be bundled with SystemVM template(s). I'll keep you posted as I make progress.
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_multiplication_x: (SL-JID-1799)
UI build: :heavy_multiplication_x: (SL-JID-3)
Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 1
Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 3617
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_multiplication_x: (SL-JID-1810)
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_multiplication_x: (SL-JID-1837)
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@JoaoJandre which versions of Veeam was this tested with?
@JoaoJandre which versions of Veeam was this tested with?
Hello @rohityadavcloud, no changes were made in the way the data is being collected. Only in the way the data is processed and stored in the DB. Therefore, this will work with the same versions of Veeam as it has been working until now.
This PR breaks compatibility for existing users with backups on upgrade as the upgrade path runs DELETE FROM `cloud`.`backups`
. So, it can't be accepted unless the PR handles upgrades in a more smoother way, or at least we make an attempt to consult and build support with users (on users@ perhaps?).
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@JoaoJandre can you look at the conflicts here, please?
@rohityadavcloud @harikrishna-patnala @sureshanaparti I finally got around addressing your reviews, now the data migration is done in the Upgrade41810to41900.java file.
Codecov Report
Merging #6473 (8c4be18) into main (e166f96) will increase coverage by
0.00%
. The diff coverage is0.63%
.
@@ Coverage Diff @@
## main #6473 +/- ##
==========================================
Coverage 12.70% 12.71%
- Complexity 8673 8703 +30
==========================================
Files 2715 2727 +12
Lines 256071 256580 +509
Branches 39926 39991 +65
==========================================
+ Hits 32541 32628 +87
- Misses 219391 219802 +411
- Partials 4139 4150 +11
Impacted Files | Coverage Δ | |
---|---|---|
...ck/engine/subsystem/api/storage/VolumeService.java | 0.00% <ø> (ø) |
|
...ine/subsystem/api/storage/type/VolumeTypeBase.java | 10.00% <ø> (ø) |
|
...e/subsystem/api/storage/type/VolumeTypeHelper.java | 100.00% <ø> (ø) |
|
.../main/java/com/cloud/network/IpAddressManager.java | 100.00% <ø> (ø) |
|
...java/com/cloud/agent/manager/AgentManagerImpl.java | 4.77% <0.00%> (-0.17%) |
:arrow_down: |
...cloud/agent/manager/ClusteredAgentManagerImpl.java | 0.00% <0.00%> (ø) |
|
...n/java/com/cloud/vm/VmWorkJobWakeupDispatcher.java | 0.00% <ø> (ø) |
|
.../cloud/configuration/dao/ResourceCountDaoImpl.java | 8.84% <ø> (ø) |
|
...in/java/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java | 0.00% <ø> (ø) |
|
...in/java/com/cloud/dc/dao/DomainVlanMapDaoImpl.java | 54.54% <ø> (ø) |
|
... and 48 more |
... and 27 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@blueorangutan package
@rohityadavcloud a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 6106
@blueorangutan test rocky-8 vmware-72