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] XenDomainInfo.py: Can hang in _releaseDevices.

To: "Petersson, Mats" <Mats.Petersson@xxxxxxx>, "xen devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] XenDomainInfo.py: Can hang in _releaseDevices.
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Mon, 14 May 2007 15:52:28 +0200
Delivery-date: Mon, 14 May 2007 06:51:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0B018E1D05@xxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AceWKlV1RY33IpcAR/Ww59bULilUvgABFOmQ
Thread-topic: [Xen-devel] XenDomainInfo.py: Can hang in _releaseDevices.
Attached patch fixes the problem I described a while back where some
"stuff" gets left in xenstore when a domain is destroyed, and also fixes
the below described hang case by trying 100 times before it gives up. 

This may not be the right way to fix this, so I'm happy to fix/update as
necessary. [This is also my first "python patch" where code is added, so
excuse me if there's something wrong there...]

Signed off by: mats.petersson@xxxxxxx

--
Mats

> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Petersson, Mats
> Sent: 14 May 2007 14:18
> To: xen devel
> Subject: [Xen-devel] XenDomainInfo.py: Can hang in _releaseDevices.
> 
> A section of code does: 
> 
>          while True:
>             t = xstransact("%s/device" % self.dompath)
>             for devclass in XendDevices.valid_devices():
>                 for dev in t.list(devclass):
>                     try:
>                         t.remove(dev)
>                     except:
>                         # Log and swallow any exceptions in removal --
>                         # there's nothing more we can do.
>                         log.exception(
>                            "Device release failed: %s; %s; %s",
>                            self.info['name_label'], devclass, dev)
>             if t.commit():
>                 break
> 
> If commit() doesn't work because (for example) the device has already
> been removed or not correctly created, it will hang xend forever. [I
> managed to create such a case when adding some extra case to 
> remove some
> other stuff]. 
> 
> Wouldn't it be a good idea to make a "best attempt" of doing 
> this, say,
> 10 or 100 times, then give up?
> 
> --
> Mats
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 
> 
> 

Attachment: patch.remove_console_backpath
Description: patch.remove_console_backpath

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>