1. 06 8月, 2014 2 次提交
  2. 05 8月, 2014 1 次提交
  3. 04 8月, 2014 7 次提交
    • J
      Don't overwrite errors from virNetDevBandwidthSet · 6dac5d06
      Ján Tomko 提交于
      Otherwise this beautiful error would be overwritten when
      the function is called with a really high rate number:
      
      2014-07-28 12:51:47.920+0000: 2304: error : virCommandWait:2399 :
      internal error: Child process (/sbin/tc class add dev vnet0 parent 1:
      classid 1:1 htb rate 4294968kbps) unexpected exit status 1: Illegal "rate"
      Usage: ... qdisc add ... htb [default N] [r2q N]
       default  minor id of class to which unclassified packets are sent {0}
       r2q      DRR quantums are computed as rate in Bps/r2q {10}
       debug    string of 16 numbers each 0-3 {0}
      
      ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]
                            [prio P] [slot S] [pslot PS]
                            [ceil R2] [cburst B2] [mtu MTU] [quantum Q]
       rate     rate allocated to this class (class can still borrow)
       burst    max bytes burst which can be accumulated during idle period {computed}
       mpu      minimum packet size used in rate computations
       overhead per-packet size overhead used in rate computations
       linklay  adapting to a linklayer e.g. atm
       ceil     definite upper class rate (no borrows) {rate}
       cburst   burst but for ceil {computed}
       mtu      max packet size we create rate map for {1600}
       prio     priority of leaf; lowe
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1043735
      6dac5d06
    • J
      virsh: check if domiftune parameters fit into UINT · ee668206
      Ján Tomko 提交于
      We parse the bandwidth rates as unsinged long long,
      then try to fit them in VIR_TYPED_PARAM_UINT.
      
      Report an error if they exceed UINT_MAX instead of
      quietly using wrong values.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1043735
      ee668206
    • J
      storage: Refresh storage pool after upload · 4a85bf3e
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1072653
      
      Upon successful upload of a volume, the target volume and storage pool
      were not updated to reflect any changes as a result of the upload. Make
      use of the existing stream close callback mechanism to force a backend
      pool refresh to occur in a separate thread once the stream closes. The
      separate thread should avoid potential deadlocks if the refresh needed
      to wait on some event from the event loop which is used to perform
      the stream callback.
      4a85bf3e
    • E
      Post-release version bump for new dev cycle · e3e1e52a
      Eric Blake 提交于
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e3e1e52a
    • M
      domtop: Remove unused variable · dc64be90
      Michal Privoznik 提交于
      The variable 'k' in the print_cpu_usage function is not used anywhere
      and can fire a warning on some compilers.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      dc64be90
    • M
      domtop: Turn parse_argv into void · 859aa405
      Michal Privoznik 提交于
      Currently, the function follows the usual pattern used in our code:
      
        int ret = -1;
        ...
        ret = 0;
       cleanup:
        return ret;
      
      However, the function always call exit() on error, so the cleanup
      label is never jumped onto. Therefore, it doesn't make any sense to
      have the parse_argv function return an integer value, if it
      effectively can return only value of zero.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      859aa405
    • M
      qemu: fix comment in qemu.conf · b2574b47
      Martin Kletzander 提交于
      There are multiple mount points after commit 725a211f, but one comment
      wasn't changed to use plurals.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      b2574b47
  4. 03 8月, 2014 3 次提交
    • D
      Release of libvirt-1.2.7 · 21b59b65
      Daniel Veillard 提交于
      * docs/news.html.in libvirt.spec.in: update for the release
      * po/*.po*: update localizations and regenerate
      21b59b65
    • E
      build: fix build on cygwin · 478d93ad
      Eric Blake 提交于
      Cygwin has getifaddrs(), but not AF_LINK, leading to:
      
      util/virstats.c: In function 'virNetInterfaceStats':
      util/virstats.c:138:41: error: 'AF_LINK' undeclared (first use in this function)
               if (ifa->ifa_addr->sa_family != AF_LINK)
      ...
      
      * src/util/virstats.c (virNetInterfaceStats): Only use getifaddrs
      if AF_LINK is present.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      478d93ad
    • L
      network: always set disable_ipv6, even when it should be 0 · c0788af0
      Laine Stump 提交于
      libvirt previously only touched an interface's disable_ipv6 setting in
      sysfs if it needed to be set to 1, assuming that 0 is the
      default. Apparently that isn't always the case though (kernel 3.15.7-1
      in Arch Linux reportedly defaults a new interface's disable_ipv6
      setting to 1) so this patch explicitly sets it to 0 or 1 as
      appropriate.
      c0788af0
  5. 01 8月, 2014 1 次提交
  6. 30 7月, 2014 7 次提交
    • R
      docs: bhyve: document recent changes · 221b1828
      Roman Bogorodskiy 提交于
       - mention that one disk and one network limitation
         is no longer current for 1.2.6 and newer
       - add 'cdrom' device to the sample domain XML
      221b1828
    • E
      blockcommit: turn on active commit · cfb16b8e
      Eric Blake 提交于
      With this in place, I can (finally!) now do:
      
      virsh blockcommit $dom vda --shallow --verbose --pivot
      
      and watch qemu shorten the backing chain by one, followed by
      libvirt automatically updating the dumpxml output, effectively
      undoing the work of virsh snapshot-commit --no-metadata --disk-only.
      Commit is SOOOO much faster than blockpull, when I'm still fairly
      close in time to when the temporary qcow2 wrapper file was created
      via a snapshot operation!
      
      * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Implement live
      commit.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      cfb16b8e
    • E
      blockcommit: track job type in xml · 232a31be
      Eric Blake 提交于
      A future patch is going to wire up qemu active block commit jobs;
      but as they have similar events and are canceled/pivoted in the
      same way as block copy jobs, it is easiest to track all bookkeeping
      for the commit job by reusing the <mirror> element.  This patch
      adds domain XML to track which job was responsible for creating a
      mirroring situation, and adds a job='copy' attribute to all
      existing uses of <mirror>.  Along the way, it also massages the
      qemu monitor backend to read the new field in order to generate
      the correct type of libvirt job (even though it requires a
      future patch to actually cause a qemu event that can be reported
      as an active commit).  It also prepares to update persistent XML
      to match changes made to live XML when a copy completes.
      
      * docs/schemas/domaincommon.rng: Enhance schema.
      * docs/formatdomain.html.in: Document it.
      * src/conf/domain_conf.h (_virDomainDiskDef): Add a field.
      * src/conf/domain_conf.c (virDomainBlockJobType): String conversion.
      (virDomainDiskDefParseXML): Parse job type.
      (virDomainDiskDefFormat): Output job type.
      * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Distinguish
      active from regular commit.
      * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Set job type.
      (qemuDomainBlockPivot, qemuDomainBlockJobImpl): Clean up job type
      on completion.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml:
      Update tests.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-active-commit.xml: New
      file.
      * tests/qemuxml2xmltest.c (mymain): Drive new test.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      232a31be
    • C
      Domain config: write <features/> if some capabilities are set. · 251d75a8
      Cédric Bosdonnat 提交于
      If all features are set to default (including the capabilities policy),
      but some capabilities are toggled, we need to output the <features>
      element when formatting the config.
      251d75a8
    • C
      docs: fix an incorrect example for memoryBacking · 24c55ee0
      Chen Hanxiao 提交于
      commit 136ad497
      forgot to add an end-tags for hugepages.
      Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
      24c55ee0
    • E
      blockjob: properly track blockcopy xml changes on disk · febf84c2
      Eric Blake 提交于
      We were not directly saving the domain XML to file after starting
      or finishing a blockcopy.  Without the startup write, a libvirtd
      restart in the middle of a copy job would forget that the job was
      underway.  Then at pivot, we were indirectly writing new XML in
      reaction to events that occur as we stop and restart the guest CPUs.
      But there was a race: since pivot is an async action, it is possible
      that libvirtd is restarted before the pivot completes, so if XML
      changes during the event, that change was not written.  The original
      blockcopy code cleared out the <mirror> element prior to restarting
      the CPUs, but this is also a race, observed if a user does an async
      pivot and a dumpxml before the event occurs.  Furthermore, this race
      will interfere with active commit in a future patch, because that
      code will rely on the <mirror> element at the time of the qemu event
      to determine whether to inform the user of a normal commit or an
      active commit.
      
      Fix things by saving state any time we modify live XML, while
      delaying XML disk modifications until after the event completes.  We
      still need a to teach libvirtd restarts to examine all existing
      <mirror> elements to see if the job completed in the meantime (that
      is, if libvirtd misses the event, the updated state still needs to be
      updated in live XML), but that will be a later patch, in part because
      we also need to to start taking advantage of newer qemu's ability to
      keep the job around after completion rather than the current usage
      where the job disappears both on error and on success.
      
      * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Track XML change
      on disk.
      (qemuDomainBlockJobImpl, qemuDomainBlockPivot): Move job-end XML
      rewrites...
      * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): ...here.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      febf84c2
    • E
      blockcopy: add more XML for state tracking · 9a212d67
      Eric Blake 提交于
      Doing a blockcopy operation across a libvirtd restart is not very
      robust at the moment.  In particular, we are clearing the <mirror>
      element prior to telling qemu to finish the job.  Also, thanks to the
      ability to request async completion, the user can easily regain
      control prior to qemu actually finishing the effort, and they should
      be able to poll the domain XML to see if the job is still going.
      
      A future patch will fix things to actually wait until qemu is done
      before modifying the XML to reflect the job completion.  But since
      qemu issues identical BLOCK_JOB_COMPLETE events regardless of whether
      the job was cancelled (kept the original disk) or completed (pivoted
      to the new disk), we have to track which of the two operations were
      used to end the job.  Furthermore, we'd like to avoid attempts to
      end a job where we are already waiting on an earlier request to qemu
      to end the job.  Likewise, if we miss the qemu event (perhaps because
      it arrived during a libvirtd restart), we still need enough state
      recorded to be able to determine how to modify the domain XML once
      we reconnect to qemu and manually learn whether the job still exists.
      
      Although this patch doesn't actually fix the problem, it is a
      preliminary step that makes it possible to track whether a job
      has already begun steps towards completion.
      
      * src/conf/domain_conf.h (virDomainDiskMirrorState): New enum.
      (_virDomainDiskDef): Convert bool mirroring to new enum.
      * src/conf/domain_conf.c (virDomainDiskDefParseXML)
      (virDomainDiskDefFormat): Handle new values.
      * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Adjust
      client.
      * src/qemu/qemu_driver.c (qemuDomainBlockPivot)
      (qemuDomainBlockJobImpl): Likewise.
      * docs/schemas/domaincommon.rng (diskMirror): Expose new values.
      * docs/formatdomain.html.in (elementsDisks): Document it.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Test it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9a212d67
  7. 29 7月, 2014 12 次提交
    • H
      qemu: error out if PCI passthrough type is not supported · c5b02b67
      Hu Tao 提交于
      If PCI passthrough type is not supported, we should error out rather than
      continue building the command line.
      
      When starting a domain, the type has been already checked by
      qemuPrepareHostdevPCICheckSupport() before building qemu command line,
      so the problem doesn't emerge.
      
      But when coverting a domain xml without specifying passthrough type explictly
      to qemu arg, we will get a malformed command line.
      
      the xml:
      
          <hostdev mode='subsystem' type='pci' managed='yes'>
            <source>
              <address domain='0x0001' bus='0x03' slot='0x00' function='0x0'/>
            </source>
            <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
          </hostdev>
      
      the converted command line:
      
        -device ,host=0001:03:00.0,id=hostdev0,bus=pci.0,addr=0x5
      
      After this patch, virsh gives an error message:
      
        virsh domxml-to-native qemu-argv /tmp/tmp.xml
        error: internal error: invalid PCI passthrough type 'default'
      Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
      c5b02b67
    • M
    • M
      domain: Introduce ./hugepages/page/[@size, @unit, @nodeset] · 136ad497
      Michal Privoznik 提交于
        <memoryBacking>
          <hugepages>
            <page size="1" unit="G" nodeset="0-3,5"/>
            <page size="2" unit="M" nodeset="4"/>
          </hugepages>
        </memoryBacking>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      136ad497
    • M
      virbitmap: Introduce virBitmapOverlaps · 49baed2b
      Michal Privoznik 提交于
      This internal API just checks if two bitmaps intersect or not.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      49baed2b
    • M
      qemu: Utilize virFileFindHugeTLBFS · 725a211f
      Michal Privoznik 提交于
      Use better detection of hugetlbfs mount points. Yes, there can be
      multiple mount points each serving different huge page size.
      
      Since we already have ability to override the mount point in the
      qemu.conf file, this crazy backward compatibility code is brought in.
      Now we allow multiple mount points, so the "hugetlbfs_mount" option
      must take an list of strings (mount points). But previously, it was
      just a string, so we must accept both types now.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      725a211f
    • M
      Introduce virFileFindHugeTLBFS · be0782e1
      Michal Privoznik 提交于
      This should iterate over mount tab and search for hugetlbfs among with
      looking for the default value of huge pages.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      be0782e1
    • P
      storage: create: Create files with correct mode · f8cf4962
      Peter Krempa 提交于
      Use correct mode when pre-creating files (for snapshots). The refactor
      changing to storage driver usage caused a regression as some systems
      created the file with 000 permissions forbidding qemu to write the file.
      
      Pass mode to the creating functions to avoid the problem.
      
      Regression since 185e07a5.
      f8cf4962
    • R
      schema: bhyve and nmdm updates · 1281f4a1
      Roman Bogorodskiy 提交于
      * docs/schemas/domaincommon.rng: Add bhyve domain type, nmdm
        serial type and master and slave optional attributes for
        serial that are used by nmdm
      * tests/domainschematest: Add bhyvexml2argvdata directory
        to validate bhyve XMLs
      1281f4a1
    • C
      nodedev: fix a uninitialized variable build failure · 71ee25f5
      Chen Hanxiao 提交于
      Fix a -Werror=maybe-uninitialized warning
      Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      71ee25f5
    • E
      nodedev: fix pci express memory leak · c6a4d268
      Eric Blake 提交于
      Leak introduced in commit 16ebf10f (v1.2.6), detected by valgrind:
      
      ==9816== 216 (96 direct, 120 indirect) bytes in 6 blocks are definitely lost in loss record 665 of 821
      ==9816==    at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==9816==    by 0x50836FB: virAlloc (viralloc.c:144)
      ==9816==    by 0x1DBDBE27: udevProcessPCI (node_device_udev.c:546)
      ==9816==    by 0x1DBDD79D: udevGetDeviceDetails (node_device_udev.c:1293)
      
      * src/util/virpci.h (virPCIEDeviceInfoFree): New prototype.
      * src/util/virpci.c (virPCIEDeviceInfoFree): New function.
      * src/conf/node_device_conf.c (virNodeDevCapsDefFree): Clear
      pci_express under pci case.
      (virNodeDevCapPCIDevParseXML): Avoid leak.
      * src/node_device/node_device_udev.c (udevProcessPCI): Likewise.
      * src/libvirt_private.syms (virpci.h): Export it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c6a4d268
    • E
      nodedev: move pci express types to virpci.h · be05c141
      Eric Blake 提交于
      Finding virPCIE* code is more intuitive if located in virpci.h
      instead of node_device_conf.h.
      
      * src/conf/node_device_conf.h (virPCIELinkSpeed, virPCIELink)
      (virPCIEDeviceInfo): Move...
      * src/util/virpci.h: ...here.
      * src/conf/node_device_conf.c (virPCIELinkSpeed): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      be05c141
    • E
      nodedev: let compiler help us on switches · 3261895a
      Eric Blake 提交于
      The compiler can alert us to places where we need to expand switch
      statements because we add a new enum value, but only if we don't
      have a default case.
      
      * src/conf/node_device_conf.c (virNodeDeviceDefFormat)
      (virNodeDevCapsDefParseXML, virNodeDevCapsDefFree): Drop default
      case.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      3261895a
  8. 28 7月, 2014 3 次提交
  9. 26 7月, 2014 2 次提交
  10. 25 7月, 2014 2 次提交