1. 17 3月, 2016 3 次提交
  2. 14 3月, 2016 1 次提交
    • M
      vz: fix active domain listing · 8a744987
      Maxim Nestratov 提交于
      Since commit 9c14a9ab we have broken active domain listing
      because reworked prlsdkLoadDomain doesn't set dom->def->id
      propely. It just looses it when a new def structure is set.
      Now we make prlsdkConvertDomainState function return void
      and move calling it after an old dom->def is replaces with
      a new one within prlsdkLoadDomain function.
      Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
      8a744987
  3. 01 3月, 2016 1 次提交
  4. 12 2月, 2016 4 次提交
    • 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: fix notification subscription · d5f0cf99
      Mikhail Feoktistov 提交于
      Bug cause:
      Update the domain that is subscribed to hypervisor notification.
      LoadDomain() rewrites notifications fields in vzDomObj structure and makes domain as "unsubscribed".
      Fix:
      Initialize notification fields in vzDomObj only if we create a new domain.
      And do not reinitialize these fields if we update domain (by calling LoadDomain with olddom argument)
      d5f0cf99
    • 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
    • M
      vz: make output arguments in prlsdkGetDomainIds as optional · 2286986a
      Mikhail Feoktistov 提交于
      prlsdkGetDomainIds() returns name and uuid for specified instance.
      Now output arguments can be NULL.
      It allows to get only necessary info(name or uuid).
      2286986a
  5. 08 2月, 2016 2 次提交
  6. 26 1月, 2016 1 次提交
  7. 24 12月, 2015 3 次提交
  8. 09 12月, 2015 4 次提交
  9. 27 11月, 2015 1 次提交
  10. 19 11月, 2015 2 次提交
  11. 21 10月, 2015 1 次提交
  12. 15 10月, 2015 1 次提交
  13. 22 9月, 2015 1 次提交
  14. 21 9月, 2015 1 次提交
    • M
      vz: remove error logging from prlsdkUUIDParse · 91c8e75f
      Maxim Nestratov 提交于
      As far as not every call of prlsdkUUIDParse assume correct UUID
      supplied, there is no use to complain about wrong format in it.
      Otherwise our log is flooded with false error messages.
      For instance, calling prlsdkUUIDParse from prlsdkEventsHandler
      works as a filter and in case of uuid absence for event issuer,
      we simply know that we shouldn't continue further processing.
      Instead of error logging for all calls we should explicitly take
      into accaunt where it is called from.
      Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      91c8e75f
  15. 14 7月, 2015 1 次提交
  16. 10 7月, 2015 1 次提交
  17. 08 7月, 2015 1 次提交
  18. 07 7月, 2015 1 次提交
    • M
      vz: assign static IPs and default gateways for network adapter · beddef39
      Mikhail Feoktistov 提交于
      We support only one IPv4 and one IPv6 default gateway.
      If static IPs are not present in instance config,
      then we switch on DHCP for this adapter.
      PrlVmDevNet_SetAutoApply to makes necessary settings within guest OS
      In linux case it creates network startup scripts
      /etc/sysconfig/network-scripts/ifcfg-ethN and fills it with necessary
      parameters.
      beddef39
  19. 02 7月, 2015 1 次提交
  20. 26 6月, 2015 6 次提交
  21. 25 6月, 2015 2 次提交
  22. 24 6月, 2015 1 次提交
    • M
      vz: implementation of attach/detach network devices · 6de12b02
      Mikhail Feoktistov 提交于
      In this patch we add VIR_DOMAIN_DEVICE_NET handlers implementation
      for domainAttachDevice and domainDetachDevice callbacks.
      
      As soon as we don't support this operation for hypervisor type domains,
      we implement this functionality for containers only.
      
      In detach procedure we find network device by MAC address.
      Because PrlVmDevNet_GetMacAddress() returns MAC as a UTF-8 encoded
      null-terminated string, we use memcmp() to compare it.
      Also we remove corresponding virtual network by prlsdkDelNetAdapter call.
      6de12b02