Bug 1087917

Summary: [GUI/General sub-tab] Windows-based Template & Pool: Time Zone is blank when set to the global default
Product: Red Hat Enterprise Virtualization Manager Reporter: Pavel Novotny <pnovotny>
Component: ovirt-engine-webadmin-portalAssignee: Shahar Havivi <shavivi>
Status: CLOSED ERRATA QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: high    
Version: 3.4.0CC: ecohen, eedri, iheim, lsvaty, mavital, michal.skrivanek, rbalakri, Rhev-m-bugs, shavivi, sherold, tdosek, yeylon
Target Milestone: ---Keywords: ZStream
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: ovirt-3.5.0-alpha2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1159751 (view as bug list) Environment:
Last Closed: 2015-02-11 18:00:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1133612, 1142923, 1156165, 1159751    
Attachments:
Description Flags
screen: template with displayed blank TZ none

Description Pavel Novotny 2014-04-15 15:02:36 UTC
Created attachment 886512 [details]
screen: template with displayed blank TZ

Description of problem:
General sub-tab / "Time Zone" field for Windows-based template or VM pool is blank, when the template or pool is created with the same time zone as is the global default.
By "global default" is meant value of DefaultWindowsTimeZone in engine-config (or vdc_options DB table).

Version-Release number of selected component (if applicable):
rhevm-3.4.0-0.13.beta3.el6ev.noarch (av6)

How reproducible:
100%

Steps to Reproduce:
1. Set global time zone to Alaskan time & restart engine:
   # engine-config -s DefaultWindowsTimeZone='Alaskan Standard Time'
   # service ovirt-engine restart
2. Create new VM template and make sure it has the same time zone as is the global default (edit template -> System -> Time Zone = "default: (GMT-09:00) Alaskan Standard Time")
3. Select the template and check on the General sub-tab that the Time Zone value is displayed here.

Actual results:
The "Time Zone:" value is blank (see attached screenshot).

Expected results:
There should be displayed: "Time Zone: Alaskan Standard Time"

Additional info:

The same applies for created VM pool.

If the time zone is different from the global default, then it's displayed on the General sub-tab. E.g., edit the template TZ to a different one and it's displayed, set it back to the default and it disappears from the sub-tab.

Comment 1 Michal Skrivanek 2014-05-23 10:29:13 UTC
http://gerrit.ovirt.org/#/c/27461/ is relevant?

Comment 2 Shahar Havivi 2014-05-25 09:11:43 UTC
(In reply to Michal Skrivanek from comment #1)
> http://gerrit.ovirt.org/#/c/27461/ is relevant?
No,
It doesn't work with any default timezone in the general tab (for templates and pools).
The reason is we don't set the template timezone value unless the user explicitly set it - the default value is null and the UI code check if the value has set.

When running a VM - if the timezone is null we are setting the timezone to its default (so there is no problem here).

We have two options for the solution:
1. Set it to default if the timezone is null at the UI.
2. Set the default timezone for Template/Pool at the Engine.

Comment 3 Michal Skrivanek 2014-05-27 08:11:29 UTC
I think 2. is the best way, we want to set it to the actual value during the creation

Comment 4 Shahar Havivi 2014-05-27 10:54:10 UTC
Ok,
We need to set it in add/edit of VM, Template and Pool,
As well as adding upgrade script for objects with null value for TimeZone.

Comment 5 Lukas Svaty 2014-08-04 09:30:15 UTC
verified in ovirt-3.5.0-beta2

Comment 10 errata-xmlrpc 2015-02-11 18:00:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://rhn.redhat.com/errata/RHSA-2015-0158.html