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
      a44fc4c2
    • 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. 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
  4. 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
  5. 08 Apr, 2013 2 commits
  6. 02 Apr, 2013 1 commit
  7. 22 Mar, 2013 1 commit
  8. 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
  9. 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.
      ffc55de8
  10. 15 Feb, 2013 1 commit
  11. 14 Feb, 2013 3 commits
  12. 12 Feb, 2013 1 commit
  13. 01 Feb, 2013 2 commits
  14. 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.
      0b24cf2c
    • 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.
      bc880ee2
  15. 20 Dec, 2012 2 commits
  16. 19 Dec, 2012 2 commits
  17. 14 Dec, 2012 3 commits
  18. 12 Dec, 2012 1 commit
  19. 04 Dec, 2012 2 commits
    • Dimitris Aragiorgis's avatar
      Migration files for network types · ac26799d
      Dimitris Aragiorgis authored
      ac26799d
    • 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,
      tags.
      
      In settings only DEFAULT_ROUTING_TABLE, DEFAULT_BRIDGE and
      DEFAULT_MAC_PREFIX, DEFAULT_PRIVATE_BRIDGE exist.
      
      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>
      9bbc33bd
  20. 27 Nov, 2012 1 commit
  21. 26 Nov, 2012 5 commits
  22. 22 Nov, 2012 1 commit
  23. 09 Nov, 2012 1 commit
  24. 07 Nov, 2012 1 commit