1. 21 May, 2013 2 commits
    • Christos Stavrakakis's avatar
      cyclades: Add --hypervisor option to backend cmds · a44fc4c2
      Christos Stavrakakis authored
      Add '--hypervisor' option to 'backend-add' and 'backend-modify'
      management commands.
      Refs #3772
    • Christos Stavrakakis's avatar
      cyclades: Sypport backends with Xen hypervisor · 8bcc0f5f
      Christos Stavrakakis authored
      Support Ganeti backends with Xen hypervisor:
      * Extend 'Backend' model with the 'hypervisor' attribute, which
        currently can be 'kvm' or 'xen'. Use 'kvm' as default value to
        easy database migration. Also add the corresponding schema migration.
      * Do not use hotplug at Xen backends, since it is not
      * Support different 'hvparams' for Xen and KVM backends. Update
        GANETI_CREATEINSTNACE_KWARGS setting to hold 'hvparams' for both
        Xen and KVM.
      * When getting instance console, check 'serial_console' hvparam only
        for Xen instances.
      Refs #3772
  2. 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
      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
      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.
  3. 30 Apr, 2013 1 commit
    • Christos Stavrakakis's avatar
      Refactor QuotaHolder serial model · 9b602630
      Christos Stavrakakis authored
      * Merge 'accepted' and 'rejected' field to 'accept' field.
      * Add 'resolved' field, indicating whether this commission has been
        accepted/rejected to Quotaholder
      * Remove custom save() method. Handle 'pending' field manually.
      Also add the corresponding database migrations.
  4. 08 Apr, 2013 2 commits
  5. 22 Mar, 2013 1 commit
  6. 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.
  7. 08 Mar, 2013 1 commit
    • Christos Stavrakakis's avatar
      Bypass commissioning for orphan networks · ffc55de8
      Christos Stavrakakis authored
      Cyclades public networks do not have an owner, and since can not use
      the commissioning system. Also, make snf-dispatcher instead of failing
      for networks without userid to just a log a warning. This does not apply for
      API, because all API requests should have a userid.
  8. 14 Feb, 2013 1 commit
  9. 01 Feb, 2013 2 commits
  10. 04 Jan, 2013 2 commits
    • Christos Stavrakakis's avatar
      Fix bug about networks and offline backends · 0b24cf2c
      Christos Stavrakakis authored
      Ignore offline backends when computing the state of the network, since
      no notification will be received from them. Also, create no
      BackendNetwork for an offline backend. This will be created by
      reconcilliation, when the backend gets online again.
    • Christos Stavrakakis's avatar
      Fix bug about networks and offline backends · bc880ee2
      Christos Stavrakakis authored
      Ignore offline backends when computing the state of the network, since
      no notification will be received from them. Also, create no
      BackendNetwork for an offline backend. This will be created by
      reconcilliation, when the backend gets online again.
  11. 19 Dec, 2012 1 commit
  12. 12 Dec, 2012 1 commit
  13. 04 Dec, 2012 1 commit
    • Dimitris Aragiorgis's avatar
      Introduce network flavors to replace network types · 9bbc33bd
      Dimitris Aragiorgis authored
      Add tags and mode to network db model. Replace existing type with
      flavor. Introduce 4 different flavors. Each flavor has mode, link,
      mac_prefix, tags. Supported flavors are CUSTOM, IP_LESS_ROUTED,
      MAC_FILTERED, PHYSICAL_VLAN and are hardcoded in db models.
      Introduce new function that returns flavor's mode, link, mac_prefix,
      Introduce FIELD_POOL_MAP to map flavor fields to pool tables.
      Make snf-manage network-create command as flexible as possible. It is
      now able to create a network based on an existing flavor and overide
      defaults by passing mode, link, mac_prefix, tags option. Resource pools
      cannot be used by CUSTOM flavors. Currently MAC_FILTERED and
      PHYSICAL_VLAN use MacPrefixPoolTable for mac_prefix and BridgePoolTable
      for link accordingly and cannot be overriden.
      API blocks creation of public networks. Introduce new setting
      API_ENABLED_NETWORK_FLAVORS to indicate which flavors can the end-user
      use to create private networks.
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
  14. 27 Nov, 2012 1 commit
  15. 26 Nov, 2012 4 commits
  16. 09 Nov, 2012 1 commit
  17. 07 Nov, 2012 1 commit
  18. 05 Nov, 2012 1 commit
  19. 30 Oct, 2012 1 commit
  20. 17 Oct, 2012 1 commit
  21. 16 Oct, 2012 2 commits
    • Christos Stavrakakis's avatar
      Create IPPool when creating Network · 39f787d9
      Christos Stavrakakis authored
      Create the IPPool associated with each Network, when creating it. Until
      now, IPPools were created on first demand. However, because the Network
      object is not accessed in exclusive mode, concurrent access to the
      Network model resulted in a race condition. More than one workers may
      find that no Pool is associated with the Network, and try to create a
      new one.
    • Christos Stavrakakis's avatar
      Fix typos · 879df235
      Christos Stavrakakis authored
  22. 10 Oct, 2012 1 commit
  23. 04 Oct, 2012 3 commits
  24. 03 Oct, 2012 3 commits
  25. 20 Sep, 2012 1 commit
    • Christos Stavrakakis's avatar
      Refactor IP pools · 8534b598
      Christos Stavrakakis authored
      Treat IP pool the same way as bridge and mac-prefix pools. The pool is
      removed from the Network table and moved to an IPPoolTable containing the
      IP pools for all networks. Also added support for external reservations.
      Migration files for transfering the pool to the new tables are included.
      Finally, the map is inverted, since the new pool treats different the
      availability of the values in it.
  26. 19 Sep, 2012 3 commits
    • Christos Stavrakakis's avatar
      Add logging to synefo.db.models · 6fee4873
      Christos Stavrakakis authored
    • Christos Stavrakakis's avatar
    • Christos Stavrakakis's avatar
      Refactor bridge and mac-prefix pool tables · 4ef69216
      Christos Stavrakakis authored
      Redesign the implementation of pools and map mac-prefix and bridge pools
      to that design.
      Each pool type is mapped to a table in the database, and each row of
      that table is a pool of that type. All pool tables must contain the
      following columns:
      - size: the size of the pool
      - available_map: mapping of the available values to a string
      - reserved_map: mapping of the external reservations to a string
      Access to each pool is managed by a class subclassing the PoolManager
      class, and must implement 'index_to_value' and 'value_to_index' methods
      which allow mapping of the pool values to an index on a bitarray.
      Also the corresponding migration files are created.