1. 01 8月, 2013 3 次提交
    • D
      Cope with races while killing processes · 75304eaa
      Daniel P. Berrange 提交于
      When systemd is involved in managing processes, it may start
      killing off & tearing down croups associated with the process
      while we're still doing virCgroupKillPainfully. We must
      explicitly check for ENOENT and treat it as if we had finished
      killing processes
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      75304eaa
    • D
      Add support for systemd cgroup mount · aedd46e7
      Daniel P. Berrange 提交于
      Systemd uses a named cgroup mount for tracking processes. Add
      it as another type of controller, albeit one which we have to
      special case in a number of places. In particular we must
      never create/delete directories there, nor add tasks. Essentially
      the systemd mount is to be considered read-only for libvirt.
      
      With this change both the virCgroupDetectPlacement and
      virCgroupCopyPlacement methods must be invoked. The copy
      placement method will copy setup for resource controllers
      only. The detect placement method will probe for any
      named controllers, or resource controllers not already
      setup.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      aedd46e7
    • D
      Add APIs for formatting systemd slice/scope names · 4574b475
      Daniel P. Berrange 提交于
      There are some interesting escaping rules to consider when dealing
      with systemd slice/scope names. Thus it is helpful to have APIs
      for formatting names
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      4574b475
  2. 31 7月, 2013 23 次提交
  3. 30 7月, 2013 14 次提交
    • J
      spec: Don't mix commands with macro definitions · 462863a3
      Jiri Denemark 提交于
      %build section should first define all required macros and then run
      commands. Interleaving them makes it harder to spot what commands are
      run.
      462863a3
    • J
      spec: Use --enable-werror on RHEL · d5cd5bf0
      Jiri Denemark 提交于
      As RHEL provides a stable tool chain, we don't have to worry about
      frequent changes in reported compiler warnings (which prevents us from
      enabling -Werror unconditionally).
      d5cd5bf0
    • J
      spec: RHEL-7 does not have sanlock on i686 · a718d282
      Jiri Denemark 提交于
      a718d282
    • P
      spec: Disable libssh2 support for RHEL · 9c7de20a
      Peter Krempa 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=905513
      
      Libssh2 isn't reliable enough to support the libvirt transport using it.
      The problems include mishandling of "known_hosts" files that may confuse
      users.
      9c7de20a
    • J
      tests: Put a mock library at the start of LD_PRELOAD · df166a61
      Jiri Denemark 提交于
      This fixes vircgrouptest when run in a sandbox which already overrides
      open() and others.
      df166a61
    • D
      Support apparmor in RPM spec · 6aa5ebbe
      Daniel P. Berrange 提交于
      If libapparmor-devel happens to be installed when building the
      RPM, it will failed due to unlisted virt-aa-helper in %files.
      Add support for apparmor in the spec, so that we can explicitly
      turn it on/off, defaulting to off in all distros. This causes
      --without-apparmor to be given to configure, preventing the
      build failures if the user happens to have libapparmor-devel
      present.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      6aa5ebbe
    • D
      Delete obsolete / unused python test files · 5bb2a245
      Daniel P. Berrange 提交于
      The python/tests directory contains a number of so called
      "tests" for the python API. These are all hardcoded to
      look for Xen and cannot be run in any automated fashion,
      and no one is ever manually running them. Given that they
      don't meaningully contribute to the test coverage, delete
      them.
      
      For some reason these tests were also copied into the
      filesystem as part of 'make install'. The change to the
      RPM in commit 3347a420
      caused a build failure, since it removed the code which
      deleted these installed tests.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      5bb2a245
    • Y
      Fix minor typos in messages and docs · 5b4c035b
      Yuri Chornoivan 提交于
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5b4c035b
    • 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