1. 13 Feb, 2014 1 commit
  2. 27 Jan, 2014 2 commits
  3. 20 Jan, 2014 1 commit
  4. 19 Dec, 2013 2 commits
  5. 17 Dec, 2013 1 commit
  6. 03 Dec, 2013 1 commit
  7. 14 Nov, 2013 1 commit
  8. 08 Nov, 2013 1 commit
  9. 06 Nov, 2013 1 commit
  10. 31 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Add 'SNF:floating_ip_pool' to networks · 7c296288
      Christos Stavrakakis authored
      Extend network API methods to include the 'SNF:floating_ip_pool'
      attribute which indicates whether floating IP can be allocated from the
      network or not. Trying to allocate a floating IP from a network which is
      not not a floating IP pool will return Conflict(409).
      7c296288
  11. 10 Oct, 2013 3 commits
  12. 09 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Change format of 'attachment' attribute · 0e604e91
      Christos Stavrakakis authored
      Change the format of the 'attachment' attribute. Until now, each
      attachment had an identifier of the form 'nic-$vm_id-$nic_id'. This
      commit changes the identifier to just '$nic_id', since from now on
      is unique for the lifetime of a NIC.
      0e604e91
  13. 01 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      Request Django=>1.4, <1.5 · f8082d99
      Christos Stavrakakis authored
      Drop support for Django 1.2. Remove compatibility code that were used in
      order to support Django 1.2 and 1.4. Finally update django documentation
      link in the docs.
      f8082d99
  14. 27 Sep, 2013 1 commit
  15. 24 Sep, 2013 1 commit
  16. 07 Jul, 2013 1 commit
  17. 02 Jul, 2013 3 commits
    • Christos Stavrakakis's avatar
      cyclades: Separate logic for networks from API · 31d9b58d
      Christos Stavrakakis authored
      Remove code handling networks from network API views to logic.networks
      31d9b58d
    • Christos Stavrakakis's avatar
      cyclades: Do not delete networks with floating IPs · f8f20840
      Christos Stavrakakis authored
      Forbid network deletion in case the network has allocated floating IPs,
      no matter whether they are used by instances or not. Update
      'allocate_floating_ip' API method, to take exclusive lock on network
      before reserving a floating IP, to avoid race condition between deleting
      a network and reserving an IP address.
      f8f20840
    • Christos Stavrakakis's avatar
      cyclades: Major refactor to api and logic apps · d15f509c
      Christos Stavrakakis authored
      Major refactor to cyclades api and logic apps that removes most code
      from the api views and moves it to logic app, so that the same logic
      code can be used by different apps (e.g. EC2 API). Code is moved into
      logic.servers.
      
      This commit also introduces the VirtualMachine.task attribute
      which contains the last issued action to a server. This attribute is set
      when the corresponding job is sent to Ganeti, and is cleared upon
      completion of the corresponding job (task_job_id attribute). Until the
      task is completed, no other action is allowed on the VM. The only
      exception is 'DESTROY' action which is always allowed. Actions on VMs
      with uncompleted tasks results in a bad request fault.  Also, some
      actions are not allowed if the operating state of the VM is not correct.
      For example, it is not allowed to start or resize a running VM.  The
      running task is also exposed to the API (SNF:task_state), and the
      available states are:
      * BUILDING
      * STARTING
      * STOPPING
      * REBOOTING
      * DESTROYING
      * RESIZING
      * CONNECTING
      * DISCONNECTING
      
      Also, this commit introduces two quotable resources, the 'active_ram'
      and 'active_cpu' representing the ram and cpu of running instances,
      specifically the instances in 'STARTED', 'BUILD' and 'ERROR' operstate.
      In order to count quotas for these resources, commissioning is needed
      when starting, stopping and rebooting instances. Also, the destroy
      commissioning is different if the vm is running or is stopped.
      
      Finally this commit changes the way commissioning is used in
      snf-dispatcher. Until now dispatcher only accepted or rejected
      commissions issued by the API. This commit introduces extra logic in
      dispatcher, to issue commissions for every quotable change, if a
      commission for this change has not already been issued by the API. This
      enables the administrator to do whatever action in the Ganeti backend
      without resulting in unsynced quotas. If a new commission is required,
      the previous commission for the VM by the API (if existing) will be
      rejected, since this commission will reflect a different change in the
      VM.
      d15f509c
  18. 17 Jun, 2013 1 commit
  19. 14 Jun, 2013 2 commits
  20. 28 May, 2013 1 commit
  21. 14 May, 2013 1 commit
  22. 13 May, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Implement lazy networks · 8aff3951
      Christos Stavrakakis authored
      Implement "lazy networks", which are not created to all Ganeti backends
      upon creation, but only when an instance that resides in a Ganeti is
      connected to that network.
      
      Update 'create_network' to create the Network object in DB without
      creating network in Ganeti, or correspoding BackendNetwork entries. The
      state of the Network becomes 'ACTIVE' upon creation, instead of
      'PENDING' that was until now. Also, update 'delete_network' function to
      delete the network only from the backends that it is not in 'DELETED'
      state. The state of the network will become 'DELETED' only when all
      corresponding backend networks become 'DELETED' (including offline
      backends).
      
      Extend code that connects a VM to a network to check if the network
      already exists and is in 'ACTIVE' state in the Ganeti backend that hosts
      the VM.  If not, it will create the network and then connect the VM
      (using Ganeti chained-jobs to ensure correct ordering of jobs).
      
      Update 'reconcile-networks' management command to work with lazy
      networks. Specifically, do not check if private networks exist in all
      backends.
      
      Update 'network-add' management command to create the network in the
      Ganeti, only if a backend is specified.
      
      Finally, when using Ganeti chained-jobs to impose ordering of jobs, do
      not depend only on 'success' of a job, but also on 'error' and 'cancel'.
      This is needed to cover case that a job fails (e.g. create network)
      because the resource already exists.
      8aff3951
  23. 30 Apr, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: refactor code relative to commission · ac96b3ca
      Christos Stavrakakis authored
      Refactor Cyclades code that handles commissioning with Quotaholder. This
      commit removes the 'uses_commission' decorator. Instead it introduces
      the 'issue_and_accept_commission' function that is responsible for
      implenting the commission workflow. This function  must be called
      exactly after and in the same transaction that creates/modifies the
      resource, because resource creation/modification must happen in the same
      transaction with issuing and storing the serial in the DB.
      ac96b3ca
  24. 08 Apr, 2013 3 commits
  25. 02 Apr, 2013 1 commit
  26. 21 Mar, 2013 1 commit
    • Christos Stavrakakis's avatar
      Create public NIC when creating VM · dc1554e4
      Christos Stavrakakis authored
      Until now, a server's public NetworkInterface was not created in the DB
      until the arrival of the message from Ganeti hooks. However, the IPv4
      address of the NIC is reserved before sending the OP_INSTANCE_CREATE
      job to Ganeti.
      
      This drawback of this approach is that if the Ganeti hooks never run
      (building ERROR), Cyclades will never associate the IPv4 address with
      a machine and therefore this address will never be released.
      
      This commit fixes this issue by creating the VM's public NIC in DB when
      creating the server. Also the NetworkInterface model is extended with
      a 'state' field to indicate if the NIC is active or still building.
      Finally, the corresponding API calls are modified in order to return
      only 'ACTIVE' NICs.
      dc1554e4
  27. 22 Feb, 2013 1 commit
  28. 20 Feb, 2013 1 commit
  29. 15 Feb, 2013 1 commit
  30. 13 Feb, 2013 1 commit
  31. 31 Jan, 2013 1 commit
    • Christos Stavrakakis's avatar
      Handle transaction manually when creating network · b46b50fb
      Christos Stavrakakis authored
      When creating private networks, commit the transaction before sending
      the job to all Ganeti backends. If communication with all Ganeti
      backends is included in the transaction, notifications from backends
      may be received before the Network entry is created in the DB.
      b46b50fb