1. 16 9月, 2011 11 次提交
    • E
      rpc: convert unknown procedures to VIR_ERR_NO_SUPPORT · 4a075f7e
      Eric Blake 提交于
      Libvirt special-cases a specific VIR_ERR_RPC from the remote driver
      back into VIR_ERR_NO_SUPPORT on the client, so that clients can
      handle missing rpc functions the same whether the hypervisor driver
      is local or remote.  However, commit c1b22644 introduced a regression:
      VIR_FROM_THIS changed from VIR_FROM_REMOTE to VIR_FROM_RPC, so the
      special casing no longer works if the server uses the newer error
      domain.
      
      * src/rpc/virnetclientprogram.c
      (virNetClientProgramDispatchError): Also cater to 0.9.3 and newer.
      4a075f7e
    • S
      Fix buzzilla 738778 · 3f2cb3ab
      Stefan Berger 提交于
      This patch fixes the bug shown in bugzilla 738778. It's not an nwfilter problem but a connection sharing / closure issue.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=738778
      
      Depending on the speed / #CPUs of the machine you are using you may not see this bug all the time.
      3f2cb3ab
    • A
      conf: avoid memory leak on virDomainDefParseXML · b9961102
      Alex Jia 提交于
      * conf/domain_conf.c: allocate memory to def->redirdevs in
        virDomainDefParseXML such as VIR_ALLOC_N(def->redirdevs, n),
        however, virDomainDefFree(def) hasn't released these memory.
      
      * Detected in valgrind run:
      
      ==19820== 209 (16 direct, 193 indirect) bytes in 1 blocks are definitely lost in loss record 25 of 26
      ==19820==    at 0x4A04A28: calloc (vg_replace_malloc.c:467)
      ==19820==    by 0x4A13AF: virAllocN (memory.c:129)
      ==19820==    by 0x4D4A0E: virDomainDefParseXML (domain_conf.c:7258)
      ==19820==    by 0x4D4C93: virDomainDefParseNode (domain_conf.c:7512)
      ==19820==    by 0x4D562F: virDomainDefParse (domain_conf.c:7465)
      ==19820==    by 0x415863: testCompareXMLToXMLFiles (qemuxml2xmltest.c:35)
      ==19820==    by 0x415982: testCompareXMLToXMLHelper (qemuxml2xmltest.c:80)
      ==19820==    by 0x416D31: virtTestRun (testutils.c:140)
      ==19820==    by 0x415604: mymain (qemuxml2xmltest.c:192)
      ==19820==    by 0x416437: virtTestMain (testutils.c:689)
      ==19820==    by 0x3CA7A1ECDC: (below main) (in /lib64/libc-2.12.so)
      ==19820==
      ==19820== LEAK SUMMARY:
      ==19820==    definitely lost: 16 bytes in 1 blocks
      ==19820==    indirectly lost: 193 bytes in 5 blocks
      ==19820==      possibly lost: 0 bytes in 0 blocks
      ==19820==    still reachable: 1,054 bytes in 21 blocks
      
      * How to reproduce?
      % valgrind -v --leak-check=full ./tests/qemuxml2xmltest
      Signed-off-by: NAlex Jia <ajia@redhat.com>
      b9961102
    • P
      build: storage: Macro 'MKFS' is undefined on some platforms. · bc35f12a
      Peter Krempa 提交于
      Mac OS X 10.6. Snow Leopard and probably other do not provide a mkfs
      command to create filesystems. Macro MKFS then remained undefined and
      did not provide any substitute, so that build failed on a missing
      argument.
      bc35f12a
    • P
      build: storage: Conditionaly compiled structure caused build fail on OSX · 1ce3b61f
      Peter Krempa 提交于
      Struct virStoragePoolProbeResult was compiled in conditionaly, but
      virStorageBackendFileSystemProbe used it unconditionaly. This patch
      exempts the struct from conditional include.
      1ce3b61f
    • P
      Avoid using "devname" as an identifier. · 79cf07af
      Peter Krempa 提交于
      /usr/lib/stdlib.h in Mac OS X and probably also in BSD's
      exports this symbol :(
      79cf07af
    • P
      doc: Add statment about permissions needed to do a core dump · 4d4430e1
      Peter Krempa 提交于
      Documentation did not specify, that some permissions are required on
      target path for coredump for the user running the hypervisor.
      
      Diff to v1:
      - reword statements
      4d4430e1
    • E
      snapshot: tweak snapshot-create-as diskspec docs · 85d28108
      Eric Blake 提交于
      With this patch, it is hopefully a bit more obvious that for
      snapshot-create-as, a literal '--diskspec' is mandatory if name
      or description was omitted, but optional if all earlier options
      were provided.
      
      These all denote two diskspecs and a description:
      virsh snapshot-create-as dom name desc vda vdb
      virsh snapshot-create-as dom name desc --diskspec vda --diskspec vdb
      virsh snapshot-create-as dom name desc --diskspec vda vdb
      virsh snapshot-create-as dom name desc vda --diskspec vdb
      virsh snapshot-create-as dom --diskspec vda --diskspec vdb name desc
      
      This gives two diskspecs but no description:
      virsh snapshot-create-as dom name --diskspec vda --diskspec vdb
      
      And this treats 'vda' as the description, with only one diskspec:
      virsh snapshot-create-as dom name vda vdb
      
      The help output now shows:
          snapshot-create-as <domain> [<name>] [<description>] [--print-xml] [--no-metadata] [--halt] [--disk-only] [[--diskspec] <string>]...
      
      I also checked the help output for echo and send-key, which are two
      other variants of argv commands.
      
      * tools/virsh.pod (snapshot-create-as): Document when a literal
      --diskspec must preceed a diskspec argument.
      * tools/virsh.c (vshCmddefHelp): Update help output for argv when
      naming the option is useful.
      (vshCmddefGetData): Fix logic on when argv was seen.
      * tests/virsh-optparse: Add tests to avoid regressions.
      85d28108
    • C
      python: Fix libvirt.py generation to include virterror info · 9ed46a3e
      Cole Robinson 提交于
      Recent generator refactoring broke libvirt.py. With this patch, libvirt.py
      is generated exactly the same as before offending commit 9eba0d25.
      9ed46a3e
    • E
      qemu_api: doc improvements · 69d8c753
      Eric Blake 提交于
      The new doc text had a few readability issues.  Also, the
      monitor command text copied a bit too much from the attach case.
      
      * src/libvirt-qemu.c (virDomainQemuMonitorCommand)
      (virDomainQemuAttach): Fix typos and grammar.
      69d8c753
    • P
      doc: virsh: Fix command name in man page · b4a01cec
      Peter Krempa 提交于
      Fix cut&paste error having command named domif-setlink instead of
      domif-getlink.
      b4a01cec
  2. 15 9月, 2011 10 次提交
  3. 14 9月, 2011 13 次提交
  4. 13 9月, 2011 2 次提交
    • G
      snapshot: fix double free of qemuImgBinary · 011eeb41
      Guannan Ren 提交于
      Regression introduced in commit 3881a470, due to an improper rebase
      of a cleanup written beforehand but only applied after a rebased of
      a refactoring that created a new function in commit 25fb3ef1.
      
      Also avoids passing NULL to printf %s.
      
      * src/qemu/qemu_driver.c: In qemuDomainSnapshotForEachQcow2()
      it free up the memory of qemu_driver->qemuImgBinary in the
      cleanup tag which leads to the garbage value of qemuImgBinary
      in qemu_driver struct and libvirtd crash when running
      "virsh snapshot-create" command a second time.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      011eeb41
    • D
      Do not log invalid operations in libvirtd logs · 7f2498ef
      Daniel Veillard 提交于
        This is a bit painful for example when starting virt-manager
      it tends to clutter libvirtd.log with invalid operation on cpu pinning
      for defined but not running domains. A priori those kind of errors
      don't indicate an error when executing the command but on a precondition
      for running the API, and honnestly while the application should report
      it, logging it as an error in libvirtd.log is not really useful,
      
         Related bug: https://bugzilla.redhat.com/show_bug.cgi?id=590807
      
      * daemon/libvirtd.c: extend daemonErrorLogFilter() to filter out
         errors of type VIR_ERR_OPERATION_INVALID
      7f2498ef
  5. 09 9月, 2011 4 次提交
    • M
      virnetsocket: Pass KRB5CCNAME env variable · afc984af
      Michal Privoznik 提交于
      So we can allow GSSAPI authentication for ssh.
      Signed-off-by: NMatthias Witte <witte@netzquadrat.de>
      afc984af
    • M
      selinux: Detect virt_use_nfs boolean set · c9b37fee
      Michal Privoznik 提交于
      If we fail setting label on a file and this file is on NFS share,
      it is wise to advise user to set virt_use_nfs selinux boolean
      variable.
      c9b37fee
    • P
      Fix URL-escaping for domainDefine · b14e7d2a
      Philipp Hahn 提交于
      '+' in strings get translated to ' ' when editing domains.
      While xenDaemonDomainCreateXML() did URL-escape the sexpr,
      xenDaemonDomainDefineXML() did not.
      
      Remove the explicit urlencode() in xenDaemonDomainCreateXML() and add
      the direct encoding calls to xend_op_ext() because it calls xend_post()
      which uses "Content-Type: application/x-www-form-urlencoded". According
      to <http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1> this
      requires all parameters to be url-encoded as specified in rfc1738.
      
      Notice: virBufferAsprintf(..., "%s=%s", ...) is again replaced by three
      calls to virBufferURIEncodeString() and virBufferAddChar() because '='
      is a "reserved" character, which would get escaped by
      virBufferURIEncodeString(), which - by the way - escapes anything not
      c_isalnum().
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      b14e7d2a
    • P
      xml: Change virtual file names of xml documents parsed in memory · 498d7833
      Peter Krempa 提交于
      While parsing XML strings from memory, the previous convention in
      libvirt was to set the virtual file name to "domain.xml" or something
      similar. This could potentialy trick the user into looking for a file
      named domain.xml on the disk in an attempt to fix the error.
      
      This patch changes these filenames to something that can't be as easily
      confused for a valid filename.
      
      Examples of error messages:
      ---------------------------
      Error while loading file from disk:
      
      15:07:59.015: 527: error : catchXMLError:709 : /path/to/domain.xml:1: StartTag: invalid element name
      <domain type='kvm'><
      --------------------^
      
      Error while parsing definition in memory:
      
      15:08:43.581: 525: error : catchXMLError:709 : (domain definition):2: error parsing attribute name
        <name>vm1</name>
      --^
      498d7833