Bug 1015049 - [rhevm] Backend - Error importing old template (WinXP & RHEL)
Summary: [rhevm] Backend - Error importing old template (WinXP & RHEL)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Martin Betak
QA Contact: Ilanit Stein
URL:
Whiteboard: virt
Depends On:
Blocks: 1019461 3.3snap2
TreeView+ depends on / blocked
 
Reported: 2013-10-03 11:28 UTC by David Botzer
Modified: 2018-12-06 15:21 UTC (History)
9 users (show)

Fixed In Version: is21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine-log (23.59 KB, application/x-gzip)
2013-10-03 11:28 UTC, David Botzer
no flags Details
vdsm (1006.37 KB, application/x-gzip)
2013-10-03 11:29 UTC, David Botzer
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 19987 0 None None None Never
oVirt gerrit 20292 0 None None None Never

Description David Botzer 2013-10-03 11:28:03 UTC
Created attachment 807016 [details]
engine-log

Description of problem:
1. I get error when I import WinXP template (prior to IS16)
2. I cannot start VM created RHEL template (prior to IS16)

Version-Release number of selected component (if applicable):
3.3/is17.1

How reproducible:
always

Steps to Reproduce:
1.Import WinXP template created on 3.2 or 3.3 first builds
2.Create VM from the RHEL template & start it

Actual results:
1. I get error when I import WinXP template
2. I cannot start VM created RHEL template 

Expected results:
Should work correctly

Additional info:
WinXP error ->
2013-10-02 11:30:37,646 WARN
[org.ovirt.engine.core.bll.ImportVmTemplateCommand]
(ajp-/127.0.0.1:8702-3) [6130308e] CanDoAction of action
ImportVmTemplate failed.
Reasons:VAR__ACTION__COPY,VAR__TYPE__VM_TEMPLATE,ACTION_TYPE_FAILED_INVALID_TIMEZONE


RHEL Error ->
2013-10-03 13:04:31,763 ERROR [org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo] (DefaultQuartzScheduler_Wo
rker-28) Rerun vm 0a0c8416-1453-4438-bc71-cdd0cbedd71b. Called from vds south-08.lab.bos.redhat.com
2013-10-03 13:04:31,767 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (pool-5-th
read-48) Correlation ID: 71b49497, Job ID: a576c9de-d3cc-4dd7-ba1a-9748d747be15, Call Stack: null, Custom Event
 ID: -1, Message: Failed to run VM zumzum on Host south-08.lab.bos.redhat.com.
2013-10-03 13:04:31,775 INFO  [org.ovirt.engine.core.bll.RunVmCommand] (pool-5-thread-48) Lock Acquired to obje
ct EngineLock [exclusiveLocks= key: 0a0c8416-1453-4438-bc71-cdd0cbedd71b value: VM
, sharedLocks= ]

Comment 1 David Botzer 2013-10-03 11:29:42 UTC
Created attachment 807017 [details]
vdsm

Comment 2 Michal Skrivanek 2013-10-08 08:18:48 UTC
duplicate of bug 988259?

Comment 3 Martin Betak 2013-10-08 12:08:09 UTC
michal: no, actually it turns out this is bug in the template import

Comment 4 Ilanit Stein 2013-11-03 11:02:50 UTC
How this bug should be verified? 

It is not clear what used to fail the template import, before the fix.

Thanks,
Ilanit.

Comment 5 Ilanit Stein 2013-11-05 13:44:07 UTC
Is the following flow enough for verification?:

1. Create windows XP template on 3.2 rhevm.
2. Export Template.
3. Import Template in a 3.3 setup (is21).
4. Template imported successfully (Template Default Time zone = default time zone of the 3.3 rhevm, and not to the 3.2 rhevm).

Comment 6 Martin Betak 2013-11-06 16:51:11 UTC
Hi Ilanit,

The bug was that when you imported the VM, the time_zone field in the vm_static table was set to empty string '' instead of NULL. This bug usually manifests itself in the UI when you try to edit properties of running VM (e.g. description) you get an error "Invalid update" related to the time zone field.

Normally it should be enough to verify you have no records in vm_static with time_zone = '' (all default time zones should be now represented as NULL). For further verification you can try to run this imported VM and check if you can change its description.

Comment 7 Ilanit Stein 2013-11-12 16:30:58 UTC
Tested on is22.

Found that vm_static table contain empty time_zone for all vms, including the imported VM:
engine=# SELECT time_zone, vm_guid FROM vm_static;
 time_zone |               vm_guid                
-----------+--------------------------------------
           | 00000000-0000-0000-0000-000000000000
           | a2454443-4681-4236-9aab-42127548bc59
           | 746ec97e-9a91-4e39-8a0a-632508e051c4
           | f8842cc6-3928-4470-b9cd-706dc5fadd1c
           | d1c706fe-831b-4901-9ab7-1de2eec93d24
           | 11c84a8d-71ff-4030-9edf-5b21935089b0
           | 098be9be-d059-45dc-ba24-f999e91ce699
           | 818775fc-e429-4179-9075-57296f3dab2c
           | 9138af3d-9cb3-4cde-9f0b-375f499d9cfe
           | 3e624912-2534-44af-9dfb-5cf5a527f515
(10 rows)

Run imported VM worked fine. Changing it's description (after moving VM to down) also worked fine.

Martin,
Can you please confirm this verification?

Thanks,
Ilanit.

Comment 8 Martin Betak 2013-11-12 16:43:48 UTC
Hi Ilanit,

from plain select you cannot 'visually' differentiate between NULL and ''.
Please try query 
# SELECT time_zone, vm_guid FROM vm_static WHERE time_zone = '';
this query should return 0 rows whereas the query 
# SELECT time_zone, vm_guid FROM vm_static WHERE time_zone IS NULL; 
should return the exact same rows as your select.

Best regards

Martin

Comment 9 Ilanit Stein 2013-11-13 07:46:23 UTC
thanks Martin!


Verified on IS22:

Completed the last step verification (in addition to comment #7):
 
engine=# SELECT time_zone, vm_guid FROM vm_static WHERE time_zone = '';
 time_zone | vm_guid 
-----------+---------
(0 rows)

engine=# SELECT time_zone, vm_guid FROM vm_static WHERE time_zone IS NULL;
 time_zone |               vm_guid                
-----------+--------------------------------------
           | 00000000-0000-0000-0000-000000000000
           | a2454443-4681-4236-9aab-42127548bc59
           | 746ec97e-9a91-4e39-8a0a-632508e051c4
           | f8842cc6-3928-4470-b9cd-706dc5fadd1c
           | d1c706fe-831b-4901-9ab7-1de2eec93d24
           | 11c84a8d-71ff-4030-9edf-5b21935089b0
           | 098be9be-d059-45dc-ba24-f999e91ce699
           | 818775fc-e429-4179-9075-57296f3dab2c
           | 9138af3d-9cb3-4cde-9f0b-375f499d9cfe
           | 3e624912-2534-44af-9dfb-5cf5a527f515
(10 rows)

Comment 11 Itamar Heim 2014-01-21 22:27:33 UTC
Closing - RHEV 3.3 Released

Comment 12 Itamar Heim 2014-01-21 22:27:47 UTC
Closing - RHEV 3.3 Released

Comment 13 Itamar Heim 2014-01-21 22:30:38 UTC
Closing - RHEV 3.3 Released


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