Your message dated Wed, 01 Dec 2010 14:47:18 +0000
with message-id <[email protected]>
and subject line Bug#592817: fixed in libvirt 0.8.3-5
has caused the Debian Bug report #592817,
regarding libvirt-bin: libvirt fails to create openvz domain with "cannot set 
uuid"
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
592817: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=592817
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libvirt-bin
Version: 0.8.2-1
Severity: normal

*** Please type your report below this line ***
This is probably an upstream bug, but I was told by the libvirt devs to file
this here first.  OpenVZ operations were completely broken for me. Creating a
domain with virsh or any other method failed in the same way. It would complain
about not being able to set the UUID, but that was just hiding the real problem.

You can reproduce this if you install libvirtbin=0.8.2-1 and run "virsh
create sample.xml" where sample.xml contains:
<domain type="openvz" id="101">
 <name>101</name>
 <memory>0</memory>
 <currentMemory>0</currentMemory>
 <vcpu>1</vcpu>
 <os>
  <type>exe</type>
  <init>/sbin/init</init>
 </os>
 <clock offset="utc"/>
 <on_poweroff>destroy</on_poweroff>
 <on_reboot>destroy</on_reboot>
 <on_crash>destroy</on_crash>
 <devices>
  <filesystem type="template"><source name="abc"/><target
dir="/"/></filesystem>
  <interface type="bridge"><source bridge="vmbr0"/></interface>
 </devices>
</domain>

This worked in 0.6.5 and then regressed beyond that release. I hadn't time to
debug it back when I found it. I'm not sure how this went unnoticed for so long.
I had a lot of difficulty debugging this because the errors printed are somewhat
misleading. The real problem is that neither the id nor name is used to pick the
conf file name as it was in 0.6.5. Instead, new code was added to find the
lowest unused ID. With this input, libvirt creates /etc/vz/conf/100.conf for
this container with ID 101. Later on during the "create" command, it tries to
set the UUID of this container and fails to load it's configuration because it's
looking for the wrong file. Here's my patch that excises the changes that caused
the regressions:


diff -ur src/openvz/openvz_driver.c.old src/openvz/openvz_driver.c
--- libvirt-0.8.2/src//openvz/openvz_driver.c   2010-06-29
01:54:08.000000000 -0700
+++ ../src/openvz/openvz_driver.c       2010-08-12 15:43:14.000000000 -0700
@@ -103,10 +103,6 @@
                       int maxarg, virDomainDefPtr vmdef)
 {
     int narg;
-    int veid;
-    int max_veid;
-    char str_id[10];
-    FILE *fp;

     for (narg = 0; narg < maxarg; narg++)
         args[narg] = NULL;
@@ -135,36 +131,7 @@
     ADD_ARG_LIT(VZCTL);
     ADD_ARG_LIT("--quiet");
     ADD_ARG_LIT("create");
-
-    if ((fp = popen(VZLIST " -a -ovpsid -H 2>/dev/null", "r")) == NULL) {
-        openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
-                    _("popen  failed"));
-        return -1;
-    }
-    max_veid = 0;
-    while (!feof(fp)) {
-        if (fscanf(fp, "%d\n", &veid) != 1) {
-            if (feof(fp))
-                break;
-
-            openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
-                        _("Failed to parse vzlist output"));
-            goto cleanup;
-        }
-        if (veid > max_veid) {
-            max_veid = veid;
-        }
-    }
-    fclose(fp);
-
-    if (max_veid == 0) {
-        max_veid = 100;
-    } else {
-        max_veid++;
-    }
-
-    sprintf(str_id, "%d", max_veid);
-    ADD_ARG_LIT(str_id);
+    ADD_ARG_LIT(vmdef->name);

     ADD_ARG_LIT("--name");
     ADD_ARG_LIT(vmdef->name);
@@ -188,11 +155,6 @@
     openvzError(VIR_ERR_INTERNAL_ERROR,
                 _("Could not put argument to %s"), VZCTL);
     return -1;
-
-cleanup:
-    fclose(fp);
-    return -1;
-
 #undef ADD_ARG
 #undef ADD_ARG_LIT
 }

This is not the best solution. the "id" attribute is what should be used rather
than the "name" element. Well, the bigger problem is that buried in the code
elsewhere is the logic that's supposed to be able to find domain id 101 even if
it's in file 100.conf that's broken. I didn't even try to find that because it
didn't make sense to me to ever store ctid 101 in 100.conf, especially when I
name the container 101 and give id=101. I think OpenVZ support needs a lot of
work anyway, but that's for the devs to decide.

Again, this is probably for the upstream authors. I will file this again with
them if you agree or I don't get any response after some time.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-openvz-amd64 (SMP w/2 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 libvirt-bin depends on:
ii  adduser                   3.112          add and remove users and groups
ii  libavahi-client3          0.6.26-1       Avahi client library
ii  libavahi-common3          0.6.26-1       Avahi common library
ii  libblkid1                 2.17.2-3.1     block device id library
ii  libc6                     2.11.2-2       Embedded GNU C Library: Shared
lib
ii  libcap-ng0                0.6.4-1        An alternate posix capabilities
li
ii  libdevmapper1.02.1        2:1.02.48-2    The Linux Kernel Device Mapper
use
ii  libgcrypt11               1.4.5-2        LGPL Crypto library - runtime
libr
ii  libgnutls26               2.8.6-1        the GNU TLS library - runtime
libr
ii  libnl1                    1.1-5          library for dealing with
netlink s
ii  libparted0debian1         2.3-1          The GNU Parted disk
partitioning s
ii  libpciaccess0             0.12.0-1       Generic PCI access library for
X
ii  libreadline6              6.1-3          GNU readline and history
libraries
ii  libsasl2-2                2.1.23.dfsg1-5 Cyrus SASL - authentication
abstra
ii  libudev0                  160-1          libudev shared library
ii  libuuid1                  2.17.2-3.1     Universally Unique ID library
ii  libvirt0                  0.8.2-1        library for interfacing with
diffe
ii  libxenstore3.0            3.4.0-2        Xenstore communications library
fo
ii  libxml2                   2.7.7.dfsg-4   GNOME XML library
ii  logrotate                 3.7.8-4        Log rotation utility

Versions of packages libvirt-bin recommends:
ii  bridge-utils               1.4-5         Utilities for configuring the
Linu
ii  dnsmasq-base               2.51-1        A small caching DNS proxy and
DHCP
ii  iptables                   1.4.4-2       administration tools for packet
fi
pn  libxml2-utils              <none>        (no description available)
ii  netcat-openbsd             1.89-3        TCP/IP swiss army knife
ii  qemu                       0.12.5+dfsg-1 fast processor emulator

Versions of packages libvirt-bin suggests:
ii  policykit-1                   0.96-2     framework for managing
administrat

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: libvirt
Source-Version: 0.8.3-5

We believe that the bug you reported is fixed in the latest version of
libvirt, which is due to be installed in the Debian FTP archive:

libvirt-bin_0.8.3-5_i386.deb
  to main/libv/libvirt/libvirt-bin_0.8.3-5_i386.deb
libvirt-dev_0.8.3-5_i386.deb
  to main/libv/libvirt/libvirt-dev_0.8.3-5_i386.deb
libvirt-doc_0.8.3-5_all.deb
  to main/libv/libvirt/libvirt-doc_0.8.3-5_all.deb
libvirt0-dbg_0.8.3-5_i386.deb
  to main/libv/libvirt/libvirt0-dbg_0.8.3-5_i386.deb
libvirt0_0.8.3-5_i386.deb
  to main/libv/libvirt/libvirt0_0.8.3-5_i386.deb
libvirt_0.8.3-5.debian.tar.gz
  to main/libv/libvirt/libvirt_0.8.3-5.debian.tar.gz
libvirt_0.8.3-5.dsc
  to main/libv/libvirt/libvirt_0.8.3-5.dsc
python-libvirt_0.8.3-5_i386.deb
  to main/libv/libvirt/python-libvirt_0.8.3-5_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guido Günther <[email protected]> (supplier of updated libvirt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 01 Dec 2010 15:12:48 +0100
Source: libvirt
Binary: libvirt-bin libvirt0 libvirt0-dbg libvirt-doc libvirt-dev python-libvirt
Architecture: source all i386
Version: 0.8.3-5
Distribution: unstable
Urgency: low
Maintainer: Debian Libvirt Maintainers 
<[email protected]>
Changed-By: Guido Günther <[email protected]>
Description: 
 libvirt-bin - the programs for the libvirt library
 libvirt-dev - development files for the libvirt library
 libvirt-doc - documentation for the libvirt library
 libvirt0   - library for interfacing with different virtualization systems
 libvirt0-dbg - library for interfacing with different virtualization systems
 python-libvirt - libvirt Python bindings
Closes: 592817 602715
Changes: 
 libvirt (0.8.3-5) unstable; urgency=low
 .
   [ Laurent Léonard ]
   * [6e46f0e] Fix wrong regular expression in debian/watch
 .
   [ Guido Günther ]
   * [f561b2e] New patch 0010-nwfilter-resolve-deadlock-between-VM-
     operations-and-.patch nwfilter: resolve deadlock between VM operations and
     filter update (Closes: #602715)
   * [239bbe5] New patch 0011-OpenVZ-take-veid-from-vmdef-name-when-
     defining-new-d.patch: Fixes OpenVZ domain creation (Closes: #592817) -
     thanks to Eric Litak.
   * [c4a2a6b] New patch 0012-OpenVZ-Fix-some-overwritten-error-codes.patch:
     Improve error reporting.
Checksums-Sha1: 
 3ec5152c353358767b64c2d493e9d3f05bfd0cab 1874 libvirt_0.8.3-5.dsc
 c02854ce1ca666c353d90fd79555d5a6d90344c9 29116 libvirt_0.8.3-5.debian.tar.gz
 d15110704bf8b30519e536460532b2fb25fd8f3b 1119786 libvirt-doc_0.8.3-5_all.deb
 fd2c48c53eaa2606e3281fcd8c6c8007c8a6cc10 1021618 libvirt-bin_0.8.3-5_i386.deb
 a9f0a7508059bcbc8e4fea582da3bdd9bad7f9b8 954482 libvirt0_0.8.3-5_i386.deb
 5998f5cc76fb3ae045ca24f459ce9e7d5bc9718e 3045244 libvirt0-dbg_0.8.3-5_i386.deb
 60c2d6a44a1248605903d7aadfc466fbc03082c6 1175804 libvirt-dev_0.8.3-5_i386.deb
 adecb4f8db136022666e8e18c5791bc12ad1de1c 439756 python-libvirt_0.8.3-5_i386.deb
Checksums-Sha256: 
 6edf2eb496020ef94d87db06c89a037903dc5fb030f55ca07947ef310e956c05 1874 
libvirt_0.8.3-5.dsc
 a8e35a5fc6934f749167b370483eeb6f201f501970462e2f8fae48e2378e50e0 29116 
libvirt_0.8.3-5.debian.tar.gz
 a808db437e67d28b52a8f0890a4cd6f78370dce3ee56f0922bf28fdf58efa7d8 1119786 
libvirt-doc_0.8.3-5_all.deb
 6c1dfb513ae343e5c2453d566f5698e3d134763defe9254cd67b91b469d7ffd7 1021618 
libvirt-bin_0.8.3-5_i386.deb
 ea1c29e84269d8171e9909cd2c1e1ad465303f5031bfe2dea0b9f2822c84bdfa 954482 
libvirt0_0.8.3-5_i386.deb
 e6c4455dbcac13ead1d4da37dbb653d7bdbf670503e7aa00a91c9c462d296de9 3045244 
libvirt0-dbg_0.8.3-5_i386.deb
 a6eab9a5e2ec782e55889d213f6cb2778bee32ad39cd5c4ef702c0fc2f251c78 1175804 
libvirt-dev_0.8.3-5_i386.deb
 fe357e2c7777b9219577cfd5101d6ac251042c1e45502d23593c6e2033982c0b 439756 
python-libvirt_0.8.3-5_i386.deb
Files: 
 2ba6a15d205a14035dcd4d498979ef77 1874 libs optional libvirt_0.8.3-5.dsc
 4b1d8af4e50823f875e582b4c92738e5 29116 libs optional 
libvirt_0.8.3-5.debian.tar.gz
 e7eca1cac0664872f879928862b7d648 1119786 doc optional 
libvirt-doc_0.8.3-5_all.deb
 b0b4eebad52484f206075eafa5af699d 1021618 admin optional 
libvirt-bin_0.8.3-5_i386.deb
 6e2454183f7b19325b9cefa963640bc5 954482 libs optional libvirt0_0.8.3-5_i386.deb
 e2b3399aaaee59a010f1aec60d0a4034 3045244 debug extra 
libvirt0-dbg_0.8.3-5_i386.deb
 032682e45ee243b3a118245b5d2dbd2a 1175804 libdevel optional 
libvirt-dev_0.8.3-5_i386.deb
 02bcd70987c6ca6a12db2d3e1eb79b5c 439756 python optional 
python-libvirt_0.8.3-5_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFM9l0ln88szT8+ZCYRAtmNAJ9d9zwktWPD1Xj+1HEXQZj4pFdAGwCfcZsI
uyVbDOkNpx7DtdE+gYXa0IQ=
=mMLQ
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to