Change in ovirt-engine[master]: core:Add a script that displays async ...(#868672)

emesika at redhat.com emesika at redhat.com
Wed Dec 5 19:31:04 UTC 2012


Eli Mesika has submitted this change and it was merged.

Change subject: core:Add a script that displays async ...(#868672)
......................................................................


core:Add a script that displays async ...(#868672)

Adding a fn_db_get_async_tasks function to the database.

Displays DC id , DC name, SPM Host id , SPM Host name and number of
async tasks awaiting.

Example:

ovirt=# select  * from fn_db_get_async_tasks();
-[ RECORD 1 ]-+-------------------------------------
dc_id         | 64600e6a-ef8b-11e1-838c-0fc062f03f3a
dc_name       | Default
spm_host_id   | b021eada-ef8b-11e1-8e97-579ccb995b3c
spm_host_name | pluto-vdsa
task_count    | 2

The functions does the following steps to gather the required
information:

1) create a record type with DC name, DC id, SPM host id, SPM host name,
count

2) get all distinct DC ids from async_tasks table

3) Run a cursor for each result in 2)

   a) get DC name
   b) get SPM Host id & name if available
   c) get count of tasks

   return current record

4) return set of generated records

regarding the required compensation information:

use the following query:
select command_type, entity type from business_entity_snapshot

please note:
command_type is a fully qualified name , consider to take only its
suffix.
entity type is a string identifying the entity (like vm_static etc.)

Change-Id: Ia9f021279d761344c3d9fb3bedef80637d5a7855
Signed-off-by: Eli Mesika <emesika at redhat.com>
Bug-Url:https://bugzilla.redhat.com/868672
Signed-off-by: Eli Mesika <emesika at redhat.com>
---
M backend/manager/dbscripts/common_sp.sql
1 file changed, 59 insertions(+), 0 deletions(-)

Approvals:
  Eli Mesika: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/8736
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia9f021279d761344c3d9fb3bedef80637d5a7855
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>



More information about the Engine-commits mailing list