From: Philipp Hahn Subject: [BUG] insufficient quoting between "tap-ctl list" and xend/server/BlktapController.py Date: Fri, 25 Nov 2011 17:21:08 +0100 Message-ID: <201111251721.12753.hahn@univention.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6074550851469247843==" 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" List-Id: xen-devel@lists.xenproject.org --===============6074550851469247843== Content-Type: multipart/signed; boundary="nextPart3624085.j0xhk99oQK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart3624085.j0xhk99oQK Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, I have a problem shutting down a domU with xen-4.1.2, which doesn't termina= te=20 the corresponding blktap2 process, since one (other) VM uses a image file,= =20 which contains spaces in its file name. /var/log/xen/xend-debug.log has the following information: Unhandled exception in thread started by Traceback (most recent call last): File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.p= y",=20 line 199, in finishDeviceCleanup TapdiskController.destroy(path) File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.p= y",=20 line 289, in destroy tapdisk =3D TapdiskController.fromDevice(device) File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.p= y",=20 line 278, in fromDevice TapdiskController.list()) File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.p= y",=20 line 256, in list key, value =3D pair.split('=3D') ValueError: need more than 1 value to unpack BlktapController calls "tap-ctl list", which outputs one line for each=20 process. Each line contains key=3Dvalue pairs without any quoting. # tap-ctl list | grep 'args=3D.*:.* ' pid=3D10145 minor=3D18 state=3D0 args=3Daio:/var/lib/libvirt/images/Xen Win= dows=20 drivers (gplpv 308).iso (passing the output of tap-ctl through a pipe is important, since it switch= es=20 to a different list-format when STDOUT is a tty.) BlktapController splits the output into lines using \n, then each line at e= ach=20 space, and finally each of these 'words' at the '=3D', which fails for the= =20 filename. tap-ctl should probably be changed to use some quoting when printing the=20 filename. Sincerely Philipp =2D-=20 Philipp Hahn Open Source Software Engineer hahn@univention.de Univention GmbH Linux for Your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/ --nextPart3624085.j0xhk99oQK Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAk7PwHQACgkQYPlgoZpUDjn7LACeORTtRf7B3BO/sEh9rgXnVdXi +cEAoKuJnvT9Kl7/wFT0uSCbqfJ+eWWC =us3f -----END PGP SIGNATURE----- --nextPart3624085.j0xhk99oQK-- --===============6074550851469247843== 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 --===============6074550851469247843==--