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 <emes...@redhat.com> Bug-Url:https://bugzilla.redhat.com/868672 Signed-off-by: Eli Mesika <emes...@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 <emes...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches