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-api

[Xen-API] [Project Kronos] Possible bug in pbd-unplug for lvm based SRs?

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [Project Kronos] Possible bug in pbd-unplug for lvm based SRs?
From: Errol Neal <eneal@xxxxxxxxxxxxxxxxx>
Date: Tue, 23 Aug 2011 16:21:02 -0400
Delivery-date: Tue, 23 Aug 2011 13:22:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Importance: Normal
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Reply-to: eneal@xxxxxxxxxxxxxxxxx
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Hi. When unplugging an pbd, seems like dmsetup remove is run which runs 
successfully, however LVHDSR.detach reports a failure:

LVHDSR.detach: failed to remove the symlink for file 
/dev/mapper/VG_XenStorage--36659c63--3de9--2180--3697--dda90a0de303-MGT. Error: 
[Errno 2] No such file or directory: 
'/dev/VG_XenStorage-36659c63-3de9-2180-3697-dda90a0de303/MGT'

And I get an error:

root@squeeze:/usr/lib/xen-common/xapi/sm# xe pbd-unplug 
uuid=f4f71420-44f4-8b2d-6b84-301cbb13c2b9
The server failed to handle your request, due to an internal error.  The given 
message may give details useful for debugging the problem.
message: Failure("Storage_access failed with: SR_BACKEND_FAILURE: [ non-zero 
exit; ; /usr/lib/xen-common/xapi/sm/util.py:17: DeprecationWarning: The popen2 
module is deprecated.  Use the subprocess module.\n  import os, re, sys, 
popen2, subprocess\nTraceback (most recent call last):\n  File 
\"/usr/lib/xen-common/xapi/sm/LVMSR\", line 1959, in <module>\n    
SRCommand.run(LVHDSR, DRIVER_INFO)\n  File 
\"/usr/lib/xen-common/xapi/sm/SRCommand.py\", line 252, in run\n    ret = 
cmd.run(sr)\n  File \"/usr/lib/xen-common/xapi/sm/SRCommand.py\", line 94, in 
run\n    return self._run_locked(sr)\n  File 
\"/usr/lib/xen-common/xapi/sm/SRCommand.py\", line 131, in _run_locked\n    
return self._run(sr, target)\n  File 
\"/usr/lib/xen-common/xapi/sm/SRCommand.py\", line 232, in _run\n    return 
sr.detach(self.params['sr_uuid'])\n  File 
\"/usr/lib/xen-common/xapi/sm/LVMSR\", line 579, in detach\n    raise 
Exception(\"SR detach failed, please refer to the log \" \\\nException: SR 
detach failed, please refer to the log for details.\n ]")

Since lvutil.py runs dmsetup already, the symlink for the MGT volume disappears 
and when LVHDSR.detach runs, there isn't anything to unlink. Adding a condition 
to check for the existence of the symlink in LVHDSR.py is a workaround for me. 
Just so I don't have to run it twice (xe pbd-unplug)

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [Project Kronos] Possible bug in pbd-unplug for lvm based SRs?, Errol Neal <=