[Pkg-xen-devel] Bug#763102: xen-utils-common: xen-init-list fails to parse xm output -> cannot shutdown domains with service xendomains
Volker Klasen
reklov at unitedklasens.de
Sat Sep 27 19:55:40 UTC 2014
Package: xen-utils-common
Version: 4.4.0-5
Severity: important
Tags: patch
Hello,
xen-init-list fails to parse output of xen list -l when using XM toolstack.
Therefore, /etc/init.d/xendomains stop fails to shutdown any guests still
running on shutdown.
xen-init-list fails with the following message:
/usr/lib/xen-common/bin/xen-init-list
Traceback (most recent call last):
File "/usr/lib/xen-common/bin/xen-init-list", line 70, in <module>
d = DataSXP(p)
File "/usr/lib/xen-common/bin/xen-init-list", line 52, in __init__
s = SXPParser()(p)
TypeError: 'SXPParser' object is not callable
The following patch fixes the problem:
diff -ur a/usr/lib/xen-common/bin/xen-init-list
b/usr/lib/xen-common/bin/xen-
init-list
--- a/usr/lib/xen-common/bin/xen-init-list 2014-09-06
22:39:31.000000000
+0200
+++ b/usr/lib/xen-common/bin/xen-init-list 2014-09-27
19:55:20.244357777
+0200
@@ -11,7 +11,7 @@
tokenizer_re = re.compile(tokenizer_rules, re.X)
@classmethod
- def loads(cls, input):
+ def loads(self, input):
data = []
stack = []
for match in self.tokenizer_re.finditer(input):
@@ -49,7 +49,7 @@
class DataSXP(Data):
def __init__(self, p):
- s = SXPParser()(p)
+ s = SXPParser().loads(p)
self.data = d = {}
for i in s:
if i and i[0] == 'domain':
The problem also exists in sid's version 4.4.1-2.
Cheers,
Volker
P.S. This output from xen list -l with XM toolstack can be used for testing
(xen-init-list should return "3 qetesh"):
(domain
(domid 0)
(cpu_weight 512)
(cpu_cap 0)
(pool_name Pool-0)
(bootloader '')
(vcpus 4)
(cpus ((0) (2) (4) (6)))
(on_poweroff destroy)
(on_crash restart)
(uuid 00000000-0000-0000-0000-000000000000)
(bootloader_args '')
(name Domain-0)
(on_reboot restart)
(maxmem 16777215)
(memory 12288)
(shadow_memory 0)
(features '')
(on_xend_start ignore)
(on_xend_stop ignore)
(cpu_time 479.112308917)
(online_vcpus 4)
(image (linux (kernel '') (superpages 0) (nomigrate 0) (tsc_mode 0)))
(status 2)
(state r-----)
)
(domain
(domid 3)
(cpu_weight 256)
(cpu_cap 0)
(pool_name Pool-0)
(bootloader '')
(vcpus 4)
(cpus ((1) (3) (5) (7)))
(on_poweroff destroy)
(description '')
(on_crash restart)
(uuid 5d8e65d6-f11e-77da-d79b-765fa6b0dc06)
(bootloader_args '')
(name qetesh)
(on_reboot restart)
(maxmem 12288)
(memory 12288)
(shadow_memory 100)
(features '')
(on_xend_start ignore)
(on_xend_stop ignore)
(start_time 1411841408.09)
(cpu_time 9.818178594)
(online_vcpus 4)
(image
(hvm
(kernel '')
(superpages 0)
(videoram 4)
(hpet 0)
(stdvga 0)
(loader /usr/lib/xen-4.1/boot/hvmloader)
(xen_platform_pci 1)
(rtc_timeoffset 0)
(pci
((0x0000 0x00 0x1d 0x0 0x100 ())
(0x0000 0x01 0x00 0x0 0x100 ())
(0x0000 0x01 0x00 0x1 0x100 ())
(0x0000 0x04 0x04 0x0 0x100 ())
)
)
(hap 1)
(localtime 1)
(timer_mode 1)
(pci_msitranslate 1)
(oos 1)
(apic 1)
(usbdevice tablet)
(display :0)
(vpt_align 1)
(vncunused 1)
(boot c)
(pae 1)
(viridian 1)
(acpi 1)
(vnc 1)
(nographic 0)
(nomigrate 0)
(usb 0)
(tsc_mode 0)
(guest_os_type default)
(device_model /usr/lib/xen-4.1/bin/qemu-dm)
(pci_power_mgmt 0)
(xauthority /root/.Xauthority)
(isa 0)
(notes (SUSPEND_CANCEL 1))
)
)
(status 2)
(state r-----)
(store_mfn 1044476)
(device
(vif
(mac 02:16:3e:c8:29:36)
(script /etc/xen/scripts/vif-bridge)
(uuid 98f5a455-ed36-2963-7629-96539fdce3ac)
(backend 0)
)
)
(device
(console
(protocol vt100)
(location 6)
(uuid 77a4eccc-6494-e907-a10f-06a0f68da193)
)
)
(device
(vbd
(uuid 631da4bd-c9e4-c735-3204-cf744fd1e3a0)
(bootable 1)
(dev hda:disk)
(uname phy:/dev/vg00/qetesh)
(mode w)
(backend 0)
(VDI '')
)
)
(device
(vbd
(uuid 18632961-8819-2502-b545-92e133464a1a)
(bootable 0)
(dev hdb:disk)
(uname phy:/dev/vg01/qetesh2)
(mode w)
(backend 0)
(VDI '')
)
)
(device
(vbd
(uuid 4ed12806-b0bf-4a4e-f9c6-0cf19f60823c)
(bootable 0)
(dev hdc:cdrom)
(uname file:/etc/xen/empty.iso)
(mode r)
(backend 0)
(VDI '')
)
)
(device
(vfb
(vncunused 1)
(vnc 1)
(uuid b9b91105-4738-b6d6-8b7e-bfb645bb55db)
(location 127.0.0.1:5900)
)
)
(device
(pci
(dev
(slot 0x1d)
(domain 0x0000)
(key 0000:00:1d.0)
(bus 0x00)
(vdevfn 0x28)
(func 0x0)
(opts (msitranslate 1))
(opts (power_mgmt 0))
(uuid 420c4d30-dd05-25d0-eb25-d013c846b6ef)
)
(dev
(slot 0x00)
(domain 0x0000)
(key 0000:01:00.0)
(bus 0x01)
(vdevfn 0x30)
(func 0x0)
(opts (msitranslate 1))
(opts (power_mgmt 0))
(uuid 3556a674-24af-79b7-4c59-bff5b18c1a62)
)
(dev
(slot 0x00)
(domain 0x0000)
(key 0000:01:00.1)
(bus 0x01)
(vdevfn 0x38)
(func 0x1)
(opts (msitranslate 1))
(opts (power_mgmt 0))
(uuid 80d00048-a88c-5ed7-2cde-8f1f1028d3f8)
)
(dev
(slot 0x04)
(domain 0x0000)
(key 0000:04:04.0)
(bus 0x04)
(vdevfn 0x40)
(func 0x0)
(opts (msitranslate 1))
(opts (power_mgmt 0))
(uuid 528b813d-b89a-dbe2-164f-f98df0a3a9df)
)
(uuid d9cebcdb-9dd0-5190-29f6-2b16d8a44fb8)
(backend 0)
)
)
)
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages xen-utils-common depends on:
ii lsb-base 4.1+Debian13
ii python 2.7.8-1
ii ucf 3.0030
ii udev 208-8
ii xenstore-utils 4.4.0-5
xen-utils-common recommends no packages.
xen-utils-common suggests no packages.
-- Configuration Files:
/etc/default/xendomains changed [not included]
/etc/init.d/xendomains changed [not included]
/etc/xen/scripts/qemu-ifup changed [not included]
/etc/xen/xend-config.sxp changed [not included]
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xen-init-list.diff
Type: text/x-diff
Size: 712 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20140927/7cd8d112/attachment.diff>
More information about the Pkg-xen-devel
mailing list