You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "shwstppr (via GitHub)" <gi...@apache.org> on 2024/04/29 10:45:47 UTC

[PR] notes on purging expunged resources [cloudstack-documentation]

shwstppr opened a new pull request, #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397

   Feature PR: https://github.com/apache/cloudstack/pull/8999


-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1593389810


##########
source/adminguide/service_offerings.rst:
##########
@@ -319,6 +319,12 @@ To create a new compute offering:
    -  **Storage Policy**: Name of the storage policy defined at vCenter, this is applicable only for VMware.
       When a specific Zone is selected, one of the storage policies can be selected from the list box.
 
+   -  **Purge Resources**: Whether to cleanup instance and its associated resource from

Review Comment:
   ```suggestion
      -  **Purge Resources**: Whether to cleanup instance and its associated resources from
   ```



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1593390218


##########
source/adminguide/service_offerings.rst:
##########
@@ -319,6 +319,12 @@ To create a new compute offering:
    -  **Storage Policy**: Name of the storage policy defined at vCenter, this is applicable only for VMware.
       When a specific Zone is selected, one of the storage policies can be selected from the list box.
 
+   -  **Purge Resources**: Whether to cleanup instance and its associated resource from
+      database upon expunge. When set to true, the database records for the offering instances and its

Review Comment:
   ```suggestion
         database upon expunge. When set to true, the database records for the instances and its
   ```



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1593391833


##########
source/adminguide/tuning.rst:
##########
@@ -143,3 +143,76 @@ Article <http://support.citrix.com/article/CTX126531>`_.The article
 refers to XenServer 5.6, but the same information applies to XenServer 6
 
 
+Purging Expunged Resources
+--------------------------
+
+..note::
+  Currently only available for Instances and their linked resources.
+
+Over the time there are chances of piling up of millions of database records
+for the removed or expunged resources. The presence of a lot of useless
+records in the database can also affect the performance of cloud so it is
+needed to purge such entries in a systematic way.
+CloudStack provides the following methods to allow purging of the expunged
+resources and their database records:
+
+Using background task
+~~~~~~~~~~~~~~~~~~~~~
+
+A background task will run at regular intervals. The interval for the task and
+other parameters for it such as resource types, start and end date and batch size
+can also be controlled with the help of global settings.
+
+The following new global settings have been introduced which would allow
+configuring background task for purging the expunged resources:
+
+.. cssclass:: table-striped table-bordered table-hover
+
+================================================   ================   ===================================================================
+Global setting                                     Default values     Description
+================================================   ================   ===================================================================
+expunged.resources.purge.enabled                   false              Whether to run a background task to purge the expunged resources.
+expunged.resources.purge.resources                 (empty)            A comma-separated list of resource types that will be considered by the background task to purge the expunged resources. Currently only VirtualMachine is supported. An empty "value will result in considering all resource types for purging.
+expunged.resources.purge.interval                  86400              Interval (in seconds) for the background task to purge the expunged resources.
+expunged.resources.purge.delay                     300                Initial delay (in seconds) to start the background task to purge the expunged resources task.
+expunged.resources.purge.batch.size                50                 Batch size to be used during expunged resources purging.
+expunged.resources.purge.start.time                (empty)            Start time to be used by the background task to purge the expunged resources. Use format yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.
+expunged.resources.purge.keep.past.days            30                 The number of days in the past from the execution time of the background task to purge the expunged resources for which the expunged resources must not be purged. To enable purging expunged resource till the execution of the background task, set the value to zero.
+================================================   ================   ===================================================================
+
+
+Using API
+~~~~~~~~~
+
+An admin-only API `purgeExpungedResources` allows purging the expunged resources
+with desired parameters. It will allow passing the following parameters -
+resourcetype, batchsize, startdate, enddate. An example of purgeExpungedResources
+API call is shown below:
+
+
+.. parsed-literal::
+
+   > purge expungedresources startdate=2024-04-15 enddate=2024-04-20 resourcetype=VirtualMachine
+   {
+      "purgeexpungedresourcesresponse": {
+         "resourcecount": 6
+      }
+   }
+
+
+Using configuration in offerings
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+..note::
+  Available only for service offerings
+
+_purgeresources_ configuration for offerings can be used to allow immediately
+purging a resource when it is expunged. The configuration can be set to true or
+false _purgeresources_ parameter while creating the correspoding offerings. The

Review Comment:
   ```suggestion
   false _purgeresources_ parameter while creating the corresponding offerings. The
   ```



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1593390218


##########
source/adminguide/service_offerings.rst:
##########
@@ -319,6 +319,12 @@ To create a new compute offering:
    -  **Storage Policy**: Name of the storage policy defined at vCenter, this is applicable only for VMware.
       When a specific Zone is selected, one of the storage policies can be selected from the list box.
 
+   -  **Purge Resources**: Whether to cleanup instance and its associated resource from
+      database upon expunge. When set to true, the database records for the offering instances and its

Review Comment:
   ```suggestion
         database upon expunge. When set to true, the database records for the instances with the offering and its
   ```



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1593391508


##########
source/adminguide/tuning.rst:
##########
@@ -143,3 +143,76 @@ Article <http://support.citrix.com/article/CTX126531>`_.The article
 refers to XenServer 5.6, but the same information applies to XenServer 6
 
 
+Purging Expunged Resources
+--------------------------
+
+..note::
+  Currently only available for Instances and their linked resources.
+
+Over the time there are chances of piling up of millions of database records
+for the removed or expunged resources. The presence of a lot of useless
+records in the database can also affect the performance of cloud so it is
+needed to purge such entries in a systematic way.
+CloudStack provides the following methods to allow purging of the expunged
+resources and their database records:
+
+Using background task
+~~~~~~~~~~~~~~~~~~~~~
+
+A background task will run at regular intervals. The interval for the task and
+other parameters for it such as resource types, start and end date and batch size
+can also be controlled with the help of global settings.
+
+The following new global settings have been introduced which would allow
+configuring background task for purging the expunged resources:
+
+.. cssclass:: table-striped table-bordered table-hover
+
+================================================   ================   ===================================================================
+Global setting                                     Default values     Description
+================================================   ================   ===================================================================
+expunged.resources.purge.enabled                   false              Whether to run a background task to purge the expunged resources.
+expunged.resources.purge.resources                 (empty)            A comma-separated list of resource types that will be considered by the background task to purge the expunged resources. Currently only VirtualMachine is supported. An empty "value will result in considering all resource types for purging.
+expunged.resources.purge.interval                  86400              Interval (in seconds) for the background task to purge the expunged resources.
+expunged.resources.purge.delay                     300                Initial delay (in seconds) to start the background task to purge the expunged resources task.
+expunged.resources.purge.batch.size                50                 Batch size to be used during expunged resources purging.
+expunged.resources.purge.start.time                (empty)            Start time to be used by the background task to purge the expunged resources. Use format yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.
+expunged.resources.purge.keep.past.days            30                 The number of days in the past from the execution time of the background task to purge the expunged resources for which the expunged resources must not be purged. To enable purging expunged resource till the execution of the background task, set the value to zero.

Review Comment:
   ```suggestion
   expunged.resources.purge.keep.past.days            30                 The number of days in the past from the execution time of the background task to keep the expunged resources for which the expunged resources must not be purged. To enable purging expunged resource till the execution of the background task, set the value to zero.
   ```



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1634271934


##########
source/adminguide/tuning.rst:
##########
@@ -143,3 +143,76 @@ Article <http://support.citrix.com/article/CTX126531>`_.The article
 refers to XenServer 5.6, but the same information applies to XenServer 6
 
 
+Purging Expunged Resources
+--------------------------
+
+.. note::
+  Currently only available for Instances and their linked resources.
+
+Over the time there are chances of piling up of millions of database records
+for the removed or expunged resources. The presence of a lot of useless
+records in the database can also affect the performance of the cloud so it is
+needed to purge such entries in a systematic way.
+CloudStack provides the following methods to allow purging of the expunged
+resources and their database records:
+
+Using background task
+~~~~~~~~~~~~~~~~~~~~~
+
+A background task will run at regular intervals. The interval for the task and
+other parameters for it such as resource types, start and end date and batch size
+can also be controlled with the help of global settings.
+
+The following new global settings have been introduced which would allow
+configuring background task for purging the expunged resources:
+
+.. cssclass:: table-striped table-bordered table-hover
+
+================================================   ================   ===================================================================
+Global setting                                     Default values     Description
+================================================   ================   ===================================================================
+expunged.resources.purge.enabled                   false              Whether to run a background task to purge the expunged resources.
+expunged.resources.purge.resources                 (empty)            A comma-separated list of resource types that will be considered by the background task to purge the expunged resources. Currently only VirtualMachine is supported. An empty "value will result in considering all resource types for purging.
+expunged.resources.purge.interval                  86400              Interval (in seconds) for the background task to purge the expunged resources.
+expunged.resources.purge.delay                     300                Initial delay (in seconds) to start the background task to purge the expunged resources task.
+expunged.resources.purge.batch.size                50                 Batch size to be used during expunged resources purging.
+expunged.resources.purge.start.time                (empty)            Start time to be used by the background task to purge the expunged resources. Use format yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.
+expunged.resources.purge.keep.past.days            30                 The number of days in the past from the execution time of the background task to purge the expunged resources for which the expunged resources must not be purged. To enable purging expunged resource till the execution of the background task, set the value to zero.
+================================================   ================   ===================================================================
+
+
+Using API
+~~~~~~~~~
+
+An admin-only API `purgeExpungedResources` allows purging the expunged resources
+with desired parameters. It will allow passing the following parameters -
+resourcetype, batchsize, startdate, enddate. An example of purgeExpungedResources
+API call is shown below:
+
+
+.. parsed-literal::
+
+   > purge expungedresources startdate=2024-04-15 enddate=2024-04-20 resourcetype=VirtualMachine
+   {
+      "purgeexpungedresourcesresponse": {
+         "resourcecount": 6
+      }
+   }
+
+
+Using configuration in offerings
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+..note::
+  Available only for service offerings
+
+_purgeresources_ configuration for offerings can be used to allow immediately
+purging a resource when it is expunged. The configuration can be set to true or
+false _purgeresources_ parameter while creating the corresponding offerings. The
+following global setting can be used to control the delay for purging the
+resource after expunge:
+
+================================================   ================   ===================================================================
+Global setting                                     Default values     Description
+================================================   ================   ===================================================================
+expunged.resource.purge.job.delay                  180                Delay (in seconds) to execute the purging 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.

Review Comment:
   ```suggestion
   expunged.resource.purge.job.delay                  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.
   ```



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1587394782


##########
source/adminguide/tuning.rst:
##########
@@ -143,3 +143,76 @@ Article <http://support.citrix.com/article/CTX126531>`_.The article
 refers to XenServer 5.6, but the same information applies to XenServer 6
 
 
+Purging Expunged Resources
+--------------------------
+
+..note::

Review Comment:
   ```suggestion
   .. note::
   ```
   I think, not sure but the doc show the literal `..note::`



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1593441415


##########
source/adminguide/tuning.rst:
##########
@@ -143,3 +143,76 @@ Article <http://support.citrix.com/article/CTX126531>`_.The article
 refers to XenServer 5.6, but the same information applies to XenServer 6
 
 
+Purging Expunged Resources
+--------------------------
+
+.. note::
+  Currently only available for Instances and their linked resources.
+
+Over the time there are chances of piling up of millions of database records
+for the removed or expunged resources. The presence of a lot of useless
+records in the database can also affect the performance of cloud so it is

Review Comment:
   ```suggestion
   records in the database can also affect the performance of the cloud so it is
   ```



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1634271934


##########
source/adminguide/tuning.rst:
##########
@@ -143,3 +143,76 @@ Article <http://support.citrix.com/article/CTX126531>`_.The article
 refers to XenServer 5.6, but the same information applies to XenServer 6
 
 
+Purging Expunged Resources
+--------------------------
+
+.. note::
+  Currently only available for Instances and their linked resources.
+
+Over the time there are chances of piling up of millions of database records
+for the removed or expunged resources. The presence of a lot of useless
+records in the database can also affect the performance of the cloud so it is
+needed to purge such entries in a systematic way.
+CloudStack provides the following methods to allow purging of the expunged
+resources and their database records:
+
+Using background task
+~~~~~~~~~~~~~~~~~~~~~
+
+A background task will run at regular intervals. The interval for the task and
+other parameters for it such as resource types, start and end date and batch size
+can also be controlled with the help of global settings.
+
+The following new global settings have been introduced which would allow
+configuring background task for purging the expunged resources:
+
+.. cssclass:: table-striped table-bordered table-hover
+
+================================================   ================   ===================================================================
+Global setting                                     Default values     Description
+================================================   ================   ===================================================================
+expunged.resources.purge.enabled                   false              Whether to run a background task to purge the expunged resources.
+expunged.resources.purge.resources                 (empty)            A comma-separated list of resource types that will be considered by the background task to purge the expunged resources. Currently only VirtualMachine is supported. An empty "value will result in considering all resource types for purging.
+expunged.resources.purge.interval                  86400              Interval (in seconds) for the background task to purge the expunged resources.
+expunged.resources.purge.delay                     300                Initial delay (in seconds) to start the background task to purge the expunged resources task.
+expunged.resources.purge.batch.size                50                 Batch size to be used during expunged resources purging.
+expunged.resources.purge.start.time                (empty)            Start time to be used by the background task to purge the expunged resources. Use format yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.
+expunged.resources.purge.keep.past.days            30                 The number of days in the past from the execution time of the background task to purge the expunged resources for which the expunged resources must not be purged. To enable purging expunged resource till the execution of the background task, set the value to zero.
+================================================   ================   ===================================================================
+
+
+Using API
+~~~~~~~~~
+
+An admin-only API `purgeExpungedResources` allows purging the expunged resources
+with desired parameters. It will allow passing the following parameters -
+resourcetype, batchsize, startdate, enddate. An example of purgeExpungedResources
+API call is shown below:
+
+
+.. parsed-literal::
+
+   > purge expungedresources startdate=2024-04-15 enddate=2024-04-20 resourcetype=VirtualMachine
+   {
+      "purgeexpungedresourcesresponse": {
+         "resourcecount": 6
+      }
+   }
+
+
+Using configuration in offerings
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+..note::
+  Available only for service offerings
+
+_purgeresources_ configuration for offerings can be used to allow immediately
+purging a resource when it is expunged. The configuration can be set to true or
+false _purgeresources_ parameter while creating the corresponding offerings. The
+following global setting can be used to control the delay for purging the
+resource after expunge:
+
+================================================   ================   ===================================================================
+Global setting                                     Default values     Description
+================================================   ================   ===================================================================
+expunged.resource.purge.job.delay                  180                Delay (in seconds) to execute the purging 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.

Review Comment:
   ```suggestion
   expunged.resource.purge.job.delay                  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.
   ```



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] notes on purging expunged resources [cloudstack-documentation]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #397:
URL: https://github.com/apache/cloudstack-documentation/pull/397#discussion_r1593430757


##########
source/adminguide/tuning.rst:
##########
@@ -143,3 +143,76 @@ Article <http://support.citrix.com/article/CTX126531>`_.The article
 refers to XenServer 5.6, but the same information applies to XenServer 6
 
 
+Purging Expunged Resources
+--------------------------
+
+..note::
+  Currently only available for Instances and their linked resources.
+
+Over the time there are chances of piling up of millions of database records
+for the removed or expunged resources. The presence of a lot of useless
+records in the database can also affect the performance of cloud so it is
+needed to purge such entries in a systematic way.
+CloudStack provides the following methods to allow purging of the expunged
+resources and their database records:
+
+Using background task
+~~~~~~~~~~~~~~~~~~~~~
+
+A background task will run at regular intervals. The interval for the task and
+other parameters for it such as resource types, start and end date and batch size
+can also be controlled with the help of global settings.
+
+The following new global settings have been introduced which would allow
+configuring background task for purging the expunged resources:
+
+.. cssclass:: table-striped table-bordered table-hover
+
+================================================   ================   ===================================================================
+Global setting                                     Default values     Description
+================================================   ================   ===================================================================
+expunged.resources.purge.enabled                   false              Whether to run a background task to purge the expunged resources.
+expunged.resources.purge.resources                 (empty)            A comma-separated list of resource types that will be considered by the background task to purge the expunged resources. Currently only VirtualMachine is supported. An empty "value will result in considering all resource types for purging.
+expunged.resources.purge.interval                  86400              Interval (in seconds) for the background task to purge the expunged resources.
+expunged.resources.purge.delay                     300                Initial delay (in seconds) to start the background task to purge the expunged resources task.
+expunged.resources.purge.batch.size                50                 Batch size to be used during expunged resources purging.
+expunged.resources.purge.start.time                (empty)            Start time to be used by the background task to purge the expunged resources. Use format yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.
+expunged.resources.purge.keep.past.days            30                 The number of days in the past from the execution time of the background task to purge the expunged resources for which the expunged resources must not be purged. To enable purging expunged resource till the execution of the background task, set the value to zero.

Review Comment:
   I guess the complete sentence makes sense as it is,
   
   ```
   The number of days in the past from the execution time of the background task to purge the expunged resources for which the expunged resources must not be purged
   ```
   If needed, we can rephrase the whole statement



-- 
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: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org