From: Kouya Shimura Subject: [PATCH] hotplug: ignore xenstore-read error Date: Tue, 16 Feb 2010 16:32:29 +0900 Message-ID: <7kljetab5b.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="IHaVrG6fbs" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --IHaVrG6fbs Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit 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//*" 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 --IHaVrG6fbs Content-Type: text/x-patch Content-Disposition: inline; filename="hotplug.patch" Content-Transfer-Encoding: 7bit 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' ] --IHaVrG6fbs Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --IHaVrG6fbs--