1. 17 3月, 2016 1 次提交
  2. 01 3月, 2016 1 次提交
  3. 12 2月, 2016 2 次提交
    • M
      vz: fix race condition when adding domain to domains list · 9c14a9ab
      Mikhail Feoktistov 提交于
      Race condition:
      User calls defineXML to create new instance.
      The main thread from vzDomainDefineXMLFlags() creates new instance by prlsdkCreateVm.
      Then this thread calls prlsdkAddDomain to add new domain to domains list.
      The second thread receives notification from hypervisor that new VM was created.
      It calls prlsdkHandleVmAddedEvent() and also tries to add new domain to domains list.
      These two threads call virDomainObjListFindByUUID() from prlsdkAddDomain() and don't find new domain.
      So they add two domains with the same uuid to domains list.
      
      This fix splits logic of prlsdkAddDomain() into two functions.
      1. vzNewDomain() creates new empty domain in domains list with the specific uuid.
      2. prlsdkLoadDomain() add data from VM to domain object.
      
      New algorithm for creating an instance:
      In vzDomainDefineXMLFlags() we add new domain to domain list by calling vzNewDomain()
      and only after that we call CreateVm() to create VM.
      It means that we "reserve" domain object with the specific uuid.
      After creation of new VM we add info from this VM
      to reserved domain object by calling prlsdkLoadDomain().
      
      Before this patch prlsdkLoadDomain() worked in 2 different cases:
      1. It creates and initializes new domain. Then updates it from sdk handle.
      2. It updates existed domain from sdk handle.
      In this patch we remove code which creates new domain from LoadDomain()
      and move it to vzNewDomain().
      Now prlsdkLoadDomain() only updates domain from skd handle.
      
      In notification handler prlsdkHandleVmAddedEvent() we check
      the existence of a domain and if it doesn't exist we add new domain by calling
      vzNewDomain() and load info from sdk handle via prlsdkLoadDomain().
      9c14a9ab
    • M
      vz: remove unused struct field · a7b2257e
      Mikhail Feoktistov 提交于
      In commit 7039bb3c we have removed code that saves uuid to vzDomObj.uuid
      So this field is no longer needed.
      a7b2257e
  4. 30 11月, 2015 1 次提交
    • M
      conf: Split virDomainObjList into a separate file · 90f3c0d7
      Michal Privoznik 提交于
      Our domain_conf.* files are big enough. Not only they contain XML
      parsing code, but they served as a storage of all functions whose
      name is virDomain prefixed. This is just wrong as it gathers not
      related functions (and modules) into one big file which is then
      harder to maintain. Split virDomainObjList module into a separate
      file called virdomainobjlist.[ch].
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      90f3c0d7
  5. 08 10月, 2015 1 次提交
  6. 06 10月, 2015 2 次提交
  7. 26 6月, 2015 1 次提交
  8. 17 6月, 2015 2 次提交
  9. 09 6月, 2015 2 次提交
    • D
      parallels: fix formatting errors in parallels driver · ad658a60
      Dmitry Guryanov 提交于
      This patch fixes several formatting errors, which I
      missed before pushing previous patches. Mostly because
      of missing cppi package.
      ad658a60
    • N
      parallels: add block device statistics to driver · 489c81c0
      Nikolay Shirokovskiy 提交于
      Statistics provided through PCS SDK. As we have only async interface in SDK we
      need to be subscribed to statistics in order to get it. Trivial solution on
      every stat request to subscribe, wait event and then unsubscribe will lead to
      significant delays in case of a number of successive requests, as the event
      will be delivered on next PCS server notify cycle. On the other hand we don't
      want to keep unnesessary subscribtion. So we take an hibrid solution to
      subcsribe on first request and then keep a subscription while requests are
      active. We populate cache of statistics on subscribtion events and use this
      cache to serve libvirts requests.
      
       * Cache details.
      Cache is just handle to last arrived event, we call this cache
      as if this handle is valid it is used to serve synchronous
      statistics requests. We use number of successive events count
      to detect that user lost interest to statistics. We reset this
      count to 0 on every request. If more than PARALLELS_STATISTICS_DROP_COUNT
      successive events arrive we unsubscribe. Special value of -1
      of this counter is used to differentiate between subscribed/unsubscribed state
      to protect from delayed events.
      
      Values of PARALLELS_STATISTICS_DROP_COUNT and PARALLELS_STATISTICS_TIMEOUT are
      just drop-ins, choosen without special consideration.
      
       * Thread safety issues
      Use parallelsDomObjFromDomainRef in parallelsDomainBlockStats as
      we could wait on domain lock down on stack in prlsdkGetStatsParam
      and if we won't keep reference we could get dangling pointer
      on return from wait.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@parallels.com>
      489c81c0
  10. 03 6月, 2015 1 次提交
  11. 13 5月, 2015 1 次提交
    • N
      parallels: remove connection wide wait timeout · 2f1f2888
      Nikolay Shirokovskiy 提交于
      We have a lot of passing arguments code just to pass connection
      object cause it holds jobTimeout. Taking into account that
      right now this value is defined at compile time let's just
      get rid of it and make arguments list more clear in many
      places.
      
      In case we later need some runtime configurable timeout
      value we can provide this value through arguments
      function already operate such as a parallels domain
      object etc as this timeouts are operation( and thus
      object) specific in practice.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@parallels.com>
      2f1f2888
  12. 23 4月, 2015 3 次提交
  13. 21 4月, 2015 1 次提交
  14. 19 3月, 2015 1 次提交
  15. 11 3月, 2015 1 次提交
  16. 04 3月, 2015 1 次提交
  17. 27 1月, 2015 1 次提交
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
  18. 10 12月, 2014 3 次提交
  19. 07 11月, 2014 1 次提交
    • D
      Update Parallels driver to always use privateData · cfacca18
      Daniel P. Berrange 提交于
      Since the secondary drivers are only active when the primary
      driver is also the Parallels driver, there is no need to use the
      different type specific privateData fields. The object that was
      being stored in the storagePrivateData can easily be kept in the
      parallelsConn struct instead.
      cfacca18
  20. 25 9月, 2014 1 次提交
    • D
      parallels: login to parallels SDK · e7bb373f
      Dmitry Guryanov 提交于
      Add files parallels_sdk.c and parallels_sdk.h for code
      which works with SDK, so libvirt's code will not mix with
      dealing with parallels SDK.
      
      To use Parallels SDK you must first call PrlApi_InitEx function,
      and then you will be able to connect to a server with
      PrlSrv_LoginLocalEx function. When you've done you must call
      PrlApi_Deinit. So let's call PrlApi_InitEx on first .connectOpen,
      count number of connections and deinitialize, when this counter
      becomes zero.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      e7bb373f
  21. 06 6月, 2014 1 次提交
    • A
      Parallels: add domainGetVcpus() · e721e9e6
      Alexander Burluka 提交于
      OpenStack Nova requires this function
      to start VM instance. Cpumask info is obtained via prlctl utility.
      Unlike KVM, Parallels Cloud Server is unable to set cpu affinity
      mask for every VCpu. Mask is unique for all VCpu. You can set it
      using 'prlctl set <vm_id|vm_name> --cpumask <{n[,n,n1-n2]|all}>'
      command. For example, 'prlctl set SomeDomain --cpumask 0,1,5-7'
      would set this mask to yy---yyy.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e721e9e6
  22. 10 12月, 2013 1 次提交
  23. 24 4月, 2013 1 次提交
  24. 05 4月, 2013 1 次提交
  25. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  26. 05 2月, 2013 1 次提交
  27. 21 12月, 2012 2 次提交
  28. 11 12月, 2012 4 次提交