1. 20 4月, 2016 1 次提交
  2. 19 4月, 2016 6 次提交
  3. 18 4月, 2016 10 次提交
    • E
      admin: Introduce virAdmServerSetThreadPoolParameters · 93ab4da5
      Erik Skultety 提交于
      Since threadpool increments the current number of threads according to current
      load, i.e. how many jobs are waiting in the queue. The count however, is
      constrained by max and min limits of workers. The logic of this new API works
      like this:
          1) setting the minimum
              a) When the limit is increased, depending on the current number of
                 threads, new threads are possibly spawned if the current number of
                 threads is less than the new minimum limit
              b) Decreasing the minimum limit has no possible effect on the current
                 number of threads
          2) setting the maximum
              a) Icreasing the maximum limit has no immediate effect on the current
                 number of threads, it only allows the threadpool to spawn more
                 threads when new jobs, that would otherwise end up queued, arrive.
              b) Decreasing the maximum limit may affect the current number of
                 threads, if the current number of threads is less than the new
                 maximum limit. Since there may be some ongoing time-consuming jobs
                 that would effectively block this API from killing any threads.
                 Therefore, this API is asynchronous with best-effort execution,
                 i.e. the necessary number of workers will be terminated once they
                 finish their previous job, unless other workers had already
                 terminated, decreasing the limit to the requested value.
          3) setting priority workers
              - both increase and decrease in count of these workers have an
                immediate impact on the current number of workers, new ones will be
                spawned or some of them get terminated respectively.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      93ab4da5
    • E
      admin: Introduce virAdmServerGethreadPoolParameters · caa16d31
      Erik Skultety 提交于
      New API to retrieve current server workerpool specs. Since it uses typed
      parameters, more specs to retrieve can be further included in the pool of
      supported ones.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      caa16d31
    • E
      util: Add more getters to threadpool parameters · c516e7d3
      Erik Skultety 提交于
      In order for the client to see all thread counts and limits, current total
      and free worker count getters need to be introduced. Client might also be
      interested in the job queue length, so provide a getter for that too. As with
      the other getters, preparing for the admin interface, mutual exclusion is used
      within all getters.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      c516e7d3
    • E
      util: Use a mutex when retrieving threadpool data · e981607e
      Erik Skultety 提交于
      So far, the values the affected getters retrieve are static, i.e. there's no
      way of changing them during runtime. But admin interface will later enable
      not only getting but changing them as well. So to prevent phenomenons like
      torn reads or concurrent reads and writes of unaligned values, use mutual
      exclusion when getting these values (writes do, understandably, use them
      already).
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      e981607e
    • E
      util: Report system error when virThreadCreateFull fails · 79685175
      Erik Skultety 提交于
      Otherwise 'Unknown' error will be returned to client.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      79685175
    • E
      util: Refactor thread creation by introducing virThreadPoolExpand · 396f8051
      Erik Skultety 提交于
      When either creating a threadpool, or creating a new thread to accomplish a job
      that had been placed into the jobqueue, every time thread-specific data need to
      be allocated, threadpool needs to be (re)-allocated and thread count indicators
      updated. Make the code clearer to read by compressing these operations into a
      more complex one.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      396f8051
    • E
      admin: Enable usage of typed parameters · 84d21591
      Erik Skultety 提交于
      Make all relevant changes to admin protocol, in order to achieve $(subj)
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      84d21591
    • J
      Libvirt: virTypedParamsValidate: Fix detection of multiple parameters · 0e570a6a
      Jason J. Herne 提交于
      virTypedParamsValidate currently uses an index based check to find
      duplicate parameters. This check does not work. Consider the following
      simple example:
      
      We have only 2 keys
      A  (multiples allowed)
      B  (multiples NOT allowed)
      
      We are given the following list of parameters to check:
      A
      A
      B
      
      If you work through the validation loop you will see that our last iteration
      through the loop has i=2 and j=1. In this case, i > j and keys[j].value.i will
      indicate that multiples are not allowed. Both conditionals are satisfied so
      an incorrect error will be given: "parameter '%s' occurs multiple times"
      
      This patch replaces the index based check with code that remembers
      the name of the last parameter seen and only triggers the error case if
      the current parameter name equals the last one. This works because the
      list is sorted and duplicate parameters will be grouped together.
      
      In reality, we hit this bug while using selective block migration to migrate
      a guest with 5 disks. 5 was apparently just the right number to push i > j
      and hit this bug.
      
      virsh migrate --live guestname --copy-storage-all
                    --migrate-disks vdb,vdc,vdd,vde,vdf
                    qemu+ssh://dsthost/systemSigned-off-by: NJason J. Herne <jjherne@linux.vnet.ibm.com>
      Reviewed-by: NEric Farman <farman@linux.vnet.ibm.com>
      0e570a6a
    • D
      qemu: migration: new migration param for persistent destination XML · b028e9d7
      Dmitry Andreev 提交于
      Migration API allows to specify a destination domain configuration.
      Offline domain has only inactive XML and it is replaced by configuration
      specified using VIR_MIGRATE_PARAM_DEST_XML param. In case of live
      migration VIR_MIGRATE_PARAM_DEST_XML param is applied for active XML.
      
      This commit introduces the new VIR_MIGRATE_PARAM_PERSIST_XML param
      that can be used within live migration to replace persistent/inactive
      configuration.
      
      Required for: https://bugzilla.redhat.com/show_bug.cgi?id=835300
      b028e9d7
    • D
      qemuMigrationCookieAddPersistent: move it out and change argument type · dc311c64
      Dmitry Andreev 提交于
      This changes allow to use qemuMigrationCookieAddPersistent with
      an XML definition that isn't assigned to any domain.
      dc311c64
  4. 17 4月, 2016 1 次提交
    • R
      ZFS: Support sparse volumes · c81bba4f
      Richard Laager 提交于
      By default, `zfs create -V ...` reserves space for the entire volsize,
      plus some extra (which attempts to account for overhead).
      
      If `zfs create -s -V ...` is used instead, zvols are (fully) sparse.
      
      A middle ground (partial allocation) can be achieved with
      `zfs create -s -o refreservation=... -V ...`.  Both libvirt and ZFS
      support this approach, so the ZFS storage backend should support it.
      Signed-off-by: NRichard Laager <rlaager@wiktel.com>
      c81bba4f
  5. 16 4月, 2016 5 次提交
    • J
      Resolve a couple of memory leaks · 727a3c58
      John Ferlan 提交于
      Commit id '4b75237f' seems to have triggered Coverity into finding
      at least one memory leak in xen_xl.c for error path for cleanup where
      the listenAddr would be leaked. Reviewing other callers, it seems that
      qemu_parse_command.c would have the same issue, so just it too.
      727a3c58
    • J
      qemu: Fix qemuBuildCommandLine prototype · 6c09c17e
      John Ferlan 提交于
      Commit id '0da965c5' removed the 11th parameter, but neglected to
      remove the ATTRIBUTE_NONNULL for it and adjust the 17th and 18th.
      6c09c17e
    • J
      libxl: use LIBXL_API_VERSION 0x040200 · e7440656
      Jim Fehlig 提交于
      To ensure the libvirt libxl driver will build with future versions
      of Xen where the libxl API may change in incompatible ways,
      explicitly use LIBXL_API_VERSION 0x040200. The libxl driver
      does use new libxl APIs that have been added since Xen 4.2, but
      currently it does not make use of any changes made to existing
      APIs such as libxl_domain_create_restore or libxl_set_vcpuaffinity.
      The version can be bumped if/when the libxl driver consumes the
      changed APIs.
      
      Further details can be found in the following discussion thread
      
      https://www.redhat.com/archives/libvir-list/2016-April/msg00178.htmlSigned-off-by: NJim Fehlig <jfehlig@suse.com>
      e7440656
    • M
      qemu: Label master key file · 744d74fa
      Martin Kletzander 提交于
      When creating the master key, we used mode 0600 (which we should) but
      because we were creating it as root, the file is not readable by any
      qemu running as non-root.  Fortunately, it's just a matter of labelling
      the file.  We are generating the file path few times already, so let's
      label it in the same function that has access to the path already.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      744d74fa
    • J
      ploop: Fix build with gluster · 00307b5d
      Jiri Denemark 提交于
      Recent patches addiing support for ploop volumes did not properly update
      gluster backend.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      00307b5d
  6. 15 4月, 2016 17 次提交