Bug 690760

Summary: Error message in Xend log when block device hot detach with a PV guest
Product: Red Hat Enterprise Linux 5 Reporter: Yuyu Zhou <yuzhou>
Component: xenAssignee: Michal Novotny <minovotn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 5.7CC: areis, leiwang, minovotn, mrezanin, pbonzini, qwan, xen-maint
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xen-3.0.3-128.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 09:15:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
xend log
none
Patch to fix error message
none
xend log(xen128) none

Description Yuyu Zhou 2011-03-25 10:56:04 UTC
Description of problem:
Error message show up in Xend log when block device hot detach with a PV guest 

Version-Release number of selected component (if applicable):
xen-3.0.3-126.el5

How reproducible:
100%

Steps to Reproduce:
1. Start a PV guest 
2. #xm block-attach PVguest tap:aio:/url/to/img  xvdc w
3. verify if the block device created successful with 'xm block-list domain_id'
4. Then in host detatch the block device with:
xm block-detatch domain_id block_device_id

Actual results:
Error message show up when hot detach the block device.

Expected results:
Device can be hot attached and detached without error

Addition Info:
It is fine in xen-3.0.3-120.el5.

Comment 1 Yuyu Zhou 2011-03-25 10:57:13 UTC
Created attachment 487520 [details]
xend log

Comment 2 Miroslav Rezanina 2011-03-25 15:11:25 UTC
Is the device detached when this message is in log?

Comment 3 Yuyu Zhou 2011-03-28 01:06:54 UTC
Yes, the device can be attached and detached well. And the error message is shown when I try to detach the device.

Comment 4 Miroslav Rezanina 2011-03-28 04:47:39 UTC
Ok, so the problem is only in way lock file removing failure is logged.

Comment 6 Michal Novotny 2011-03-30 12:43:31 UTC
Created attachment 488750 [details]
Patch to fix error message

This is the patch to fix the error message to just output a simple line on the debug level instead of the whole exception traceback.

Michal

Comment 8 Miroslav Rezanina 2011-04-13 09:02:13 UTC
Fix built into xen-3.0.3-128.el5

Comment 10 Yuyu Zhou 2011-04-20 05:05:14 UTC
On xen-3.0.3-128.el5, after hot-unplug the block device of PV guest, the Error Message changed into:

[2011-04-20 00:58:24 xend 32546] DEBUG (DevController:96) Lock not acquired, cannot release

I am not sure about it.

Comment 11 Yuyu Zhou 2011-04-20 05:07:05 UTC
Created attachment 493359 [details]
xend log(xen128)

Comment 12 Miroslav Rezanina 2011-04-20 06:24:47 UTC
(In reply to comment #10)
> On xen-3.0.3-128.el5, after hot-unplug the block device of PV guest, the Error
> Message changed into:
> 
> [2011-04-20 00:58:24 xend 32546] DEBUG (DevController:96) Lock not acquired,
> cannot release
> 
> I am not sure about it.

This is ok. In some cases, we try to release lock that was already released. This is just information message without any consequences and expected behavior. You can mark this bz as VERIFIED.

Comment 13 Yuyu Zhou 2011-04-20 06:49:01 UTC
reproduced on xen-3.0.3-126.el5, after hot-detach a block device on PV guest, error message like following shows in xend.log:

[2011-04-20 00:57:19 xend 32223] ERROR (DevController:95) Cannot release lock: [Errno 2] No such file or directory: '/var/run/xen-hotplug/dev-create-85-tap-51728'
Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/xen/xend/server/DevController.py", line 93, in releaseLock
    os.unlink(lockfile)
OSError: [Errno 2] No such file or directory: '/var/run/xen-hotplug/dev-create-85-tap-51728'

Verified on xen-3.0.3-128.el5, after hot-detach a block device on PV guest,
No such error message exists any more.

Comment 14 errata-xmlrpc 2011-07-21 09:15:38 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1070.html

Comment 15 errata-xmlrpc 2011-07-21 12:08:23 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1070.html