Bug 1015049 - [rhevm] Backend - Error importing old template (WinXP & RHEL)
[rhevm] Backend - Error importing old template (WinXP & RHEL)
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.3.0
Assigned To: Martin Betak
Ilanit Stein
virt
:
Depends On:
Blocks: 1019461 3.3snap2
  Show dependency treegraph
 
Reported: 2013-10-03 07:28 EDT by David Botzer
Modified: 2015-09-22 09 EDT (History)
9 users (show)

See Also:
Fixed In Version: is21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 19987 None None None Never
oVirt gerrit 20292 None None None Never

  None (edit)
Description David Botzer 2013-10-03 07:28:03 EDT
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 07:29:42 EDT
Created attachment 807017 [details]
vdsm
Comment 2 Michal Skrivanek 2013-10-08 04:18:48 EDT
duplicate of bug 988259?
Comment 3 Martin Betak 2013-10-08 08:08:09 EDT
michal: no, actually it turns out this is bug in the template import
Comment 4 Ilanit Stein 2013-11-03 06:02:50 EST
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 08:44:07 EST
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 11:51:11 EST
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 11:30:58 EST
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 11:43:48 EST
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 02:46:23 EST
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 17:27:33 EST
Closing - RHEV 3.3 Released
Comment 12 Itamar Heim 2014-01-21 17:27:47 EST
Closing - RHEV 3.3 Released
Comment 13 Itamar Heim 2014-01-21 17:30:38 EST
Closing - RHEV 3.3 Released

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