All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] insufficient quoting between "tap-ctl list" and xend/server/BlktapController.py
@ 2011-11-25 16:21 Philipp Hahn
  2011-11-25 19:57 ` Philipp Hahn
  0 siblings, 1 reply; 10+ messages in thread
From: Philipp Hahn @ 2011-11-25 16:21 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com


[-- Attachment #1.1: Type: text/plain, Size: 1982 bytes --]

Hello,

I have a problem shutting down a domU with xen-4.1.2, which doesn't terminate 
the corresponding blktap2 process, since one (other) VM uses a image file, 
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.py", 
line 199, in finishDeviceCleanup
    TapdiskController.destroy(path)
  File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.py", 
line 289, in destroy
    tapdisk = TapdiskController.fromDevice(device)
  File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.py", 
line 278, in fromDevice
    TapdiskController.list())
  File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.py", 
line 256, in list
    key, value = pair.split('=')
ValueError: need more than 1 value to unpack

BlktapController calls "tap-ctl list", which outputs one line for each 
process. Each line contains key=value pairs without any quoting.

# tap-ctl list | grep 'args=.*:.* '
pid=10145 minor=18 state=0 args=aio:/var/lib/libvirt/images/Xen Windows 
drivers (gplpv 308).iso

(passing the output of tap-ctl through a pipe is important, since it switches 
to a different list-format when STDOUT is a tty.)

BlktapController splits the output into lines using \n, then each line at each 
space, and finally each of these 'words' at the '=', which fails for the 
filename.


tap-ctl should probably be changed to use some quoting when printing the 
filename.

Sincerely
Philipp
-- 
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/

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-12-08 17:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25 16:21 [BUG] insufficient quoting between "tap-ctl list" and xend/server/BlktapController.py Philipp Hahn
2011-11-25 19:57 ` Philipp Hahn
2011-12-01 18:31   ` Ian Jackson
2011-12-01 19:37     ` Pasi Kärkkäinen
2011-12-01 19:51       ` Ian Campbell
2011-12-02  8:51         ` [libvirt] [Xen-devel] [BUG] insufficient quoting between " tap-ctl list " " Philipp Hahn
2011-12-02 10:18           ` [BUG] insufficient quoting between "tap-ctl list" " Ian Campbell
2011-12-06 23:17             ` Jim Fehlig
2011-12-03 20:42     ` [PATCHv2] " Philipp Hahn
2011-12-08 17:16       ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.