Bug 484665 - THe <clock offset='localtime'/> is not honoured for RHEL-5 Xen
Summary: THe <clock offset='localtime'/> is not honoured for RHEL-5 Xen
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-09 12:53 UTC by Daniel Berrangé
Modified: 2009-12-14 21:23 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 09:23:17 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:1269 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2009-09-01 09:31:21 UTC

Description Daniel Berrangé 2009-02-09 12:53:51 UTC
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 Program Management 2009-02-09 13:22:34 UTC
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 19:40:40 UTC
Just spent an hour chasing this one around, please fix.

Comment 5 Daniel Berrangé 2009-03-31 14:00:04 UTC
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 18:47:10 UTC
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 07:24:25 UTC
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 09:12:24 UTC
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 09:53:04 UTC
(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 09:23:17 UTC
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 10:50:14 UTC
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.