1. 02 3月, 2014 1 次提交
  2. 01 3月, 2014 4 次提交
  3. 25 2月, 2014 1 次提交
  4. 21 2月, 2014 1 次提交
    • J
      bandwidth: Adjust documentation · 7eb37a0d
      John Ferlan 提交于
      Recent autotest/virt-test testing on f20 discovered an anomaly in how
      the bandwidth options are documented and used. This was discovered due
      to a bug fix in the /sbin/tc utility found in iproute-3.11.0.1 (on f20)
      in which overflow was actually caught and returned as an error. The fix
      was first introduced in iproute-3.10 (search on iproute2 commit 'a303853e').
      
      The autotest/virt-test test for virsh domiftune was attempting to send
      the largest unsigned integer value (4294967295) for maximum value
      testing. The libvirt xml implementation was designed to manage values
      in kilobytes thus when this value was passed to /sbin/tc, it (now)
      properly rejected the 4294967295kbps value.
      
      Investigation of the problem discovered that formatdomain.html.in and
      formatnetwork.html.in described the elements and property types slightly
      differently, although they use the same code - virNetDevBandwidthParseRate()
      (shared by portgroups, domains, and networks xml parsers). Rather than
      have the descriptions in two places, this patch will combine and reword
      the description under formatnetwork.html.in and have formatdomain.html.in
      link to that description.
      
      This documentation faux pas was continued into the virsh man page where
      the bandwidth description for both 'attach-interface' and 'domiftune'
      did not indicate the format of each value, thus leading to the test using
      largest unsigned integer value assuming "bps" rather than "kbps", which
      ultimately was wrong.
      7eb37a0d
  5. 20 2月, 2014 1 次提交
    • D
      Introduce new OOM testing support · 590029f6
      Daniel P. Berrange 提交于
      The previous OOM testing support would re-run the entire "main"
      method each iteration, failing a different malloc each time.
      When a test suite has 'n' allocations, the number of repeats
      requires is  (n * (n + 1) ) / 2.  This gets very large, very
      quickly.
      
      This new OOM testing support instead integrates at the
      virtTestRun level, so each individual test case gets repeated,
      instead of the entire test suite. This means the values of
      'n' are orders of magnitude smaller.
      
      The simple usage is
      
         $ VIR_TEST_OOM=1 ./qemuxml2argvtest
         ...
         29) QEMU XML-2-ARGV clock-utc                                         ... OK
             Test OOM for nalloc=36 .................................... OK
         30) QEMU XML-2-ARGV clock-localtime                                   ... OK
             Test OOM for nalloc=36 .................................... OK
         31) QEMU XML-2-ARGV clock-france                                      ... OK
             Test OOM for nalloc=38 ...................................... OK
         ...
      
      the second lines reports how many mallocs have to be failed, and thus
      how many repeats of the test will be run.
      
      If it crashes, then running under valgrind will often show the problem
      
        $ VIR_TEST_OOM=1 ../run valgrind ./qemuxml2argvtest
      
      When debugging problems it is also helpful to select an individual
      test case
      
        $ VIR_TEST_RANGE=30 VIR_TEST_OOM=1 ../run valgrind ./qemuxml2argvtest
      
      When things get really tricky, it is possible to request that just
      specific allocs are failed. eg to fail allocs 5 -> 12, use
      
        $ VIR_TEST_RANGE=30 VIR_TEST_OOM=1:5-12 ../run valgrind ./qemuxml2argvtest
      
      In the worse case, you might want to know the stack trace of the
      alloc which was failed then VIR_TEST_OOM_TRACE can be set. If it
      is set to 1 then it will only print if it thinks a mistake happened.
      This is often not reliable, so setting it to 2 will make it print
      the stack trace for every alloc that is failed.
      
        $ VIR_TEST_OOM_TRACE=2 VIR_TEST_RANGE=30 VIR_TEST_OOM=1:5-5 ../run valgrind ./qemuxml2argvtest
        30) QEMU XML-2-ARGV clock-localtime                                   ... OK
            Test OOM for nalloc=36 !virAllocN
        /home/berrange/src/virt/libvirt/src/util/viralloc.c:180
        virHashCreateFull
        /home/berrange/src/virt/libvirt/src/util/virhash.c:144
        virDomainDefParseXML
        /home/berrange/src/virt/libvirt/src/conf/domain_conf.c:11745
        virDomainDefParseNode
        /home/berrange/src/virt/libvirt/src/conf/domain_conf.c:12646
        virDomainDefParse
        /home/berrange/src/virt/libvirt/src/conf/domain_conf.c:12590
        testCompareXMLToArgvFiles
        /home/berrange/src/virt/libvirt/tests/qemuxml2argvtest.c:106
        virtTestRun
        /home/berrange/src/virt/libvirt/tests/testutils.c:250
        mymain
        /home/berrange/src/virt/libvirt/tests/qemuxml2argvtest.c:418 (discriminator 2)
        virtTestMain
        /home/berrange/src/virt/libvirt/tests/testutils.c:750
        ??
        ??:0
        _start
        ??:?
         FAILED
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      590029f6
  6. 19 2月, 2014 1 次提交
  7. 18 2月, 2014 1 次提交
    • M
      network: Introduce network hooks · f1ab06e4
      Michal Privoznik 提交于
      There might be some use cases, where user wants to prepare the host or
      its environment prior to starting a network and do some cleanup after
      the network has been shut down. Consider all the functionality that
      libvirt doesn't currently have as an example what a hook script can
      possibly do.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f1ab06e4
  8. 14 2月, 2014 2 次提交
  9. 13 2月, 2014 1 次提交
  10. 11 2月, 2014 2 次提交
  11. 10 2月, 2014 2 次提交
    • P
      qemu: hyperv: Add support for timer enlightenments · 600bca59
      Peter Krempa 提交于
      Add a new <timer> for the HyperV reference time counter enlightenment
      and the iTSC reference page for Windows guests.
      
      This feature provides a paravirtual approach to track timer events for
      the guest (similar to kvmclock) with the option to use real hardware
      clock on systems with a iTSC with compensation across various hosts.
      600bca59
    • P
      schema: Fix guest timer specification schema according to the docs · bbd392ff
      Peter Krempa 提交于
      According to the documentation describing various tunables for domain
      timers not all the fields are supported by all the driver types. Express
      these in the RNG:
      
      - rtc, platform: Only these support the "track" attribute.
      - tsc: only one to support "frequency" and "mode" attributes
      - hpet, pit: tickpolicy/catchup attribute/element
      - kvmclock: no extra attributes are supported
      
      Additionally the attributes of the <catchup> element for
      tickpolicy='catchup' are optional according to the parsing code. Express
      this in the XML and fix a spurious space added while formatting the
      <catchup> element and add tests for it.
      bbd392ff
  12. 05 2月, 2014 2 次提交
    • L
      network: disallow <bandwidth>/<mac> for bridged/macvtap/hostdev networks · eafb53fe
      Laine Stump 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1057321
      
      pointed out that we weren't honoring the <bandwidth> element in
      libvirt networks using <forward mode='bridge'/>. In fact, these
      networks are just a method of giving a libvirt network name to an
      existing Linux host bridge on the system, and libvirt doesn't have
      enough information to know where to set such limits. We are working on
      a method of supporting network bandwidths for some specific cases of
      <forward mode='bridge'/>, but currently libvirt doesn't support it. So
      the proper thing to do now is just log an error when someone tries to
      put a <bandwidth> element in that type of network. (It's unclear if we
      will be able to do proper bandwidth limiting for macvtap networks, and
      most definitely we will not be able to support it for hostdev
      networks).
      
      While looking through the network XML documentation and comparing it
      to the networkValidate function, I noticed that we also ignore the
      presence of a mac address in the config in the same cases, rather than
      failing so that the user will understand that their desired action has
      not been taken.
      
      This patch updates networkValidate() (which is called any time a
      persistent network is defined, or a transient network created) to log
      an error and fail if it finds either a <bandwidth> or <mac> element
      and the network forward mode is anything except 'route'. 'nat', or
      nothing. (Yes, neither of those elements is acceptable for any macvtap
      mode, nor for a hostdev network).
      
      NB: This does *not* cause failure to start any existing network that
      contains one of those elements, so someone might have erroneously
      defined such a network in the past, and that network will continue to
      function unmodified. I considered it too disruptive to suddenly break
      working configs on the next reboot after a libvirt upgrade.
      eafb53fe
    • J
      Fix minor typo in governance doc · a6992f60
      Justin Clift 提交于
      While at it, also relinquish active commit rights:
      [x years between commits] is probably a poster child example of inactivity :)
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a6992f60
  13. 04 2月, 2014 1 次提交
  14. 30 1月, 2014 2 次提交
    • P
      docs/page.xls: remove unnecessary namespace attribute · fb321a00
      Pavel Hrdina 提交于
      It breaks the build on RHEL-5.10 and because it's only optional we
      could remove it from the code. The default namespace will be used.
      This hunk was introduced by commit 237a088b.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      fb321a00
    • O
      qemu: Don't fail if the SCSI host device is shareable between domains · fd243fc4
      Osier Yang 提交于
      It doesn't make sense to fail if the SCSI host device is specified
      as "shareable" explicitly between domains (NB, it works if and only
      if the device is specified as "shareable" for *all* domains,
      otherwise it fails).
      
      To fix the problem, this patch introduces an array for virSCSIDevice
      struct, which records all the names of domain which are using the
      device (note that the recorded domains must specify the device as
      shareable).  And the change on the data struct brings on many
      subsequent changes in the code.
      
      Prior to this patch, the "shareable" tag didn't work as expected,
      it actually work like "non-shareable".  So this patch also added notes
      in formatdomain.html to declare the fact.
      
      * src/util/virscsi.h:
        - Remove virSCSIDeviceGetUsedBy
        - Change definition of virSCSIDeviceGetUsedBy and virSCSIDeviceListDel
        - Add virSCSIDeviceIsAvailable
      
      * src/util/virscsi.c:
        - struct virSCSIDevice: Change "used_by" to be an array; Add
          "n_used_by" as the array count
        - virSCSIDeviceGetUsedBy: Removed
        - virSCSIDeviceFree: frees the "used_by" array
        - virSCSIDeviceSetUsedBy: Copy the domain name to avoid potential
          memory corruption
        - virSCSIDeviceIsAvailable: New
        - virSCSIDeviceListDel: Change the logic, for device which is already
          in the list, just remove the corresponding entry in "used_by". And
          since it's only used in one place, we can safely removing the code
          to find out the dev in the list first.
        - Copyright updating
      
      * src/libvirt_private.sys:
        - virSCSIDeviceGetUsedBy: Remove
        - virSCSIDeviceIsAvailable: New
      
      * src/qemu/qemu_hostdev.c:
        - qemuUpdateActiveScsiHostdevs: Check if the device existing before
          adding it to the list;
        - qemuPrepareHostdevSCSIDevices: Error out if the not all domains
          use the device as "shareable"; Also don't try to add the device
          to the activeScsiHostdevs list if it already there; And make
          more sensible error w.r.t the current "shareable" value in
          driver->activeScsiHostdevs.
        - qemuDomainReAttachHostScsiDevices: Change the logic according
          to the changes on helpers.
      Signed-off-by: NOsier Yang <jyang@redhat.com>
      fd243fc4
  15. 29 1月, 2014 1 次提交
    • P
      snapshot: Add support for specifying snapshot disk backing type · 7076b4b7
      Peter Krempa 提交于
      Add support for specifying various types when doing snapshots. This will
      later allow to do snapshots on network backed volumes. Disks of type
      'volume' are not supported by snapshots (yet).
      
      Also amend the test suite to check parsing of the various new disk
      types that can now be specified.
      7076b4b7
  16. 27 1月, 2014 1 次提交
  17. 21 1月, 2014 1 次提交
    • F
      spice: expose the QEMU disable file transfer option · 08d07e5f
      Francesco Romani 提交于
      spice-server offers an API to disable file transfer messages
      on the agent channel between the client and the guest.
      This is supported in qemu through the disable-agent-file-xfer option.
      
      This patch exposes this option to libvirt.
      Adds a new element 'filetransfer', with one property,
      'enable', which accepts a boolean.
      Default is enabled, for backward compatibility.
      
      Depends on the capability exported in the first patch of the series.
      Signed-off-by: NFrancesco Romani <fromani@redhat.com>
      08d07e5f
  18. 20 1月, 2014 1 次提交
  19. 18 1月, 2014 1 次提交
  20. 16 1月, 2014 2 次提交
    • D
      Release of libvirt-1.2.1 · 7b84b167
      Daniel Veillard 提交于
      * docs/news.html.in libvirt.spec.in: updated for the release
      * po/*.po*: updated localization from transifex and regenerated
      7b84b167
    • E
      docs: mention maintenance branches · 908903b3
      Eric Blake 提交于
      Mitre tried to assign us two separate CVEs for the fix for
      https://bugzilla.redhat.com/show_bug.cgi?id=1047577, on the
      grounds that the fixes were separated by more than an hour
      and thus triggered different hourly snapshots.  But we
      explicitly do NOT want to treat transient security bugs as
      CVEs if they can only be triggered by patches in libvirt.git
      but where the problem is cleaned up before a formal release.
      
      Meanwhile, I noticed that while our wiki mentioned maintenance
      branches and releases, our formal documentation did not.
      
      * docs/downloads.html.in: Contrast hourly snapshots with
      maintenance branches.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      908903b3
  21. 11 1月, 2014 1 次提交
    • E
      schema: fix idmap validation · dd0dda2e
      Eric Blake 提交于
      When idmap was added to LXC, we forgot to cover it in the testsuite.
      The schema was missing an <element> layer, and as a result,
      virt-xml-validate was failing on valid dumpxml output.
      
      Reported by Eduard - Gabriel Munteanu on IRC.
      
      * docs/schemas/domaincommon.rng (idmap): Include <idmap> element,
      and support interleaves.
      * tests/lxcxml2xmldata/lxc-idmap.xml: New file.
      * tests/lxcxml2xmltest.c (mymain): Test it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      dd0dda2e
  22. 08 1月, 2014 1 次提交
  23. 07 1月, 2014 2 次提交
    • E
      maint: improve VIR_ERR_INVALID_CONN usage · db3dd082
      Eric Blake 提交于
      The datatype.c object checks could result in a message like:
      
      error: invalid connection pointer in no connection
      
      This consolidates all clients of this message to have uniform contents:
      
      error: invalid connection pointer in someFunc
      
      Note that virCheckConnectReturn raises an error immediately; in
      datatypes.c, where we don't need to raise the error (but instead
      just leave it in the thread-local setting), we use
      virCheckConnectGoto and the cleanup label instead.  Then, for
      consistency in that file, all subsequent error messages are
      touched to also use the cleanup error label.
      
      * src/datatypes.h (virCheckConnectReturn)
      (virCheckConnectGoto): New macros.
      * src/datatypes.c: Use new macro.
      * src/libvirt-qemu.c (virDomainQemuAttach): Likewise.
      (virLibConnError): Delete unused macro.
      * src/libvirt-lxc.c (virLibConnError): Likewise.
      * src/libvirt.c: Use new macro throughout.
      * docs/api_extension.html.in: Modernize documentation.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      db3dd082
    • P
      AArch64: Porting of armv7l conditons to run qemu for aarch64. · 27e32e0f
      Pranavkumar Sawargaonkar 提交于
      AArch64 qemu has similar behavior as armv7l, like use of mmio etc.
      This patch adds similar bypass checks what we have for armv7l to aarch64.
      E.g. we are enabling mmio transport for Nicdev.
      Making addDefaultUSB and addDefaultMemballoon to false etc.
      
      V3:
      - Adding missing domain rng schema for aarcg64 and test case in
        testutilsqemu.c which was causing test suite failure
        while running make check.
      
      V2:
      - Added testcase to qemuxml2argvtest as suggested
        during review comments of V1.
      
      V1:
      - Initial patch.
      Signed-off-by: NAnup Patel <anup.patel@linaro.org>
      Signed-off-by: NPranavkumar Sawargaonkar <pranavkumar@linaro.org>
      27e32e0f
  24. 19 12月, 2013 1 次提交
  25. 17 12月, 2013 1 次提交
  26. 13 12月, 2013 2 次提交
  27. 10 12月, 2013 1 次提交
  28. 09 12月, 2013 1 次提交
  29. 06 12月, 2013 1 次提交