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

[Xen-devel] RE: [Xen-changelog] [xen-unstable] xend: pass-through: devic

To: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Wed, 29 Jul 2009 10:57:40 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: Simon Horman <horms@xxxxxxxxxxxx>
Delivery-date: Tue, 28 Jul 2009 19:59:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200907281610.n6SGAcxZ010950@xxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200907281610.n6SGAcxZ010950@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcoPnkKvRJO7Uaz1ROyiibAgUy8NqwAWS2Lg
Thread-topic: [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null
Hi Tom and Simon,
The patch looks like a workaround to me.
Could you please explain under what condition the state may be null?

On my host I don't meet with the issue, but I did hear the same issue on some 
host and I would look into it when the host is available for me.

Thanks,
-- Dexuan

-----Original Message-----
From: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx 
[mailto:xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Xen 
patchbot-unstable
Sent: 2009?7?29? 0:11
To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: pass-through: device state in 
xenstore may be null

# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1248795146 -3600
# Node ID 0c7a560822d9d9516dfc83cef6fceec944fd97a8
# Parent  6120f7a92d82ccb1747feffa1a72eb704e642fb0
xend: pass-through: device state in xenstore may be null

Signed-off-by: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>
---
 tools/python/xen/xend/server/pciif.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r 6120f7a92d82 -r 0c7a560822d9 tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py     Tue Jul 28 16:28:21 2009 +0100
+++ b/tools/python/xen/xend/server/pciif.py     Tue Jul 28 16:32:26 2009 +0100
@@ -489,7 +489,11 @@ class PciController(DevController):
         num_devs = int(self.readBackend(devid, 'num_devs'))
         new_num_devs = 0
         for i in range(num_devs):
-            state = int(self.readBackend(devid, 'state-%i' % i))
+            try:
+                state = int(self.readBackend(devid, 'state-%i' % i))
+            except:
+                state = xenbusState['Unknown']
+
             if state == xenbusState['Closing']:
                 # Detach I/O resources.
                 pci_dev = parse_pci_name(self.readBackend(devid, 'dev-%i' % i))

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

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

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