Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 896139

Summary: PRD34 - [RFE] collect the "created_by" field of a VM into it's configuration history
Product: Red Hat Enterprise Virtualization Manager Reporter: Dan Yasny <dyasny>
Component: ovirt-engine-dwhAssignee: Yaniv Lavi <ylavi>
Status: CLOSED ERRATA QA Contact: Barak Dagan <bdagan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: acathrow, bazulay, iheim, jkt, lbopf, pstehlik, Rhev-m-bugs
Target Milestone: ---Keywords: FutureFeature, Reopened
Target Release: 3.4.0Flags: dyasny: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: ovirt-3.4.0-alpha1 Doc Type: Enhancement
Doc Text:
The field 'created_by_user_id' is now collected in a virtual machine's configuration history.
Story Points: ---
Clone Of:
: 1052383 (view as bug list) Environment:
Last Closed: 2014-06-09 15:16:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 883778    
Bug Blocks: 896140, 1052383, 1052388    

Description Dan Yasny 2013-01-16 17:21:41 UTC
Description of problem:

Once we have the user who created a VM in vm_static, we should also collect this information into DWH

Comment 4 Itamar Heim 2013-12-01 10:57:51 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.

Comment 5 Yaniv Lavi 2013-12-01 10:59:56 UTC
Still relevant waiting on engine to implement

Comment 6 Sandro Bonazzola 2014-01-14 08:43:15 UTC
ovirt 3.4.0 alpha has been released

Comment 7 Barak Dagan 2014-03-12 10:29:03 UTC
Verified on av2.1:

rhevm-3.4.0-0.3.master.el6ev.noarch
rhevm-dwh-3.4.0-0.4.master.20140224152332.el6ev.noarch


1) psql -d engine -c 'select vm_name, vm_type, created_by_user_id, _create_date from vm_static;' | less -S

 vm_name | vm_type |          created_by_user_id          |         _create_date          
---------+---------+--------------------------------------+-------------------------------
 Blank   |       0 |                                      | 2013-12-25 15:31:54.367179+02
 VM-0    |       0 | fdfc627c-d875-11e0-90f0-83df133b58cc | 2014-03-12 11:51:05.241196+02
 VM-1    |       0 | fdfc627c-d875-11e0-90f0-83df133b58cc | 2014-03-12 11:51:10.927674+02
 VM-2    |       0 | fdfc627c-d875-11e0-90f0-83df133b58cc | 2014-03-12 11:51:13.897653+02
 VM-3    |       0 | fdfc627c-d875-11e0-90f0-83df133b58cc | 2014-03-12 11:51:16.341076+02
 VM-4    |       0 | fdfc627c-d875-11e0-90f0-83df133b58cc | 2014-03-12 11:51:18.692333+02
(6 rows)


2) psql -d engine -c 'select vm_name, vm_type, created_by_user_id, create_date from dwh_vm_configuration_history_view;' | less -S

 vm_id | vm_name | vm_type | create_date | user_name | created_by_user_id 
-------+---------+---------+-------------+-----------+--------------------
(0 rows)

3) psql -d ovirt_engine_history -c 'select vm_id, vm_name, vm_type, create_date, created_by_user_name as user_name, created_by_user_id from vm_configuration;' | less -S

                vm_id                 | vm_name | vm_type |        create_date         | user_name |          created_by_user_id          
--------------------------------------+---------+---------+----------------------------+-----------+--------------------------------------
 6c1ea823-c98b-4c68-b3fd-728369646c42 | VM-0    |       0 | 2014-03-12 11:51:05.241+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
 16224285-996f-454e-8ca6-3c37a2772078 | VM-1    |       0 | 2014-03-12 11:51:10.927+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
 b595a533-0d47-4fd6-850d-a4c1e1d4a803 | VM-2    |       0 | 2014-03-12 11:51:13.897+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
 50773bae-72ab-46f2-80ce-ab487a9e6afe | VM-3    |       0 | 2014-03-12 11:51:16.341+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
 972e6aca-b34b-4043-b95c-4db52816df7b | VM-4    |       0 | 2014-03-12 11:51:18.692+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
(5 rows)


4) psql -d ovirt_engine_history -c 'select vm_id, vm_name, vm_type, create_date, created_by_user_name as user_name, created_by_user_id from v3_4_latest_configuration_vms;' | less -S

                vm_id                 | vm_name | vm_type |        create_date         | user_name |          created_by_user_id          
--------------------------------------+---------+---------+----------------------------+-----------+--------------------------------------
 6c1ea823-c98b-4c68-b3fd-728369646c42 | VM-0    |       0 | 2014-03-12 11:51:05.241+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
 16224285-996f-454e-8ca6-3c37a2772078 | VM-1    |       0 | 2014-03-12 11:51:10.927+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
 b595a533-0d47-4fd6-850d-a4c1e1d4a803 | VM-2    |       0 | 2014-03-12 11:51:13.897+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
 50773bae-72ab-46f2-80ce-ab487a9e6afe | VM-3    |       0 | 2014-03-12 11:51:16.341+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
 972e6aca-b34b-4043-b95c-4db52816df7b | VM-4    |       0 | 2014-03-12 11:51:18.692+02 | admin     | fdfc627c-d875-11e0-90f0-83df133b58cc
(5 rows)

Comment 8 errata-xmlrpc 2014-06-09 15:16:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-0601.html