From 7b4d45b0cb3b379650a4583b27868d953694f79c Mon Sep 17 00:00:00 2001 From: Gulsum Atici Date: Sat, 25 Mar 2023 00:23:47 +0300 Subject: [PATCH 1/2] Adding Updating Status of Created Items Periodically in Reference Signed-off-by: Gulsum Atici --- 21-reference.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/21-reference.md b/21-reference.md index 24cd5ea..3d31440 100644 --- a/21-reference.md +++ b/21-reference.md @@ -95,4 +95,74 @@ Disk IO quota describes the disk IO operations resource allocation policy. Limit - reserve: Defines the guaranteed minimum reservation. If needed, the machine will definitely get allocated the reserved amount of resources. - shares: Number of shares allocated. Specifies the proportional weighted share for the domain. If this element is omitted, the service defaults to the OS provided defaults. +## Updating Status of Created Items Periodically in RO Module +RO module configuration file includes the following settings to perform periodic status updates of created items: + +- refresh_active: The period to poll the active VM status +- refresh_build: The period to poll the VM status which is still building +- refresh_image: The period to check the status of a created image, flavor item +- refresh_error: The period to check the status of a failed item +- queue_size: RO task queue size + +RO module configuration file includes the default values of refresh periods in seconds as follows: + +```bash +[period] +refresh_active: 60 +refresh_build: 15 +refresh_image: 3600 * 10 +refresh_error: 600 +queue_size: 100 +``` + +### Polling VM status + +RO module updates the VDU details in VNF records periodically unless disabled. For VIM types other than Openstack, RO updates the VM status based on vm_id which is kept in the completed ro_tasks collection in the MongoDB. For each virtual machine, it sends several requests to the Cloud APIs to get VM details, networks and ports details. +For Openstack VIM type, RO executes a monitoring job which is executed periodically according to refresh_active period. This job collects all the VM details and port details belongs to a VIM account by sending only two requests to Openstack cloud APIs. Then, collected bulk data is parsed and all the active VM status are updated. This improvement in VM polling mechanism for Openstack, prevents hammering Cloud APIs if there are numerous VMs need to be monitored. + +### Configuring VM status Updates + +#### Configuring Refresh Periods in OSM + +Kubernetes Deployment of RO Module is updated to add the environment variables with custom values. + +```yaml +image: opensourcemano/ro:testing-daily +env: +- name: OSMRO_PERIOD_REFRESH_ACTIVE + value: 120 +- name: OSMRO_PERIOD_REFRESH_BUILD + value: 30 +- name: OSMRO_PERIOD_REFRESH_IMAGE + value: 3600 +- name: OSMRO_PERIOD_REFRESH_ERROR + value: 600 +- name: OSMRO_PERIOD_QUEUE_SIZE + value: 100 +imagePullPolicy: IfNotPresent +name: ro +``` + +#### Configuring Refresh Periods in Charmed-OSM + +RO charm could be configured to change the refresh periods with the following configuration parameters: + +- period_refresh_active +- period_refresh_build +- period_refresh_image +- period_refresh_error +- period_refresh_queue_size + + +Disabling periodic VM the updates from VIM by setting -1: + +```bash +juju config ro period_refresh_active=-1 +``` + +Updating the VNF status from VIM for every given period of time seconds. Values which are equal or greater than 60 seconds are allowed. + +```bash +juju config ro period_refresh_active=100 +``` -- GitLab From 3a603d0d427c90fba1eafaffaa9b034371358f31 Mon Sep 17 00:00:00 2001 From: Gulsum Atici Date: Mon, 3 Apr 2023 13:54:03 +0300 Subject: [PATCH 2/2] Explaining refresh active parameter in the common section Signed-off-by: Gulsum Atici --- 21-reference.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/21-reference.md b/21-reference.md index 3d31440..4498a99 100644 --- a/21-reference.md +++ b/21-reference.md @@ -116,6 +116,9 @@ refresh_error: 600 queue_size: 100 ``` +`refresh_active` parameter is used to update the VM status from VIM for every given period of time seconds. This parameter is allowed to take the values which are equal/greater than 60 or -1. Setting `refresh_active` to -1 disables the periodic VM updates from VIM. There aren't defined configuration constraints for the other parameters. + + ### Polling VM status RO module updates the VDU details in VNF records periodically unless disabled. For VIM types other than Openstack, RO updates the VM status based on vm_id which is kept in the completed ro_tasks collection in the MongoDB. For each virtual machine, it sends several requests to the Cloud APIs to get VM details, networks and ports details. @@ -155,13 +158,7 @@ RO charm could be configured to change the refresh periods with the following co - period_refresh_queue_size -Disabling periodic VM the updates from VIM by setting -1: - -```bash -juju config ro period_refresh_active=-1 -``` - -Updating the VNF status from VIM for every given period of time seconds. Values which are equal or greater than 60 seconds are allowed. +Sample command to get the VM status updates for each 100 seconds: ```bash juju config ro period_refresh_active=100 -- GitLab