Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1685110 - Error inserting event into audit_log when VM template name is bigger than 40 characters
Summary: Error inserting event into audit_log when VM template name is bigger than 40 ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Database.Core
Version: 4.3.0
Hardware: x86_64
OS: Linux
unspecified
medium vote
Target Milestone: ovirt-4.3.3
: ---
Assignee: Dana
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks: 1688782
TreeView+ depends on / blocked
 
Reported: 2019-03-04 11:36 UTC by Ilan Zuckerman
Modified: 2019-04-16 13:58 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.3.3.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1688782 (view as bug list)
Environment:
Last Closed: 2019-04-16 13:58:11 UTC
oVirt Team: Infra
pm-rhel: ovirt-4.3+
lleistne: testing_ack+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 98438 master MERGED engine: set vm_template_name num of chars in audit_log table 2019-03-13 08:25:28 UTC

Description Ilan Zuckerman 2019-03-04 11:36:44 UTC
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.

Comment 2 Martin Perina 2019-03-05 13:50:58 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

Comment 3 Ilan Zuckerman 2019-03-05 14:20:19 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.

Comment 4 Dana 2019-03-11 10:32:13 UTC
Wasn't able to reproduce, but added a fix that should solve this issue

Comment 6 Lucie Leistnerova 2019-03-29 14:02:13 UTC
Template with long name from VM with long name successfully created with no error in log (on updated and clean install). Appropriate events visible. 

verified in ovirt-engine-4.3.3.1-0.1.el7.noarch

Comment 7 Sandro Bonazzola 2019-04-16 13:58:11 UTC
This bugzilla is included in oVirt 4.3.3 release, published on April 16th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.3 release, it has been closed with a resolution of CURRENT RELEASE.

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


Note You need to log in before you can comment on or make changes to this bug.