1. 04 Dec, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Remove DEFAULT_ROUTING_TABLE setting · 125ba5f1
      Christos Stavrakakis authored
      Do not have a default value from 'link' attribute of IP_LESS_ROUTED
      networks. Instead if the admin does not specify a value in
      network-create command, uniquely name the networks by with the
      BACKEND_PREFIX_ID and network id, e.g. snf-link-42.
      125ba5f1
  2. 22 Nov, 2013 2 commits
    • Giorgos Korfiatis's avatar
      cyclades: Enforce quota · 4ab23c89
      Giorgos Korfiatis authored
      Introduce command enforce-resources-cyclades, which checks for quota
      violations and applies actions to enforce the limits. By default, it
      operates only on these resources: cpu, ram, floating_ip.
      4ab23c89
    • Christos Stavrakakis's avatar
      cyclades: Add name to Ganeti NICs · 1d546431
      Christos Stavrakakis authored
      Add 'name' attribute to newly created NICs. Currently, the name of the
      NICs will not be used to refer to NICs, as it will be in Synnefo 0.15.
      Names are added only to ease the migration to version 0.15. Also, this
      commit updates snf-dispatcher to preserve the name of the NIC, if any,
      when updating instance NICs.
      
      Finally, the commit updates handling of firewall tags by adding a second
      tag that contains the name of the NIC. The tags with the name of the
      NICs will be kept in Synnefo 0.15, and the old tags with the index of
      the NIC will be removed.
      1d546431
  3. 08 Nov, 2013 1 commit
  4. 06 Nov, 2013 2 commits
  5. 04 Nov, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Series of fixes regarding networks & ips · eea48fa9
      Christos Stavrakakis authored
      * Do not delete the network from the DB if it has associated floating
        IPs. This should never be the case because a check is made before
        deleting the network, however this check is added for safety.
      * Do not allow deleting a network if there are still ports configured on
        on that network. Until now this check was for machines, but there may
        be ports that are not connected to any machine.
      * Delete subnet IP pools when network is deleted.
      * Get network in locked mode in network-remove cmd.
      * Log error if trying to release an IPv4 address that does not belong to
        any of the IP pools of the associated subnet.
      * Excluded deleted IPv4 addresses when reconciling IP pools.
      * Do not set the network action to destroy when removing network from
        some backend.
      eea48fa9
  6. 02 Nov, 2013 1 commit
  7. 01 Nov, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Create ports without 'device_id' · 4b649f24
      Christos Stavrakakis authored
      Allow creation of ports that are not connected to any instance. Such
      ports will be in 'DOWN' state. To allow this, 'machine' attribute of
      NetworkInterface model has been made to allow null values. Finally, the
      'logic.ports' module has been remove, and the corresponding code has
      been merged into 'logic.servers' module.
      4b649f24
  8. 31 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Add accounting for IP Addresses · c7834da6
      Christos Stavrakakis authored
      Create IPAddressLog DB table to hold information about allocation of IP
      addresses to virtual servers. The information that is currently saved
      contains the IP address, the ID of the virtual server, the ID of the
      virtual network along with the datetime that the address has been
      allocated and released from the server.
      
      An entry in this table is created every time a NetworkInterface card
      that has an associated IP address is created in DB. The entry is updated
      with the 'released_at' timestamp when the NIC is destroyed in Ganeti.
      Currently, only IP addresses from public networks (network.public=True)
      are stored in this table.
      
      This commit also includes a DB data migration for all already allocated
      IP addresses. However, the 'allocated_at' timestamp of this entries will
      not be correct.
      c7834da6
  9. 30 Oct, 2013 1 commit
  10. 29 Oct, 2013 5 commits
  11. 24 Oct, 2013 2 commits
  12. 18 Oct, 2013 1 commit
  13. 14 Oct, 2013 3 commits
  14. 13 Oct, 2013 1 commit
  15. 11 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Optimize DB queries of /servers API · 9ae370e6
      Christos Stavrakakis authored
      Use 'prefetch_related' attribute of Django queryset to prefetch the
      NetworkInterface and IPaddress objects that are related with a
      VirtualMachine object. Also, modify functions that operate on server
      NICs and IPs, to to use only the prefetched objects, which means that
      they can perform further filtering or ordering on objects because this
      is considered a new DB query and so will not get the cached objects.
      
      Also, return empty 'fqdn' and 'port_forwarding' attributes if the
      server has no public IP address.
      9ae370e6
  16. 10 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Make logic tests pass · 2bd35f31
      Christos Stavrakakis authored
      Refactor Cyclades code so that it follows the new models for Networks,
      Subnets and IPAddresses. This refactor is not complete. Instead is the
      necessary refactor for making tests for server API calls succeed.
      2bd35f31
  17. 09 Oct, 2013 12 commits
  18. 07 Oct, 2013 3 commits
    • Christos Stavrakakis's avatar
      182a1fd2
    • Christos Stavrakakis's avatar
      cyclades: Refactor reconciliation of pools · 33fe9eb8
      Christos Stavrakakis authored
      Move reconciliation of IP pools from 'snf-manage reconcile-networks'
      to 'snf-manage reconcile-pools'. Also change the way reconciliation
      works: Instead of reconciling the IP pools in DB with the IP pools in
      Ganeti, the new reconciliation just checks that:
      * there is no IPv4 address that is used by more than one NICs
      * the only reserved values in the pools are the ones that are currently
        used by NICs
      The reason why reconciliation of pools with Ganeti has been removed is
      that there are too many race conditions, and that it may result in
      strange incosistencies. As far as external reservations is concerned,
      the new reconciliation mechanism just checks that each IP that is
      reserved in a Ganeti backend is also reserved in the Cyclades DB.
      33fe9eb8
    • Christos Stavrakakis's avatar
      cyclades: Make (network, ipv4) unique for each NIC · b7dae491
      Christos Stavrakakis authored
      Add a unique constraint to NetworkInterface model. This constraint
      asserts that the same IPv4 address from the same network will no be
      assigned to more than one NICs.
      b7dae491