1. 29 8月, 2013 1 次提交
  2. 17 8月, 2013 5 次提交
  3. 12 8月, 2013 2 次提交
    • E
      build: more workarounds for if_bridge.h · a5cfeac2
      Eric Blake 提交于
      This is a second attempt at fixing the problem first attempted
      in commit 2df8d991; basically undoing the fact that it was
      reverted in commit 43cee32f, plus fixing two more issues: the
      code in configure.ac has to EXACTLY match virnetdevbridge.c
      with regards to declaring in6 types before using if_bridge.h,
      and the fact that RHEL 5 has even more conflicts:
      
      In file included from util/virnetdevbridge.c:49:
      /usr/include/linux/in6.h:47: error: conflicting types for 'in6addr_any'
      /usr/include/netinet/in.h:206: error: previous declaration of 'in6addr_any' was here
      /usr/include/linux/in6.h:49: error: conflicting types for 'in6addr_loopback'
      /usr/include/netinet/in.h:207: error: previous declaration of 'in6addr_loopback' was here
      
      The rest of this commit message borrows from the original try
      of 2df8d991:
      
      A fresh checkout on a RHEL 6 machine with these packages:
      kernel-headers-2.6.32-405.el6.x86_64
      glibc-2.12-1.128.el6.x86_64
      failed to configure with this message:
      checking for linux/if_bridge.h... no
      configure: error: You must install kernel-headers in order to compile libvirt with QEMU or LXC support
      
      Digging in config.log, we see that the problem is identical to
      what we fixed earlier in commit d12c2811:
      
      configure:98831: checking for linux/if_bridge.h
      configure:98853: gcc -std=gnu99 -c -g -O2  conftest.c >&5
      In file included from /usr/include/linux/if_bridge.h:17,
                       from conftest.c:559:
      /usr/include/linux/in6.h:31: error: redefinition of 'struct in6_addr'
      /usr/include/linux/in6.h:48: error: redefinition of 'struct sockaddr_in6'
      /usr/include/linux/in6.h:56: error: redefinition of 'struct ipv6_mreq'
      configure:98860: $? = 1
      
      I had not hit it earlier because I was using incremental builds,
      where config.cache had shielded me from the kernel-headers breakage.
      
      * configure.ac (if_bridge.h): Avoid conflicting type definitions.
      * src/util/virnetdevbridge.c (includes): Also sanitize for RHEL 5.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      (cherry picked from commit 70024dc9)
      a5cfeac2
    • D
      Revert "build: fix configure detection of if_bridge.h on RHEL 6" · 80d05b9a
      Daniel P. Berrange 提交于
      This reverts commit 2df8d991.
      
      The change breaks configure on any recent Fedora platform
      (cherry picked from commit 43cee32f)
      80d05b9a
  4. 10 8月, 2013 1 次提交
    • A
      remote: Fix a segfault in remoteDomainCreateWithFlags · 6e020882
      Alex Jia 提交于
      Valgrind defects memory error:
      
      ==16759== 1 errors in context 1 of 8:
      ==16759== Invalid free() / delete / delete[] / realloc()
      ==16759==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==16759==    by 0x83CD329: xdr_string (in /usr/lib64/libc-2.17.so)
      ==16759==    by 0x4D93E4D: xdr_remote_nonnull_string (remote_protocol.c:31)
      ==16759==    by 0x4D94350: xdr_remote_nonnull_domain (remote_protocol.c:58)
      ==16759==    by 0x4D976C8: xdr_remote_domain_create_with_flags_ret (remote_protocol.c:1762)
      ==16759==    by 0x83CC734: xdr_free (in /usr/lib64/libc-2.17.so)
      ==16759==    by 0x4D7F1E0: remoteDomainCreateWithFlags (remote_driver.c:2441)
      ==16759==    by 0x4D4BF17: virDomainCreateWithFlags (libvirt.c:9499)
      ==16759==    by 0x13127A: cmdStart (virsh-domain.c:3376)
      ==16759==    by 0x12BF83: vshCommandRun (virsh.c:1751)
      ==16759==    by 0x126FFB: main (virsh.c:3205)
      ==16759==  Address 0xe1394a0 is not stack'd, malloc'd or (recently) free'd
      
      ==16759== 1 errors in context 2 of 8:
      ==16759== Conditional jump or move depends on uninitialised value(s)
      ==16759==    at 0x4A07477: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==16759==    by 0x83CD329: xdr_string (in /usr/lib64/libc-2.17.so)
      ==16759==    by 0x4D93E4D: xdr_remote_nonnull_string (remote_protocol.c:31)
      ==16759==    by 0x4D94350: xdr_remote_nonnull_domain (remote_protocol.c:58)
      ==16759==    by 0x4D976C8: xdr_remote_domain_create_with_flags_ret (remote_protocol.c:1762)
      ==16759==    by 0x83CC734: xdr_free (in /usr/lib64/libc-2.17.so)
      ==16759==    by 0x4D7F1E0: remoteDomainCreateWithFlags (remote_driver.c:2441)
      ==16759==    by 0x4D4BF17: virDomainCreateWithFlags (libvirt.c:9499)
      ==16759==    by 0x13127A: cmdStart (virsh-domain.c:3376)
      ==16759==    by 0x12BF83: vshCommandRun (virsh.c:1751)
      ==16759==    by 0x126FFB: main (virsh.c:3205)
      ==16759==  Uninitialised value was created by a stack allocation
      ==16759==    at 0x4D7F120: remoteDomainCreateWithFlags (remote_driver.c:2423)
      
      How to reproduce?
      
      # virsh start <domain> --paused
      
      RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=994855Signed-off-by: NAlex Jia <ajia@redhat.com>
      (cherry picked from commit be7a89e8)
      6e020882
  5. 07 8月, 2013 1 次提交
    • E
      build: fix configure detection of if_bridge.h on RHEL 6 · 083fe054
      Eric Blake 提交于
      A fresh checkout on a RHEL 6 machine with these packages:
      kernel-headers-2.6.32-405.el6.x86_64
      glibc-2.12-1.128.el6.x86_64
      failed to configure with this message:
      checking for linux/if_bridge.h... no
      configure: error: You must install kernel-headers in order to compile libvirt with QEMU or LXC support
      
      Digging in config.log, we see that the problem is identical to
      what we fixed earlier in commit d12c2811:
      
      configure:98831: checking for linux/if_bridge.h
      configure:98853: gcc -std=gnu99 -c -g -O2  conftest.c >&5
      In file included from /usr/include/linux/if_bridge.h:17,
                       from conftest.c:559:
      /usr/include/linux/in6.h:31: error: redefinition of 'struct in6_addr'
      /usr/include/linux/in6.h:48: error: redefinition of 'struct sockaddr_in6'
      /usr/include/linux/in6.h:56: error: redefinition of 'struct ipv6_mreq'
      configure:98860: $? = 1
      
      I had not hit it earlier because I was using incremental builds,
      where config.cache had shielded me from the kernel-headers breakage.
      
      * configure.ac (if_bridge.h): Avoid conflicting type definitions.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      (cherry picked from commit 2df8d991)
      083fe054
  6. 06 8月, 2013 2 次提交
    • M
      qemu_migration: Don't error on tunelled migration with --copy-storage · 864bcb0e
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=979477
      
      Since 1.0.3 we are using the new way to copy non shared storage during
      migration (the NBD way). However, whether the new or old way is used is
      not controllable by user but unconditionally turned on if both sides of
      migration support it. Moreover, the implementation is not complete: the
      combination for VIR_MIGRATE_TUNNELLED flag is missing (as we need to
      open new port on the destination) in which case we just error out. This
      is a deadly combination: not letting users choose their destiny and
      erroring out. We should not do that but VIR_WARN and turn the NBD off
      instead.
      (cherry picked from commit 5de58d87)
      864bcb0e
    • J
      xen: fix memory corruption in legacy driver · 673ff0d7
      Jim Fehlig 提交于
      Commit 632180d1 introduced memory corruption in xenDaemonListDefinedDomains
      by starting to populate the names array at index -1, causing all sorts
      of havoc in libvirtd such as aborts like the following
      
      *** Error in `/usr/sbin/libvirtd': double free or corruption (out): 0x00007fffe00ccf20 ***
      ======= Backtrace: =========
      /lib64/libc.so.6(+0x7abf6)[0x7ffff3fa0bf6]
      /lib64/libc.so.6(+0x7b973)[0x7ffff3fa1973]
      /lib64/libc.so.6(xdr_array+0xde)[0x7ffff403cbae]
      /usr/sbin/libvirtd(+0x50251)[0x5555555a4251]
      /lib64/libc.so.6(xdr_free+0x15)[0x7ffff403ccd5]
      /usr/lib64/libvirt.so.0(+0x1fad34)[0x7ffff76b1d34]
      /usr/lib64/libvirt.so.0(virNetServerProgramDispatch+0x1fc)[0x7ffff76b16f1]
      /usr/lib64/libvirt.so.0(+0x1f214a)[0x7ffff76a914a]
      /usr/lib64/libvirt.so.0(+0x1f222d)[0x7ffff76a922d]
      /usr/lib64/libvirt.so.0(+0xbcc4f)[0x7ffff7573c4f]
      /usr/lib64/libvirt.so.0(+0xbc5e5)[0x7ffff75735e5]
      /lib64/libpthread.so.0(+0x7e0f)[0x7ffff48f7e0f]
      /lib64/libc.so.6(clone+0x6d)[0x7ffff400e7dd]
      
      Fix by initializing ret to 0 and only setting to error on failure path.
      (cherry picked from commit 0e671a16)
      673ff0d7
  7. 30 7月, 2013 9 次提交
    • D
      Release of libvirt-1.1.1 · e9b8c9dc
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in: update for the release
      * po/*.po*: update localizations and regenerate
      e9b8c9dc
    • E
      build: fix shunloadtest breakage · 87c0eab4
      Eric Blake 提交于
      Commit 93ec384b was tested on mingw, but broke the build on Linux:
      
        CCLD     shunloadtest
      shunloadtest.o: In function `main':
      /home/eblake/libvirt/tests/shunloadtest.c:106: undefined reference to `virFilePrintf'
      ...
      ssh.o: In function `main':
      /home/eblake/libvirt/tests/ssh.c:43: undefined reference to `virFilePrintf'
      /home/eblake/libvirt/tests/ssh.c:49: undefined reference to `virFilePrintf'
      
      * tests/testutils.h (fprintf): Provide escape hatch.
      * tests/shunloadtest.c: Use it.
      * tests/ssh.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      87c0eab4
    • E
      examples: fix mingw build vs. printf · 6f4458a0
      Eric Blake 提交于
      Mingw *printf is a moving target; newer mingw now provides a version
      of asprintf() that fails to understand %lld:
      
        CC       event_test-event-test.o
      ../../../../examples/domain-events/events-c/event-test.c: In function 'myDomainEventRTCChangeCallback':
      ../../../../examples/domain-events/events-c/event-test.c:270:18: error: unknown conversion type character 'l' in format [-Werror=format=]
                        virDomainGetID(dom), offset) < 0)
                        ^
      
      But since our examples already admitted that they were hacking around
      a mingw deficiency, it is easier to just use printf() directly, coupled
      with <inttypes.h> macros, for a more portable work-around.
      
      * examples/domain-events/events-c/event-test.c
      (myDomainEventRTCChangeCallback): Use PRIdMAX instead of asprintf.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      6f4458a0
    • E
      tests: consistently use virFilePrintf · 93ec384b
      Eric Blake 提交于
      Commit a2619962 introduced virFilePrintf to work around the fact
      that gnulib doesn't (yet) provide guarantees about fprintf() vs.
      %z, which in turn causes all sorts of mingw compilation errors:
      
      ../../tests/testutils.c: In function 'virtTestResult':
      ../../tests/testutils.c:101:9: error: unknown conversion type character 'z' in format [-Werror=format=]
               fprintf(stderr, "%3zu) %-60s ", testCounter, name);
               ^
      
      Rather than s/fprintf/virFilePrintf/ (and reformatting loads of
      lines) across multiple files, it's easier to just hack the entire
      testsuite to take advantage of our helper function.
      
      * tests/testutils.c: s/fprintf/virFilePrintf/ for mingw.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      93ec384b
    • E
      build: skip systemd mock on non-Linux · 524f52c3
      Eric Blake 提交于
      A cross-compile to mingw failed:
      
        CC       virsystemdmock_la-virsystemdmock.lo
      ../../tests/virsystemdmock.c:29:6: error: 'dbus_connection_set_change_sigpipe' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
       void dbus_connection_set_change_sigpipe(dbus_bool_t will_modify_sigpipe ATTRIBUTE_UNUSED)
            ^
      
      But when you think about it, systemd is Linux-only, and even our
      use of LD_PRELOAD to provide mock syscalls is Linux-only.
      
      * tests/virsystemdmock.c: Avoid compilation outside Linux.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      524f52c3
    • D
      Rename VIR_DOMAIN_PAUSED_GUEST_PANICKED to VIR_DOMAIN_PAUSED_CRASHED · 63d261f3
      Daniel P. Berrange 提交于
      The VIR_DOMAIN_PAUSED_GUEST_PANICKED constant is badly named,
      leaking the QEMU event name. Elsewhere in the API we use
      'CRASHED' rather than 'PANICKED', and the addition of 'GUEST'
      is redundant since all events are guest related.
      
      Thus rename it to VIR_DOMAIN_PAUSED_CRASHED, which matches
      with VIR_DOMAIN_RUNNING_CRASHED and VIR_DOMAIN_EVENT_CRASHED.
      
      It was added in commit 14e7e0ae
      which post-dates v1.1.0, so is safe to rename before 1.1.1
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      63d261f3
    • D
      Remove VIR_DOMAIN_SHUTDOWN_CRASHED from public API · 8c20d3f8
      Daniel P. Berrange 提交于
      The VIR_DOMAIN_SHUTDOWN_CRASHED state constant does not appear
      to be used in the QEMU code anyway. It also doesn't make much
      (any) sense, since the 'shutdown' state is a transient state
      between 'running' and 'shutoff' and when a guest crashes, it
      does not end up in a 'shutdown' state, only 'shutoff'.
      
      It was added in commit 14e7e0ae
      which post-dates v1.1.0, so is safe to remove before 1.1.1
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      8c20d3f8
    • D
      Fix dbus message reading code on big endian hosts · 9ed3e6c1
      Daniel P. Berrange 提交于
      The way we were casting small (<32bit) integers was broken
      on big endian hosts, causing stack smashing. This was detected
      in the test suite either by test failures due to incorrect
      results, or by libc/gcc abort'ing with its stack canary
      triggered.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      9ed3e6c1
    • J
      spec: Cat test-suite.log if make check fails · 095ba439
      Jiri Denemark 提交于
      Current automake enables parallel test by default, which means test
      details are only logged in test-suite.log and not printed to stderr.
      This patch makes test failures directly visible in RPM build logs even
      when parallel tests are turned on.
      095ba439
  8. 29 7月, 2013 11 次提交
    • E
      build: fix another virdbus issue on mingw · 9d62472f
      Eric Blake 提交于
      Depending on the set of mingw packages installed, it is possible
      that other .c files hit the mingw header pollution from the
      virdbus.h file.
      
      In file included from ../../src/rpc/virnetserver.c:39:0:
      ../../src/util/virdbus.h:41:35: error: expected ';', ',' or ')' before 'struct'
                             const char *interface,
                                         ^
      
      * src/util/virdbus.h (virDBusCallMethod): Match .c file change.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9d62472f
    • E
      build: fix virutil build on mingw · cd725c7a
      Eric Blake 提交于
      On platforms without decent group support, the build failed:
      
      Cannot export virGetGroupList: symbol not defined
      ./.libs/libvirt_security_manager.a(libvirt_security_manager_la-security_dac.o): In function `virSecurityDACPreFork':
      /home/eblake/libvirt-tmp/build/src/../../src/security/security_dac.c:248: undefined reference to `virGetGroupList'
      collect2: error: ld returned 1 exit status
      
      * src/util/virutil.c (virGetGroupList): Provide dummy implementation.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      cd725c7a
    • E
      build: fix virthread build on mingw · 4c1c336c
      Eric Blake 提交于
      Our recent conversion to make VIR_ALLOC report oom wasn't
      tested on mingw:
      
      In file included from ../../src/util/virthread.c:29:0:
      ../../src/util/virthreadwin32.c: In function 'virCondWait':
      ../../src/util/virthreadwin32.c:166:81: error: 'VIR_FROM_THIS' undeclared (first use in this function)
           if (VIR_REALLOC_N(c->waiters, c->nwaiters + 1) < 0) {
                                                                                       ^
      
      * src/util/virthreadwin32.c (VIR_FROM_THIS): Define.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4c1c336c
    • E
      build: fix virdbus build on mingw · 61fac39e
      Eric Blake 提交于
      Mingw headers pollute the namespace.
      
        CC       libvirt_util_la-virdbus.lo
      ../../src/util/virdbus.c:1102:35: error: expected ';', ',' or ')' before 'struct'
                             const char *interface,
                                         ^
      
      * src/util/virdbus.c (virDBusCallMethod): Avoid 'interface'.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      61fac39e
    • E
      build: fix vircgroup build on mingw · a2d0c3f5
      Eric Blake 提交于
      The previous patch was incomplete.
      
        CC       libvirt_util_la-vircgroup.lo
      ../../src/util/vircgroup.c:70:12: error: 'virCgroupPartitionEscape' declared 'static' but never defined [-Werror=unused-function]
       static int virCgroupPartitionEscape(char **path);
                  ^
      
      * src/util/vircgroup.c (virCgroupPartitionEscape): Move forward
      declaration inside conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a2d0c3f5
    • D
      Conditionalize build of virCgroupValidateMachineGroup · 7cf81fa1
      Daniel P. Berrange 提交于
      The virCgroupValidateMachineGroup method calls some functions
      which are only conditionally compiled, thus it too must be
      made conditional. This fixes the build on non-Linux hosts.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      7cf81fa1
    • E
      build: fix VPATH 'make check' · 7df291a6
      Eric Blake 提交于
      A VPATH build 'make check' was failing with:
      
        GEN      check-driverimpls
      Can't open ../../src/../../src/lxc/lxc_monitor_protocol.h: No such file or directory at ../../src/check-driverimpls.pl line 29, <> line 27153.
      Can't open ../../src/../../src/lxc/lxc_monitor_protocol.c: No such file or directory at ../../src/check-driverimpls.pl line 29, <> line 27153.
      ...
        GEN      check-aclrules
      cannot read ../../src/../../src/remote/remote_protocol.x at ../../src/check-aclrules.pl line 128.
      
      because $(srcdir) was being prepended to file names that already
      included it.
      
      * src/Makefile.am (check-driverimpls): Don't add srcdir twice.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7df291a6
    • C
      python: Drop TODO · 3347a420
      Cole Robinson 提交于
      File hasn't been really touched for 7 years. And with recent rawhide
      changes it contributed to an RPM build failure. Let's drop it.
      
      This also removes installation of a libvirt-python doc dir, so drop
      handling of it from the RPM spec.
      3347a420
    • D
      Fix probing of legacy Xen driver to not leave URI set · b7caae92
      Daniel P. Berrange 提交于
      When the legacy Xen driver probes with a NULL URI, and
      finds itself running on Xen, it will set conn->uri. A
      little bit later though it checks to see if libxl support
      exists, and if so declines the driver. This leaves the
      conn->uri set to 'xen:///', so if libxl also declines
      it, it prevents probing of the QEMU driver.
      
      Once a driver has set the conn->uri, it must *never*
      decline an open request. So we must move the libxl
      check earlier
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b7caae92
    • L
      cpu: Fix one compile error for PPC. · 18398cfd
      Li Zhang 提交于
      CPU data structure is refined, which causes one compile error for PPC.
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      18398cfd
    • G
      caps: use -device for primary video when qemu >=1.6 · e3f2686b
      Guannan Ren 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=981094
      The commit 0ad9025e introduce qemu flag QEMU_CAPS_DEVICE_VIDEO_PRIMARY
      for using -device VGA, -device cirrus-vga, -device vmware-svga and
      -device qxl-vga. In use, for -device qxl-vga, mouse doesn't display
      in guest window like the desciption in above bug.
      This patch try to use -device for primary video when qemu >=1.6 which
      contains the bug fix patch
      e3f2686b
  9. 27 7月, 2013 2 次提交
    • E
      build: avoid uninitialized use warning · c86c3c32
      Eric Blake 提交于
      Otherwise, with new enough gcc compiling at -O2, the build fails with:
      ../../src/conf/domain_conf.c: In function ‘virDomainDeviceDefPostParse’:
      ../../src/conf/domain_conf.c:2821:29: error: ‘cnt’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
                   for (i = 0; i < *cnt; i++) {
                                   ^
      ../../src/conf/domain_conf.c:2795:20: note: ‘cnt’ was declared here
               size_t i, *cnt;
                          ^
      ../../src/conf/domain_conf.c:2794:30: error: ‘arrPtr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
               virDomainChrDefPtr **arrPtr;
                                    ^
      
      * src/conf/domain_conf.c (virDomainChrGetDomainPtrs): Always
      assign into output parameters.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c86c3c32
    • D
      Set default partition in libvirtd instead of libvirt_lxc · 35fe8d97
      Daniel P. Berrange 提交于
      By setting the default partition in libvirt_lxc it is not
      visible when querying the live XML. Move setting of the
      default partition into libvirtd virLXCProcessStart
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      35fe8d97
  10. 26 7月, 2013 6 次提交