cloudstack/tools
Abhishek Kumar 8f88103a29
FR72 - api,server: purge expunged resources (#405)
This PR introduces the functionality of purging removed DB entries for CloudStack entities (currently only for VirtualMachine).
There would be three mechanisms for purging removed resources:
- Background task - CloudStack will run a background task which runs at a defined interval. Other parameters for this task can be controlled with new global settings.
- API - New API `purgeExpungedResources`. It will allow passing the following parameters - resourcetype, batchsize, startdate, enddate
- Config for service offering. Service offerings can be created with purgeresources parameter which would allow purging resources immediately on expunge.

Following new global settings have been added:
- `expunged.resources.purge.enabled`: Default: false. Whether to run a background task to purge the DB records of the expunged resources.
- `expunged.resources.purge.resources`: Default: (empty). A comma-separated list of resource types that will be considered by the background task to purge the DB records of the expunged resources. Currently only VirtualMachine is supported. An empty value will result in considering all resource types for purging.
- `expunged.resources.purge.interval`: Default: 86400. Interval (in seconds) for the background task to purge the DB records of the expunged resources.
- `expunged.resources.purge.delay`: Default: 300. Initial delay (in seconds) to start the background task to purge the DB records of the expunged resources task.
- `expunged.resources.purge.batch.size`: Default: 50. Batch size to be used during purging of the DB records of the expunged resources.
- `expunged.resources.purge.start.time`: Default: (empty). Start time to be used by the background task to purge the DB records of the expunged resources. Use format `yyyy-MM-dd` or `yyyy-MM-dd HH:mm:ss`.
- `expunged.resources.purge.keep.past.days`: Default: 30. The number of days in the past from the execution time of the background task to purge the DB records of the expunged resources for which the expunged resources must not be purged. To enable purging DB records of the expunged resource till the execution of the background task, set the value to zero.
- `expunged.resource.purge.job.delay`: Default: 180. Delay (in seconds) to execute the purging of the DB records of an expunged resource initiated by the configuration in the offering. Minimum value should be 180 seconds and if a lower value is set then the minimum value will be used.

Upstream PRs:
https://github.com/apache/cloudstack/pull/8999
https://github.com/apache/cloudstack-documentation/pull/397

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2024-06-19 12:59:50 +05:30
..
apidoc FR72 - api,server: purge expunged resources (#405) 2024-06-19 12:59:50 +05:30
appliance cloudstack: bump to use 4.18.1.0 systemvmtemplate (#7828) 2023-08-11 07:38:47 +02:00
bugs-wiki Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
build fix tools/build/setnextversion.sh: do not update tools/apidoc/pom.xml (#7163) 2023-05-08 13:00:36 +02:00
checkstyle Update version to 4.18.1.1 (#417) 2024-04-08 09:27:57 -06:00
devcloud-kvm Update version to 4.18.1.1 (#417) 2024-04-08 09:27:57 -06:00
devcloud4 Update version to 4.18.1.1 (#417) 2024-04-08 09:27:57 -06:00
docker Update version to 4.18.1.1 (#417) 2024-04-08 09:27:57 -06:00
eclipse CLOUDSTACK-9859: Retirement of midonet plugin (final removal) (#2285) 2017-10-10 10:08:23 +05:30
git fix merge diff display (#7047) 2023-01-09 11:43:32 +01:00
jira jira-changes.py: generate content for CHANGES.md from jira filter 2014-11-30 21:16:59 -05:00
logo README: happy holidays! 2015-12-23 13:27:40 +05:30
marvin Fix exceeding of resource limits with powerflex (#443) 2024-05-08 20:54:54 +05:30
ngui marvin: replace encodestring for encodebytes (#7027) 2023-05-08 12:51:12 +05:30
transifex Fix spelling (#6860) 2022-11-13 10:56:15 +01:00
utils/database_comparision_during_upgrade Fix spelling (#6860) 2022-11-13 10:56:15 +01:00
whisker Fix spelling (#6860) 2022-11-13 10:56:15 +01:00
pom.xml Update version to 4.18.1.1 (#417) 2024-04-08 09:27:57 -06:00