Bug 484665 - THe <clock offset='localtime'/> is not honoured for RHEL-5 Xen
THe <clock offset='localtime'/> is not honoured for RHEL-5 Xen
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Daniel Veillard
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-09 07:53 EST by Daniel Berrange
Modified: 2009-12-14 16:23 EST (History)
10 users (show)

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


Attachments (Terms of Use)
Set localtime at top level of SEXPR (7.65 KB, patch)
2009-03-31 10:00 EDT, Daniel Berrange
no flags Details | Diff

  None (edit)
Description Daniel Berrange 2009-02-09 07:53:51 EST
Description of problem:
Create a guest config with /etc/xen/demo with 'localtime=1', this translated to the XML <clock offset='localtime'/>

If you start this guest with 'xm create', the guest's BIOS clock is synced to localtime. If you start the guest with 'virsh start' the guest's BIOS clock is still synced to UTC

This is a regression which appears to have been related to the rebase of QEMU in RHEL-5.1 xen. 

Previously the XenD SEXPR wanted '(localtime 1)' inside the image/hvm part of the SEXPR. THis is still allowed, but the QEMU code for using this is stubbed out to a no-op, and QEMU actually initializes its BIOS clock via a hypercall.

The hypervisor is setup with an RTC offset based off the '(localtime 1)' setting at the top level of the SEXPR.

libvirt needs to be updated to set '(localtime 1)' at both the top level, and within the image/hvm section. It should also do it for PV and HVM, not just HVM.


Version-Release number of selected component (if applicable):
libvirt-0.3.3-14.el5

How reproducible:
Always

Steps to Reproduce:
1. Configure host with BIOS in UTC, and timezone set to EST
2. Boot guest with virsh start, with localtime=1 in /etc/xen/demo
3. Login to guest and run 'date -u'
  
Actual results:
The BIOS clock is still UTC

Expected results:
The BIOS clock is synced to EST

Additional info:
Comment 1 RHEL Product and Program Management 2009-02-09 08:22:34 EST
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.
Comment 2 Matthew Kent 2009-02-18 14:40:40 EST
Just spent an hour chasing this one around, please fix.
Comment 5 Daniel Berrange 2009-03-31 10:00:04 EDT
Created attachment 337305 [details]
Set localtime at top level of SEXPR

Posted upstream

http://www.redhat.com/archives/libvir-list/2009-March/msg00501.html
Comment 6 Daniel Veillard 2009-06-05 14:47:10 EDT
That patch was actually included as part of the 0.6.3 rebase, so the fix
is in the current build,

Daniel
Comment 9 Nan Zhang 2009-06-08 03:24:25 EDT
Configure host with BIOS in UTC, and timezone set to EST.

Host:

# virsh list --all
 Id Name                 State
----------------------------------
  0 Domain-0             running
  2 demo                 shut off
  - foo1                 shut off

# virsh edit demo
Domain demo XML configuration not changed.

# virsh start demo
Domain demo started

# date
Sun Jun  7 18:16:32 EST 2009

Guest:

# date -u
Sun Jun  7 18:16:57 UTC 2009


This bug was fixed, verified with libvirt 0.6.3-6 on RHEL-5.4
Comment 10 Stefan Neufeind 2009-07-16 05:12:24 EDT
Experiencing the same problem with libvirt on RHEL-5.3 it seems (using Xen HVM for running Windows). Assuming that the patch might fix the problem at hand here as well, could this be integrated for 5.3 as a backport? I assume nobody yet used "localtime" on 5.3 or he suffered the same problems we see - so I don't really see this a "compatibility-break" but a badly needed fix.
Comment 11 Chris Lalancette 2009-07-16 05:53:04 EDT
(In reply to comment #10)
> Experiencing the same problem with libvirt on RHEL-5.3 it seems (using Xen HVM
> for running Windows). Assuming that the patch might fix the problem at hand
> here as well, could this be integrated for 5.3 as a backport? I assume nobody
> yet used "localtime" on 5.3 or he suffered the same problems we see - so I
> don't really see this a "compatibility-break" but a badly needed fix.  

If you go through your normal RedHat support channels, you can request a fix for the older RHEL releases.

Chris Lalancette
Comment 13 errata-xmlrpc 2009-09-02 05:23:17 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1269.html
Comment 14 Stefan Neufeind 2009-09-02 06:50:14 EDT
Could it be that errata-link is wrong? Returns a 404.

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