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

Bug 1688782

Summary: [downstream clone - 4.2.9] Error inserting event into audit_log when VM template name is bigger than 40 characters
Product: Red Hat Enterprise Virtualization Manager Reporter: RHV bug bot <rhv-bugzilla-bot>
Component: ovirt-engineAssignee: Dana <delfassy>
Status: CLOSED NEXTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: bugs, lleistne, lsvaty, mgoldboi, mperina, ratamir, Rhev-m-bugs
Target Milestone: ovirt-4.2.9Keywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1685110 Environment:
Last Closed: 2019-04-04 12:16:13 UTC Type: ---
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: 1685110    
Bug Blocks:    

Description RHV bug bot 2019-03-14 12:35:21 UTC
+++ This bug is an upstream to downstream clone. The original bug is: +++
+++   bug 1685110 +++
======================================================================

Description of problem:
When creating template out of vm, the following error is seen in engine.log :

"2019-03-03 22:08:33,129Z ERROR [org.ovirt.engine.core.bll.RemoveVmTemplateCommand] (default task-16) [f914a19b-9cc5-4ca0-be85-d6d113877e0f] Error during log command: org.ovirt.engine.core.bll.RemoveVmTemplateCommand. Exception CallableStatementCallback; SQL [{call insertauditlog(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}ERROR: value too long for type character varying(40)"

Full error can be found here:
https://paste.fedoraproject.org/paste/ZLROkxCytAAUHiest5ys8w

However, the template is being created despite this ERROR.

Version-Release number of selected component (if applicable):
ovirt-engine-4.3.1.1-0.1.el7.noarch

rpm -qa | grep rhv-release
rhv-release-4.3.1-3-001.noarch

Lab Topology using Hosted Engine:
9 DC and 9 Clusters
536 Hosts  of which 35 real servers and 501 nested hosts

11  Storage Domains composed of:
7 FC Domains
2 ISCSI Domains
2 NFS Domains (Export + Data)

4091 VMS are up

Hosted Engine running on dedicated host:  24vcpu with 32GB ram

How reproducible:
Always

Steps to Reproduce:
1. Create template out of VM with the following details:
"Thin disk:   20 GB (os) 
Data disk:   100 GB  raw 50% utilization)
           
direct luns: 0
snapsots: 0
Mem size: "4096 MB
Mem Max size: 4096 MB
Mem Guaranteed: 4096 MB"
cores 2
cores per socket: 1
threads per core: 1
Optimized for Server: Y
I/O Threads Enabled: TRUE
"Network Interfaces: 2


Actual results:
The template is being created, but exception can be seen in engine.log

Expected results:
There should be no errors


Additional info:
log collector files are in Gmail location attached in private message below.
They include HE vm, and both VDSM hosts from ISCSI cluster.

(Originally by Ilan Zuckerman)

Comment 3 RHV bug bot 2019-03-14 12:35:24 UTC
It seems that either template name or storage pool name exceeded 40 characters, so let's align those sizes in audit_log table with maximum allowed size of name in relevant table

(Originally by Martin Perina)

Comment 4 RHV bug bot 2019-03-14 12:35:26 UTC
(In reply to Martin Perina from comment #2)
> It seems that either template name or storage pool name exceeded 40
> characters, so let's align those sizes in audit_log table with maximum
> allowed size of name in relevant table

The template name is less than 40 chars for sure.
I am almost sure that the storage pool as well.

(Originally by Ilan Zuckerman)

Comment 5 RHV bug bot 2019-03-14 12:35:27 UTC
Wasn't able to reproduce, but added a fix that should solve this issue

(Originally by Dana Elfassy)

Comment 6 Martin Perina 2019-04-04 12:16:13 UTC
There will be no more RHV 4.2.z releases, so closing this one as NEXTRELEASE as this is fixed in RHV 4.3