All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Lin Ming <mlin@ss.pku.edu.cn>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Teck Choon Giam <giamteckchoon@gmail.com>
Subject: Re: Upgrade from xen-4.1-testing to xen-unstable report
Date: Thu, 12 Apr 2012 15:03:01 +0100	[thread overview]
Message-ID: <1334239381.16387.106.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <1334235037.4001.3.camel@hp6530s>

On Thu, 2012-04-12 at 13:50 +0100, Lin Ming wrote:
> On Thu, 2012-04-12 at 07:08 +0000, Ian Campbell wrote:
> > On Wed, 2012-04-11 at 22:23 +0100, Teck Choon Giam wrote:
> > > Hi,
> > > 
> > > This is just my experience about issues I encountered when upgrade
> > > from xen-4.1-testing changeset 23277:80130491806f to xen-unstable
> > > changeset 25191:a95fc7decc83.
> > > 
> > > 1. Immediately after upgrade, xl list show such error:
> > > 
> > > # xl list
> > > libxl: error: libxl.c:506:libxl_list_domain: geting domain info list:
> > > Permission denied
> > > libxl_domain_infolist failed.
> > > 
> > > After a reboot, it is fine.  Any idea why such behaviour?  Imagine if
> > > there are running domUs... this might cause issues to shutdown?  I
> > > will downgrade and repeat such test to confirm.  Might be worth a note
> > > in upgrading note about this if this is intended?
> > 
> > The tools and the hypervisor are a matched pair so you would need to
> > reboot the system in order to use the new tools. This has always been
> > the case with Xen upgrades.
> > 
> > > 2. localtime setting not working.  Set to localtime=1 doesn't seems to
> > > work whereby setting rtc_timeoffset works.  Any idea?
> > 
> > I've CC'd Lin Ming who implemented both of those.
> 
> Just did a quick gdb debug, seems libxl__domain_build_info_setdefault
> was called 3 times. So below statement was executed 3 times too.
> 
> b_info->rtc_timeoffset += tm->tm_gmtoff;

Oh, that sounds like the problem. The setdefault functions are supposed
to be idempotent, IOW calling it two or more times should give the same
result as calling it just once.

I think you need to move this logic from setdefault
    if (libxl_defbool_val(b_info->localtime)) {
        time_t t;
        struct tm *tm;

        t = time(NULL);
        tm = localtime(&t);

        b_info->rtc_timeoffset += tm->tm_gmtoff;
    }

into libxl__build_pre and do that calculation on a temporary variable
whjich you pass to xc_domain_set_time_offset rather than modifying
b_info.

Ian.

  reply	other threads:[~2012-04-12 14:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 21:23 Upgrade from xen-4.1-testing to xen-unstable report Teck Choon Giam
2012-04-12  7:08 ` Ian Campbell
2012-04-12 11:44   ` Teck Choon Giam
2012-04-12 12:50   ` Lin Ming
2012-04-12 14:03     ` Ian Campbell [this message]
2012-04-12 14:42       ` Lin Ming
2012-04-12 14:50         ` Ian Campbell
2012-04-12 15:25           ` Teck Choon Giam
2012-04-12 16:27             ` Teck Choon Giam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334239381.16387.106.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=giamteckchoon@gmail.com \
    --cc=mlin@ss.pku.edu.cn \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.