1. 21 May, 2013 1 commit
    • 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
        implemented.
      * 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
      8bcc0f5f
  2. 15 May, 2013 2 commits
  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.
      9b602630
  4. 22 Mar, 2013 1 commit
  5. 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
  6. 04 Dec, 2012 1 commit
  7. 26 Nov, 2012 1 commit
  8. 09 Nov, 2012 1 commit
  9. 30 Oct, 2012 1 commit
  10. 23 Oct, 2012 2 commits
  11. 17 Oct, 2012 2 commits
  12. 10 Oct, 2012 1 commit
    • Christos Stavrakakis's avatar
      Change and fix migration files · 34fe5c82
      Christos Stavrakakis authored
      Change network migration, so that it does not allocate a new bridge to
      existing network. Instead it keeps the bridges from the old NetworkLink
      pool.
      
      Remove network_mac_prefix migration because there are no networks with
      mac prefixes.
      
      Remove migration of IP pools. Reconciliation mechanism should initialize
      them correctly.
      34fe5c82
  13. 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.
      8534b598
  14. 19 Sep, 2012 1 commit
    • 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.
      4ef69216
  15. 07 Sep, 2012 1 commit
    • Christos Stavrakakis's avatar
      New method for creating BackendNetwork entries · 8ceb9da5
      Christos Stavrakakis authored
      Create a new method to the Network model, in order to create the
      BackendNetwork entries tha correspond to this network. Also remove
      the custom save method, since when multiple public network will be
      supported, we want them to be correlated with specific backends.
      8ceb9da5
  16. 08 Aug, 2012 1 commit
  17. 27 Jul, 2012 3 commits
    • Christos Stavrakakis's avatar
      Fix bug in migration file · e07f1a83
      Christos Stavrakakis authored
      Do not allocate a bridge from the pool for deleted networks.
      e07f1a83
    • Christos Stavrakakis's avatar
      Fix migration files · c64ee93e
      Christos Stavrakakis authored
      Fix south migration files. In data migrations, access the Models from
      the orm, instead importing Models from synnefo.db. This is necessary as
      the orm provides access to the version of the models that existed when
      the migration file was created.
      c64ee93e
    • Christos Stavrakakis's avatar
      Implement MAC Prefix Management · b189fa23
      Christos Stavrakakis authored
      In order to guarantee uniqueness of MAC address accross all backends,
      synnefo assignes a unique mac prefix to each network in each backend.
      
      A mac-prefix of 20 bits, which is picked from the MacPrefixPool, is
      assigned to each Network. The mac-prefix of the network in each
      backend results from combining the mac-prefix of the Network with the
      unique index of the Backend, resulting in a 3-byte mac-prefix (up to 16
      Backends).
      
      Settings PRIVATE_MAC_FILTERED_BASE_MAC_PREFIX and
      PRIVATE_MAC_FILTERED_MAX_PREFIX_NUMBER have been converted to
      MAC_POOL_BASE and MAC_POOL_LIMIT, since mac-prefixes are now assigned to
      all networks.
      b189fa23
  18. 26 Jul, 2012 1 commit
  19. 24 Jul, 2012 1 commit
  20. 23 Jul, 2012 10 commits
    • Christos Stavrakakis's avatar
      151136a9
    • Christos Stavrakakis's avatar
      Implement IP management · 6a489825
      Christos Stavrakakis authored
      Delegate IP management to synnefo, in order to be able to allocate IP
      addresses accross multiple Ganeti backends. This is achieved by creating a
      Pool of IPs for each Network, in the form of a bitarray, which is stored
      in the DB as a base64 string.
      
      Reservation of IPs is done beforing creating the NIC in Ganeti, unlike
      releasing which is only done after the notification from Ganeti(hook) is
      received.
      
      Reservation and release of address must be performed inside a
      transaction, and with the use of select_for_update() statement in order
      to guarantee atomic and isolated access to the pool.
      6a489825
    • Christos Stavrakakis's avatar
      Add support for IPv6 · 49929c5e
      Christos Stavrakakis authored
      - Extend the Network model with fields for holding the IPv6 subnet and
        gateway.
      - Update network API methods.
      - Modify ganeti hooks to return IPv6 address for all network interfaces.
        IPv6 is now derived from the IPv6 subnet of the network in Ganeti,
        instead of the old setting (PUBLIC_IPV6_PREFIX)
      - Remove obsolete setting (`PUBLIC_IPV6_PREFIX`)
      - Update management commands for IPv6
      49929c5e
    • Christos Stavrakakis's avatar
      Encrypt Backend password · bd491ac0
      Christos Stavrakakis authored
      Use cipher to encrypt the passwords of the Ganeti backends in the DB.
      Encryption/decryption is based on a configurable key, defined by the
      ENCRYPTION_KEY setting. After modifying this setting, synnefo will be
      unable to decrypt already stored passwords, and passwords must be
      re-entered, using 'snf-manage backend-modify' command and restaring the
      server. A migration file is responsible for initially encrypting already
      stored passwords.
      bd491ac0
    • Christos Stavrakakis's avatar
      Add dirty bit to NetworkInterface · 4943dc30
      Christos Stavrakakis authored
      Extend NetworkInterface model with a dirty bit, indicating whether
      the index of the NIC is consistent with the one in Ganeti. This flag is
      set when deleting a NIC, and is switched off after processing the
      notification from Ganeti. Removing a NIC with the dirty bit on is not
      allowed.
      4943dc30
    • Christos Stavrakakis's avatar
      3c34cd6c
    • Christos Stavrakakis's avatar
      ea0550b4
    • Christos Stavrakakis's avatar
      Implement BackendNetwork model · 70be1cb8
      Christos Stavrakakis authored
      Create a new model, to represent the state of each network in each
      backend.
      70be1cb8
    • Christos Stavrakakis's avatar
      Major modifications to Network model · 82763c03
      Christos Stavrakakis authored
      Since Ganeti version 2.6, Ganeti is aware of private networks. We take
      advantage of this by propagating network handling to Ganeti. Network
      model is expanded to include information about the type of network
      (public routed, physical vlan, private filtered), subnet, gateway, dhcp,
      link and mac_prefix.
      
      - Update Network Model and delete NetworkLink model
      - Create MacPrefixPool and BridgePool models
      - Default constant settings for MacPrefix management
      82763c03
    • Christos Stavrakakis's avatar
      Create Backend model to represent a ganeti backend · 74771e86
      Christos Stavrakakis authored
      - Create Backend model holding info about credentials, status and resources
      - Add Backend as foreign key to VirtualMachine
      - Create a cache of Backend clients (RAPI) for better performance
      74771e86
  21. 06 Jun, 2012 1 commit
    • Christos Stavrakakis's avatar
      Update modules interacting with AMQP · 61467a31
      Christos Stavrakakis authored
      Update all modules which are interacting with the RabbitMQ messaging system to
      use the AMQPClient in order to use highly available queues in active/active
      mode.
      
      Extend messages to include a unique identifier in order to handle
      duplication of messages and out of order delivery. The timestamp of the event
      that the message is describing is chosen for this.
      
      Extend VirtualMachine model with 'backendtime' field to hold the
      timestamp described above.
      61467a31
  22. 07 Mar, 2012 1 commit
  23. 24 Feb, 2012 1 commit
  24. 08 Feb, 2012 1 commit
  25. 06 Feb, 2012 1 commit
  26. 03 Feb, 2012 1 commit