Bug 1281871 - [admin portal] Actual timezone in the guest differs tooltip / Rename 'Time Zone' in VM -> System -> General dialog to 'RTC time'
[admin portal] Actual timezone in the guest differs tooltip / Rename 'Time Zo...
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin (Show other bugs)
3.6.0.2
Unspecified Unspecified
medium Severity low with 2 votes (vote)
: ovirt-3.6.5
: 3.6.5
Assigned To: Vinzenz Feenstra [evilissimo]
Jiri Belka
:
Depends On:
Blocks: 1334781
  Show dependency treegraph
 
Reported: 2015-11-13 11:27 EST by Jiri Belka
Modified: 2016-05-13 03:15 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-21 10:43:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.6.z+
mgoldboi: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)
screenshot (199.17 KB, image/png)
2015-11-13 11:27 EST, Jiri Belka
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 53754 master MERGED frontend: Only warn on timezone difference for Windows VMs 2016-02-19 10:37 EST
oVirt gerrit 53756 master MERGED frontend: Change VM Time Zone display string to 'Hardware Clock Time Offset' 2016-02-22 06:11 EST
oVirt gerrit 53783 ovirt-engine-3.6 MERGED frontend: Only warn on timezone difference for Windows VMs 2016-02-22 06:17 EST
oVirt gerrit 53791 ovirt-engine-3.6 MERGED frontend: Change VM Time Zone display string to 'Hardware Clock Time Offset' 2016-02-23 04:57 EST

  None (edit)
Description Jiri Belka 2015-11-13 11:27:22 EST
Created attachment 1093726 [details]
screenshot

Description of problem:

Actual timezone in the guest differs from the configuration tooltip [!] / Rename 'Time Zone' in VM -> System -> General dialog to 'RTC time'.

The title ('Time Zone', location described above) is not a timezone but the time which will be passed to qemu-kvm.

* qemu-kvm option for RHEL based VM

~~~
# ps aux | grep 'qemu-kvm.*jb-test' | grep -oE '\-rtc base[^ ]*'
-rtc base=2015-11-13T15:51:34,driftfix=slew
~~~

* info from GA

~~~
        guestTimezone = {'zone': 'Europe/Prague', 'offset': 60}
~~~

For the above VM the "Time Zone" (RTC) is:

'(GMT+00:00) GMT Standard Time'

Inside guest OS (RHEL) I have timezone set to Europe/Prague but hwclock is GMT.

The confusion between RTC and timezone causes odd tooltip (screenshot) informing that there's timezone difference between configuration in engine (db) and guest OS.

Usually UNIX/Linux OS have hwclock set to UTC and then userland uses TZ to define timezone. There's nothing wrong to have hwclock and TZ differ.

This issue is related to Windows only which used (now there's registry option) to expect hwclock is equal timezone of OS, thus it is called localtime.

Thus:

- this check is odd for non-Windows VM
- title of option in UI should not be 'Time Zone'

Version-Release number of selected component (if applicable):
rhevm-backend-3.6.0.3-0.1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. install rhel 6 vm with guest agent
2. check admin portal if there is timezone tooltip (see screenshot) info
3.

Actual results:
- useless warning about hwclock/guest os TZ difference for Linux VMs
- confusing option name ('Time Zone') in VM configuration dialog

Expected results:
- no warning about difference between 'rtc base' time set for Linux VM when started and guest OS TZ
- (if you want to compare anything for Linux VMs then it should be rtc base for qemu-kvm + uptime vs. hwclock inside guest OS)
- more clear option name instead of 'Time Zone'

Additional info:

‘-rtc [base=utc|localtime|date][,clock=host|vm][,driftfix=none|slew]’

    Specify ‘base’ as utc or localtime to let the RTC start at the current UTC or local time, respectively. localtime is required for correct date in MS-DOS or Windows. To start at a specific point in time, provide date in the format 2006-06-17T16:01:21 or 2006-06-17. The default base is UTC.

    By default the RTC is driven by the host system time. This allows to use the RTC as accurate reference clock inside the guest, specifically if the host time is smoothly following an accurate external reference clock, e.g. via NTP. If you want to isolate the guest time from the host, even prevent it from progressing during suspension, you can set ‘clock’ to vm instead.

    Enable ‘driftfix’ (i386 targets only) if you experience time drift problems, specifically with Windows’ ACPI HAL. This option will try to figure out how many timer interrupts were not processed by the Windows guest and will re-inject them.
Comment 1 John Florian 2015-12-26 14:20:10 EST
I can confirm this problem.  My oVirt admin portal shows exclamation points next to each Linux VM and the tooltip states "Actual timezone in the guest differs from the configuration".  I see "(GMT+00:00) GMT Standard Time" for Edit Virtual Machine > System > Time Zone.  Within the same guest I see:

$ timedatectl
      Local time: Sat 2015-12-26 14:18:48 EST
  Universal time: Sat 2015-12-26 19:18:48 UTC
        RTC time: Sat 2015-12-26 19:18:47
       Time zone: America/Detroit (EST, -0500)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: no
 Last DST change: DST ended at
                  Sun 2015-11-01 01:59:59 EDT
                  Sun 2015-11-01 01:00:00 EST
 Next DST change: DST begins (the clock jumps one hour forward) at
                  Sun 2016-03-13 01:59:59 EST
                  Sun 2016-03-13 03:00:00 EDT

I would assume that "RTC in local TZ: no" is effectively the same as saying the RTC is UTC/GMT.
Comment 2 Jiri Belka 2016-04-18 09:46:22 EDT
ok, rhevm-backend-3.6.5.3-0.1.el6.noarch

- for linux:

no [!] warning in Admin Portal.

# ps aux | grep 'qemu-kvm.*rhel' | grep -oE '\-rtc base[^ ]*'
-rtc base=2016-04-18T13:12:45,driftfix=slew

# timedatectl 
      Local time: Mon 2016-04-18 15:15:44 CEST
  Universal time: Mon 2016-04-18 13:15:44 UTC
        RTC time: Mon 2016-04-18 13:15:43
        Timezone: Europe/Prague (CEST, +0200)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2016-03-27 01:59:59 CET
                  Sun 2016-03-27 03:00:00 CEST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2016-10-30 02:59:59 CEST
                  Sun 2016-10-30 02:00:00 CET

- windows (default engine TZ, UTC inside OS)

no [!] warning in Admin Portal.

- windows (default engine TZ, Europe/Prague TZ inside OS)

[!] warning present in Admin Portal

- windows ('Central European Standard Time' TZ in engine, Europe/Prague TZ inside OS)

# env TZ=CET-1CEST,M3.5.0,M10.5.0/3 date
Mon Apr 18 15:36:55 CEST 2016

# ps aux | grep 'qemu-kvm.*jb-w7-x86' | grep -oE '\-rtc base[^ ]*'
-rtc base=2016-04-18T15:35:53,driftfix=slew

no [!] warning in Admin Portal

- windows ('Central European Standard Time' TZ in engine, Jerusalem TZ inside OS)

[!] warning present in Admin Portal
Comment 3 Jiri Belka 2016-04-18 09:47:45 EDT
And in Admin Portal "TZ" is now renamed to 'Hardware Clock Time Offset' thus OK too.

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