1. 29 Oct, 2013 1 commit
  2. 16 Oct, 2013 1 commit
  3. 14 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Add method to get ip stats to network · e15d8a29
      Christos Stavrakakis authored
      Extend Network model with a method to get the number of free and total
      IPv4 addresses of the network. Also, add method to IPAddress model to
      release its IPv4 address if any. Finally, update backend-list management
      command to use 'ip_count' method of Network object.
      e15d8a29
  4. 10 Oct, 2013 3 commits
  5. 09 Oct, 2013 2 commits
  6. 01 Oct, 2013 1 commit
  7. 17 Jul, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Support IPv6 only networks · a0ad2412
      Christos Stavrakakis authored
      Make Cyclades support IPv6 only networks. Such networks will have
      the 'subnet' attribute set to None, in the same way that IPv4 only
      networks have the 'subnet6' attribute set to None.
      
      Because currently Ganeti does not support IPv6 only networks, we create the
      corresponding Ganeti network with a dummy IPv4 subnet(10.0.0.0/24) that will be
      never used, since Cyclades will connect instances to IPv6 networks with
      'address' attribute set to None.
      a0ad2412
  8. 02 Jul, 2013 3 commits
    • Christos Stavrakakis's avatar
      Distinquish between networks and Floating IP pools · b755a9c9
      Christos Stavrakakis authored
      Extend Network model with the 'floating_ip_pool' boolean field, to
      indicate whether a Network can be a floating IP pool or not. Networks
      that are floating IP pools must exist in all Backends, and so
      'snf-manage backend-add' should try to add them.
      
      Also, update reconciliation to create networks that are floating IP
      pools to the Ganeti backends that do not exist.
      b755a9c9
    • Christos Stavrakakis's avatar
      cyclades: Add FloatingIP model · 02da2000
      Christos Stavrakakis authored
      Add Floating IP model to represent a floating IP that has been reserved
      by a user. Each FloatingIP has an owner(UUID), an IPv4 address, the
      network(pool) that has reserved from and the date is was reserved. Also,
      it may be related to a VirtualMachine, if there is some VM that uses
      this IP.
      
      Also, create the corresponding model factory for tests.
      02da2000
    • 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
  9. 11 Jun, 2013 1 commit
  10. 02 Apr, 2013 1 commit
  11. 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
  12. 01 Feb, 2013 1 commit
  13. 14 Dec, 2012 1 commit