1. 27 4月, 2016 1 次提交
  2. 26 4月, 2016 7 次提交
    • J
      secret: Introduce virSecretObjGetValue and virSecretObjGetValueSize · 43d3e3c1
      John Ferlan 提交于
      Introduce the final accessor's to _virSecretObject data and move the
      structure from virsecretobj.h to virsecretobj.c
      
      The virSecretObjSetValue logic will handle setting both the secret
      value and the value_size. Some slight adjustments to the error path
      over what was in secretSetValue were made.
      
      Additionally, a slight logic change in secretGetValue where we'll
      check for the internalFlags and error out before checking for
      and erroring out for a NULL secret->value. That way, it won't be
      obvious to anyone that the secret value wasn't set rather they'll
      just know they cannot get the secret value since it's private.
      43d3e3c1
    • J
      secret: Introduce virSecretObj{Get|Set}Def · 9e1e5621
      John Ferlan 提交于
      Introduce fetch and set accessor to the secretObj->def field for usage
      by the driver to avoid the driver needing to know the format of virSecretObj
      9e1e5621
    • J
      secret: Introduce virSecretObjSave{Config|Data} · ac9ffd60
      John Ferlan 提交于
      Move and rename the secretRewriteFile, secretSaveDef, and secretSaveValue
      from secret_driver to virsecretobj
      
      Need to make some slight adjustments since the secretSave* functions
      called secretEnsureDirectory, but otherwise mostly just a move of code.
      ac9ffd60
    • J
      secret: Introduce virSecretObjDelete{Config|Data} · d467ac07
      John Ferlan 提交于
      Move and rename secretDeleteSaved from secret_driver into virsecretobj and
      split it up into two parts since there is error path code that looks to
      just delete the secret data file
      d467ac07
    • J
      secret: Move and rename secretLoadAllConfigs · 85ec94f8
      John Ferlan 提交于
      Move to secret_conf.c and rename to virSecretLoadAllConfigs. Also includes
      moving/renaming the supporting virSecretLoad, virSecretLoadValue, and
      virSecretLoadValidateUUID.
      85ec94f8
    • J
      secret: Use the hashed virSecretObjList · 993f9128
      John Ferlan 提交于
      This patch replaces most of the guts of secret_driver.c with recently
      added secret_conf.c APIs in order manage secret lists and objects
      using the hashed virSecretObjList* lookup API's.
      993f9128
    • J
      secret: Introduce virSecretUsageIDForDef · 615c8cce
      John Ferlan 提交于
      Move the driver specific secretUsageIDForDef into secret_conf.c. It could
      be more of a general purpose API.
      615c8cce
  3. 19 4月, 2016 1 次提交
  4. 18 4月, 2016 2 次提交
    • 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
      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
  5. 15 4月, 2016 4 次提交
  6. 14 4月, 2016 1 次提交
  7. 13 4月, 2016 9 次提交
  8. 07 4月, 2016 2 次提交
    • J
      secret: Introduce virSecretGetSecretString · 2844de6f
      John Ferlan 提交于
      Commit id 'fb2bd208' essentially copied the qemuGetSecretString
      creating an libxlGetSecretString.  Rather than have multiple copies
      of the same code, create src/secret/secret_util.{c,h} files and
      place the common function in there.
      
      Modify the the build in order to build the module as a library
      which is then pulled in by both the qemu and libxl drivers for
      usage from both qemu_command.c and libxl_conf.c
      2844de6f
    • J
      util: Introduce virRandomBytes · 6af73f53
      John Ferlan 提交于
      Using the existing virUUIDGenerateRandomBytes, move API to virrandom.c
      rename it to virRandomBytes and add it to libvirt_private.syms.
      
      This will be used as a fallback for generating a domain master key.
      6af73f53
  9. 30 3月, 2016 2 次提交
  10. 29 3月, 2016 1 次提交
  11. 21 3月, 2016 2 次提交
    • M
      util: Add virSocketAddrSetIPv[46]AddrNetOrder and use it · 573c41a2
      Martin Kletzander 提交于
      This allows setting the address in host and/or network order and makes
      the naming consistent.  Now you don't need to call [hn]to[nh]l()
      functions as that is taken care of by these functions.  Also, now
      the *NetOrder take the address in network order, the other functions in
      host order so the naming and usage is consistent.  Some places were
      having the address in network order and calling ntohl() just so the
      original function can call htonl() again.  This makes it nicer to read.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      573c41a2
    • C
      domain: Add virDomainDefAddImplicitDevices · 9a423d18
      Cole Robinson 提交于
      It's just a combination of AddImplicitControllers, and AddConsoleCompat.
      Every caller that wants ImplicitControllers also wants the ConsoleCompat
      AFAICT, so lump them together. We also need it for future patches.
      9a423d18
  12. 19 3月, 2016 3 次提交
  13. 09 3月, 2016 2 次提交
    • P
      conf: refactor checking for unsupported memory devices · 185d13b1
      Peter Krempa 提交于
      Introduce a helper to check supported device and domain config and move
      the memory hotplug checks to it.
      
      The advantage of this approach is that by default all new features are
      considered unsupported by all hypervisors unless specifically changed
      rather than the previous approach where every hypervisor would need to
      declare that a given feature is unsupported.
      185d13b1
    • P
      conf: Extract code filling data for virDomainGetVcpuPinInfo · e498e904
      Peter Krempa 提交于
      The implementation of the inner guts of the function is similar for all
      drivers, so we can add a helper and not have to reimplement it three
      times.
      e498e904
  14. 08 3月, 2016 1 次提交
    • J
      Introduce job completed event · f2893001
      Jiri Denemark 提交于
      The VIR_DOMAIN_EVENT_ID_JOB_COMPLETED event will be triggered once a job
      (such as migration) finishes and it will contain statistics for the job
      as one would get by calling virDomainGetJobStats. Thanks to this event
      it is now possible to get statistics of a completed migration of a
      transient domain on the source host.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      f2893001
  15. 03 3月, 2016 1 次提交
    • M
      Drop inline keyword from some functions. · be8b536a
      Michal Privoznik 提交于
      While trying to build with -Os I've encountered some build
      failures.
      
      util/vircommand.c: In function 'virCommandAddEnvFormat':
      util/vircommand.c:1257:1: error: inlining failed in call to 'virCommandAddEnv': call is unlikely and code size would grow [-Werror=inline]
       virCommandAddEnv(virCommandPtr cmd, char *env)
       ^
      util/vircommand.c:1308:5: error: called from here [-Werror=inline]
           virCommandAddEnv(cmd, env);
           ^
      This function is big enough for the compiler to be not inlined.
      This is the error message I'm seeing:
      
      Then virDomainNumatuneNodeSpecified is exported and called from
      other places. It shouldn't be inlined then.
      
      In file included from network/bridge_driver_platform.h:30:0,
                       from network/bridge_driver_platform.c:26:
      network/bridge_driver_linux.c: In function 'networkRemoveRoutingFirewallRules':
      ./conf/network_conf.h:350:1: error: inlining failed in call to 'virNetworkDefForwardIf.constprop': call is unlikely and code size would grow [-Werror=inline]
       virNetworkDefForwardIf(const virNetworkDef *def, size_t n)
       ^
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      be8b536a
  16. 01 3月, 2016 1 次提交