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] [PATCH] hotplug: ignore xenstore-read error

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] hotplug: ignore xenstore-read error
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Tue, 16 Feb 2010 16:32:29 +0900
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 15 Feb 2010 23:33:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
A guest occasionally fails to reboot. xend.log shows:

[2010-02-16 09:52:46 5413] ERROR (XendDomainInfo:2061) Failed to restart domain 
82.
Traceback (most recent call last):
  File "usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 
2047, in _restart
    new_dom.waitForDevices()
  File "usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 
1068, in waitForDevices
    self.getDeviceController(devclass).waitForDevices()
  File "usr/lib64/python2.4/site-packages/xen/xend/server/DevController.py", 
line 140, in waitForDevices
    return map(self.waitForDevice, self.deviceIDs())
  File "usr/lib64/python2.4/site-packages/xen/xend/server/DevController.py", 
line 164, in waitForDevice
    raise VmError("Device %s (%s) could not be connected. "
VmError: Device 51712 (tap) could not be connected. xenstore-read 
backend/tap/82/51712/params failed.


The failure to read "backend/tap/<domid>/*" in the xenstore is a usual
case since the domain is gone after xenstore-ls command is executed.
The error should be ignored.

This patch should be applied to xen-3.4 too.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r 3a0bd7ca6b11 tools/hotplug/Linux/blktap
--- a/tools/hotplug/Linux/blktap        Mon Feb 15 17:54:04 2010 +0000
+++ b/tools/hotplug/Linux/blktap        Tue Feb 16 15:33:58 2010 +0900
@@ -23,7 +23,7 @@ check_blktap_sharing()
     do
         for dev in $(xenstore-list "$base_path/$dom")
         do
-            params=$(xenstore_read "$base_path/$dom/$dev/params" | cut -d: -f2)
+            params=$(xenstore_read_default "$base_path/$dom/$dev/params" "" | 
cut -d: -f2)
             if [ "$file" = "$params" ]
             then
 
@@ -35,7 +35,7 @@ check_blktap_sharing()
                         return
                     fi
                 else 
-                    local m=$(xenstore_read "$base_path/$dom/$dev/mode")
+                    local m=$(xenstore_read_default 
"$base_path/$dom/$dev/mode" "")
                     m=$(canonicalise_mode "$m")
 
                     if [ "$m" = 'w' ] 
diff -r 3a0bd7ca6b11 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block Mon Feb 15 17:54:04 2010 +0000
+++ b/tools/hotplug/Linux/block Tue Feb 16 15:33:58 2010 +0900
@@ -100,7 +100,7 @@ check_sharing()
             return
           fi
         else
-          local m=$(xenstore_read "$base_path/$dom/$dev/mode")
+          local m=$(xenstore_read_default "$base_path/$dom/$dev/mode" "")
           m=$(canonicalise_mode "$m")
 
           if [ "$m" = 'w' ]
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] hotplug: ignore xenstore-read error, Kouya Shimura <=