1. 15 10月, 2014 2 次提交
  2. 12 10月, 2014 1 次提交
    • M
      Fix leftover typo '&' -> '&&' · 4d2a8a0a
      Martin Kletzander 提交于
      The actual origin of this so called typo are two commits.  The first one
      was commit 72f8a7f1 that came up with the following condition:
      
      if ((i == 8) & (flags & VIR_QEMU_PROCESS_KILL_FORCE))
      
      Fortunately this succeeded thanks to bool being (int)1 and
      VIR_QEMU_PROCESS_KILL_FORCE having the value of 1 << 0.  The check was
      then moved and altered in 8fd38231 to
      current state:
      
      if ((i == 50) & force)
      
      that will work again (both sides of '&' being booleans), but since this
      was missed so many times, it may pose a problem in the future in case it
      gets copy-pasted again.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      4d2a8a0a
  3. 07 10月, 2014 1 次提交
  4. 04 10月, 2014 1 次提交
    • M
      util: Prepare URI formatting for libxml2 >= 2.9.2 · 8f17d0ea
      Martin Kletzander 提交于
      Since commit 8eb55d782a2b9afacc7938694891cc6fad7b42a5 libxml2 removes
      two slashes from the URI when there is no server part.  This is fixed
      with beb7281055dbf0ed4d041022a67c6c5cfd126f25, but only if the calling
      application calls xmlSaveUri() on URI that xmlURIParse() parsed.  And
      that is not the case in virURIFormat().  virURIFormat() accepts
      virURIPtr that can be created without parsing it and we do that when we
      format network storage paths for gluster for example.  Even though
      virStorageSourceParseBackingURI() uses virURIParse(), it throws that data
      structure right away.
      
      Since we want to format URIs as URIs and not absolute URIs or opaque
      URIs (see RFC 3986), we can specify that with a special hack thanks to
      commit beb7281055dbf0ed4d041022a67c6c5cfd126f25, by setting port to -1.
      
      This fixes qemuxml2argvtest test where the disk-drive-network-gluster
      case was failing.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      8f17d0ea
  5. 02 10月, 2014 3 次提交
    • J
      Add virCgroupTerminateMachine stub · 99b2b457
      Ján Tomko 提交于
      Fix the build on FreeBSD, broken by commit 4882618e.
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      99b2b457
    • E
      build: fix build on non-Linux · 4acc03ae
      Eric Blake 提交于
      A cygwin build of 1.2.9 fails with:
      
      util/virprocess.c:87:27: fatal error: sys/syscall.h: No such file or directory
       #  include <sys/syscall.h>
      
      But in reality, the ONLY user of setns() is lxc, which is Linux-only.
      It's easiest to just limit the setns workarounds to Linux.
      
      * src/util/virprocess.c (setns): Limit definition to Linux.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4acc03ae
    • G
      qemu: use systemd's TerminateMachine to kill all processes · 4882618e
      Guido Günther 提交于
      If we don't properly clean up all processes in the
      machine-<vmname>.scope systemd won't remove the cgroup and subsequent vm
      starts fail with
      
        'CreateMachine: File exists'
      
      Additional processes can e.g. be added via
      
        echo $PID > /sys/fs/cgroup/systemd/machine.slice/machine-${VMNAME}.scope/tasks
      
      but there are other cases like
      
        http://bugs.debian.org/761521
      
      Invoke TerminateMachine to be on the safe side since systemd tracks the
      cgroup anyway. This is a noop if all processes have terminated already.
      4882618e
  6. 01 10月, 2014 1 次提交
  7. 25 9月, 2014 2 次提交
  8. 24 9月, 2014 5 次提交
  9. 22 9月, 2014 1 次提交
  10. 18 9月, 2014 4 次提交
  11. 17 9月, 2014 1 次提交
  12. 16 9月, 2014 5 次提交
    • J
      Wire up the interface backend options · b20d39a5
      Ján Tomko 提交于
      Pass the user-specified tun path down when creating tap device
      when called from the qemu driver.
      
      Also honor the vhost device path specified by user.
      b20d39a5
    • M
      virprocess: Extend list of platforms for setns wrapper · 735a15a6
      Michal Privoznik 提交于
      Currently, the setns() wrapper is supported only for x86_64 and i686
      which leaves us failing to build on other platforms like arm, aarch64
      and so on. This means, that the wrapper needs to be extended to those
      platforms and make to fail on runtime not compile time.
      
      The syscall numbers for other platforms was fetched using this
      command:
      
      kernel.git $ git grep "define.*__NR_setns" | grep -e arm -e powerpc -e s390
      arch/arm/include/uapi/asm/unistd.h:#define __NR_setns                   (__NR_SYSCALL_BASE+375)
      arch/arm64/include/asm/unistd32.h:#define __NR_setns 375
      arch/powerpc/include/uapi/asm/unistd.h:#define __NR_setns               350
      arch/s390/include/uapi/asm/unistd.h:#define __NR_setns          339
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      735a15a6
    • P
      util: storage: Fix qcow(2) header parser according to docs · 34e317cf
      Peter Krempa 提交于
      The backing store string location offset 0 determines that the file
      isn't present. The string size shouldn't be then checked:
      
      from qemu.git/docs/specs/qcow2.txt
      
      == Header ==
      
      The first cluster of a qcow2 image contains the file header:
      
      Byte  0 -  3:   magic
                      QCOW magic string ("QFI\xfb")
      
            4 -  7:   version
                      Version number (valid values are 2 and 3)
      
            8 - 15:   backing_file_offset
                      Offset into the image file at which the backing file name
                      is stored (NB: The string is not null terminated). 0 if the
                      image doesn't have a backing file.
      
           16 - 19:   backing_file_size
                      Length of the backing file name in bytes. Must not be
                      longer than 1023 bytes. Undefined if the image doesn't have
                      a backing file.         ^^^^^^^^^
      
      This patch intentionally leaves the backing file string size check in
      place in case a malformatted file would be presented to libvirt. Also
      according to the docs the string size is maximum 1023 bytes, thus this
      patch adds a check to verify that.
      
      I was also able to verify that the check was done the same way in the
      legacy qcow fromat (in qemu's code).
      34e317cf
    • J
      vircgroup: Fix broken builds without cgroups · e45f0d05
      John Ferlan 提交于
      I missed adding virCgroupNewIOThread to the !VIR_CGROUP_SUPPORTED
      
      Pushing as build breaker
      e45f0d05
    • J
      vircgroup: Introduce virCgroupNewIOThread · 3abb95ca
      John Ferlan 提交于
      Add virCgroupNewIOThread() to mimic virCgroupNewVcpu() except the naming
      scheme with use "iothread" rather than "vcpu".
      3abb95ca
  13. 15 9月, 2014 5 次提交
  14. 12 9月, 2014 4 次提交
    • J
      virfile: Resolve Coverity RESOURCE_LEAK · 8d44f924
      John Ferlan 提交于
      With the virGetGroupList() change in place - Coverity further complains
      that if we fail to virFork(), the groups will be leaked - which aha seems
      to be the case. Adjust the logic to save off the -errno, free the groups,
      and then return the value we saved
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      8d44f924
    • J
      virutil: Resolve Coverity RESOURCE_LEAK · 52e90b22
      John Ferlan 提交于
      This ends up being a very bizarre false positive. With an assist from
      eblake, the claim is that mgetgroups() could return a -1 value, but yet
      still have a groups buffer allocated, yet the example shown doesn't
      seem to prove that.
      
      Rather than fret about it, by adding a well placed sa_assert() on the
      returned *list value we can "assure" ourselves that the mgetgroups()
      failure path won't signal this condition.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      52e90b22
    • P
      util: Add function to check if a virStorageSource is "empty" · 5e3e9919
      Peter Krempa 提交于
      To express empty drive we historically use storage source with empty
      path. Unfortunately NBD disks may be declared without a path.
      
      Add a helper to wrap this logic.
      5e3e9919
    • D
      util: Allow port allocator to skip bind() check · 973173e6
      Daniel P. Berrange 提交于
      Test suites using the port allocator don't want to have different
      behaviour depending on whether a port is in use on the host. Add
      a VIR_PORT_ALLOCATOR_SKIP_BIND_CHECK which test suites can use
      to skip the bind() test. The port allocator will thus only track
      ports in use by the test suite process itself. This is fine when
      using the port allocator to generate guest configs which won't
      actually be launched
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      973173e6
  15. 11 9月, 2014 3 次提交
  16. 10 9月, 2014 1 次提交