Package: xen-tools Version: 4.4-1 Severity: important Tags: patch xen-create-image will hang on lvcreate call when creating a swap lv. This occurs whenever the extents that the lv would use were previously used for a swap partion, therefore a swap signature is found. lvcreate hangs looking for user input which will never come.
e.g. (outside of xen-create image) root@xavier:/etc/xen# lvcreate vg0 -L 2gb -n foobar Logical volume "foobar" created root@xavier:/etc/xen# mkswap /dev/vg0/foobar Setting up swapspace version 1, size = 2097148 KiB no label, UUID=6d95f27f-6e57-41c9-91d3-cfbd167e11d4 root@xavier:/etc/xen# lvremove /dev/vg0/foobar root@xavier:/etc/xen# lvcreate vg0 -L 2gb -n foobar WARNING: swap signature detected on /dev/vg0/foobar. Wipe it? [y/n] Can be fixed by adding --yes argument to lvcreate, as in: root@xavier:/etc/xen# lvcreate vg0 -L 2gb --yes -n foobar Wiping swap signature on /dev/vg0/foobar. Logical volume "foobar" created I do not think this is an LVM issue, though I wonder why one would bother checking the signature of the filesystem that was there before. I'm just gonna wipe/mkfs over the top anyway. I did not find a relevant xen-tools bug, but I did note an FAI bug that is effectively identical: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750212 Trivial patch attached, though I don't know of other ramifications from __always__ using --yes on lvcreate. -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.14-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages xen-tools depends on: ii debootstrap 1.0.60 ii libconfig-inifiles-perl 2.83-3 ii libdata-validate-domain-perl 0.10-1 ii libdata-validate-ip-perl 0.23-1 ii libdata-validate-uri-perl 0.06-1 ii libfile-slurp-perl 9999.19-4 ii libfile-which-perl 1.09-1 ii libterm-ui-perl 0.42-1 ii libtext-template-perl 1.46-1 ii openssh-client 1:6.6p1-6 ii perl 5.18.2-4 ii perl-modules 5.18.2-4 Versions of packages xen-tools recommends: ii libexpect-perl 1.21-1 ii rinse 2.0.1-1 ii xen-hypervisor-4.1-amd64 [xen-hypervisor-amd64] 4.1.4-4 ii xen-hypervisor-4.3-amd64 [xen-hypervisor-amd64] 4.3.0-3+b1 ii xen-utils-4.1 [xen-utils] 4.1.4-4 ii xen-utils-4.3 [xen-utils] 4.3.0-3+b1 Versions of packages xen-tools suggests: pn btrfs-tools <none> pn cfengine2 <none> pn reiserfsprogs <none> pn xfsprogs <none> -- Configuration Files: /etc/xen-tools/xen-tools.conf changed [not included] -- no debconf information
*** xen-create-image.orig 2014-07-11 17:31:21.484509200 -0500 --- xen-create-image 2014-07-11 17:31:34.125114447 -0500 *************** *** 3119,3125 **** # The commands to create the volume. # my $disk_cmd = ! "lvcreate $CONFIG{'lvm'} -L $partition->{'size'} -n $disk"; # # Create the volume --- 3119,3125 ---- # The commands to create the volume. # my $disk_cmd = ! "lvcreate $CONFIG{'lvm'} --yes -L $partition->{'size'} -n $disk"; # # Create the volume