Bug 1324780

Summary: [engine-webadmin] When importing an image as a template from Glance, if the template's name is not specified, then it is logged as <UNKNOWN>
Product: [oVirt] ovirt-engine Reporter: Elad <ebenahar>
Component: Frontend.WebAdminAssignee: Idan Shaby <ishaby>
Status: CLOSED CURRENTRELEASE QA Contact: Carlos Mestre González <cmestreg>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: acanan, amureini, bugs, ishaby, mperina, ylavi
Target Milestone: ovirt-4.0.0-rcKeywords: Reopened
Target Release: 4.0.0Flags: rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
rule-engine: devel_ack+
acanan: testing_ack+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-01 12:29:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
engine.log
none
Screenshot from events pane none

Description Elad 2016-04-07 09:35:44 UTC
Created attachment 1144638 [details]
engine.log

Description of problem:
Imported an image as a template from Glance and got the following event log:

User admin@internal successfully imported image GlanceDisk-8a240e1 as template <UNKNOWN> to domain nfs2.

We get <UNKNOWN> instead of the template name (which is specified in the import prompt).


Version-Release number of selected component (if applicable):
ovirt-engine-4.0.0-0.0.master.20160406161747.gita4ecba2.el7.centos.noarch
ovirt-engine-webadmin-portal-4.0.0-0.0.master.20160406161747.gita4ecba2.el7.centos.noarch

How reproducible:
Always

Steps to Reproduce:
1. Import an image from Glance as a template, specify a name for the template


Actual results:
The template name is <UNKNOWN>

Expected results:
Template's name should be reported correctly in the event log

Additional info:
engine.log

2016-04-06 11:50:18,483 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-8-thread-24) [227a5825] Correlation ID: fbe3e6,
 Job ID: ef78f2df-4d77-4713-b13f-d55c8e4e1dd5, Call Stack: null, Custom Event ID: -1, Message: User admin@internal successfully imported image GlanceDisk-8a240e1 as templa
te <UNKNOWN> to domain nfs2.

Comment 1 Allon Mureinik 2016-04-10 09:57:07 UTC
Idan, weren't you looking at a similar BZ already?

Comment 2 Idan Shaby 2016-04-10 10:45:05 UTC
Yes, please see Elad's comment (4) in BZ 1310642.

Comment 3 Idan Shaby 2016-05-02 09:22:59 UTC
Elad, this seems to work properly.
I've attached a screenshot of the correct event log.
And from the logs:

2016-05-02 12:13:46,010 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-8-thread-13) [692e6829] Correlation ID: 2a132649, Job ID: 50807b8a-d6a4-4909-a5d9-963e6
2d6a83a, Call Stack: null, Custom Event ID: -1, Message: User admin@internal-authz importing image new_disk_alias as template new_template_name to domain lun0.
...
2016-05-02 12:14:21,431 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-8-thread-21) [39055929] Correlation ID: 2a132649, Job ID: 50807b8a-d6a4-4909-a5d9-963e62d6a83a, Call Stack: null, Custom Event ID: -1, Message: User admin@internal-authz successfully imported image new_disk_alias as template new_template_name to domain lun0.

If you find that I am wrong, please reopen.

Comment 4 Idan Shaby 2016-05-02 09:24:29 UTC
Created attachment 1152896 [details]
Screenshot from events pane

Comment 5 Elad 2016-05-02 14:00:06 UTC
Idan, the bug is reproduced when importing a template without specifying a name.

2016-05-02 16:57:26,035 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-8-thread-28) [4b5c0ac7] Correlation ID: effbc6c, Job ID: b4108317-f109-46dd-ad19-ed1f9a02
9296, Call Stack: null, Custom Event ID: -1, Message: User admin@internal successfully imported image GlanceDisk-8a240e1 as template <UNKNOWN> to domain nfs-sanity.

Comment 6 Idan Shaby 2016-05-03 06:11:46 UTC
Well then that's a totally different story, since you asked to specify the name of the template: "Import an image from Glance as a template, specify a name for the template".(from the steps to reproduce).

The default template's name should be shown in the "Template Name" checkbox.

Comment 7 Idan Shaby 2016-05-03 06:17:26 UTC
Just to clarify, the template is created with a default name ("GlanceTemplate-8cf0dc9" for example), but it is logged (and shown in the events pane) as <UNKNOWN>.

Comment 8 Yaniv Lavi 2016-05-09 10:58:58 UTC
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.

Comment 9 Yaniv Lavi 2016-05-09 11:00:35 UTC
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.

Comment 10 Yaniv Lavi 2016-05-23 13:18:41 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 11 Yaniv Lavi 2016-05-23 13:22:47 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 12 Martin Perina 2016-06-10 15:05:00 UTC
Setting target release to 4.0.0 as it's included in today's 4.0.0.4 build

Comment 13 Carlos Mestre González 2016-07-13 10:54:50 UTC
Tested both specifying and not specifying the name, events shows the name fo the template:

importing image GlanceDisk-07f46b6 as template template_local_mixed to domain local_domain.

image GlanceDisk-07f46b6 as template GlanceTemplate-c3c5861 to domain iscsi_0.