WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xm list triggers shutdown refreshing

To: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xm list triggers shutdown refreshing
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Fri, 5 Jan 2007 15:13:07 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 05 Jan 2007 07:11:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070105123630.GD2733@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070104193042.GB2344@xxxxxxxxxxxxxxxxxxxxxxx> <20070105123630.GD2733@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Fri, Jan 05, 2007 at 12:36:30PM +0000, Ewan Mellor wrote:

> > xm list -> XendDomain:list_sorted() -> XendDomain:list() ->
> > XendDomain:_refresh() -> XendDomainInfo:update(refresh = True)
> > 
> > Surely such non-modifying commands should not be altering state? Why
> > aren't we passing in refresh = False in these cases?
> 
> Yes, you're right, we should.  There's a patch on its way.

Great.

> > This is a nasty problem if (say) dumpCore fails: every time we try to xm
> > list, then it will 'notice' that the domain is in the crashed state, try
> > to dump core, fail and plop that error back to 'xm list'.
> 
> This is still a problem, regardless -- that function will be called every time
> a domain starts or stops, so you will still get multiple attempts to dump
> core.  Could you spin a patch to record the failure in the store, so that we
> don't try and dump core again?

Hmm, for this specific case, isn't it better to catch the exception from
dumpCore and continue? i.e. something like:

                if xoptions.get_enable_dump():
                    try:
                        self.dumpCore()
                    except XendError x:
                        pass

                restart_reason = 'crash'
                self._stateSet(DOM_STATE_HALTED)

BTW:

    def dumpCore(self, corefile = None):
        """Create a core dump for this domain.  Nothrow guarantee."""
                                                ^^^^^^^^^^^^^^^^^

hmm :)

regards
john

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>