1. 24 Feb, 2014 2 commits
  2. 12 Feb, 2014 1 commit
  3. 24 Jan, 2014 1 commit
  4. 22 Jan, 2014 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Extend flavors with 'allow_create' field · f55499e0
      Christos Stavrakakis authored
      * Add 'allow_create' field to Flavor DB model and the corresponding
      * Extend API for flavors to return the 'SNF:allow_create' attribute
      * Update POST /servers API call to check that the flavor that is
        specified in the request has the 'allow_create' attribute set to True.
        Otherwise, Forbidden(403) is returned. Also, add a relevant unittest.
      * Extend 'flavor-modify' and 'flavor-list' management commands to handle
        the 'allow_create' flag
      * Update administrator guide and Changelog
  5. 20 Jan, 2014 1 commit
  6. 19 Dec, 2013 1 commit
  7. 09 Dec, 2013 1 commit
  8. 03 Dec, 2013 1 commit
  9. 02 Dec, 2013 1 commit
  10. 27 Nov, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Change behaviour of servers fqdn · ddaf8b1d
      Christos Stavrakakis authored
      Change behaviour of 'CYCLADES_SERVERS_FQDN' setting:
        * If this setting is set to 'None', do not fall back to the public IP
          address of the machine.
        * Return the value of the setting even if the machine has no public
          IP address.
  11. 22 Nov, 2013 1 commit
    • 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.
  12. 13 Nov, 2013 1 commit
  13. 05 Nov, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Fix default/forced server networking · 056eee6c
      Christos Stavrakakis authored
      Fix the default behaviour for networking of servers that are being
      created. There are two settings controlling this behaviour:
      * CYCLADES_DEFAULT_SERVER_NETWORKS: This setting contains list of
        networks to connect a newly created server to, if the user has not
        specified them explicitly in the POST /server API call. Each member of
        the list may be a network UUID, a tuple of network UUIDs,
        "SNF:ANY_PUBLIC_IPV4" [any public network with an IPv4 subnet
        defined], "SNF:ANY_PUBLIC_IPV6 [any public network with only an IPV6 subnet
        defined],  or "SNF:ANY_PUBLIC" [any public network].
        Access control and quota policy are enforced, just as if the user had
        specified the value of CYCLADES_DEFAULT_SERVER_NETWORKS in the content
        of the POST /call, after processing of "SNF:*" directives.
        Default value: ["SNF:ANY_PUBLIC"]
      * CYCLADES_FORCED_SERVER_NETWORKS: This setting contains a list of
        networks which every new server will be forced to connect to,
        regardless of the contents of the POST /servers call, or the value of
        CYCLADES_DEFAULT_SERVER_NETWORKS.  Its format is identical to that of
       No access control or quota policy are enforced.  The server will get
       all IPv4/IPv6 addresses needed to connect to the networks specified in
       CYCLADES_FORCED_SERVER_NETWORKS, regardless of the state of the
       floating IP pool of the user, and without allocating any floating IPs.
       Default value: ["SNF:ANY_PUBLIC_IPV6"]
      Also this commit changes how API handles requests that specify a public
      network without specifying a floating IP address: If the request does
      not contain the 'fixed_ip' attribute, the server will try to
      automatically use one of the free floating IP addresses of the user
      that are allocated from the specified network.
  14. 04 Nov, 2013 2 commits
    • Christos Stavrakakis's avatar
      cyclades: Workaround for race condition in Ganeti · 84fcfa69
      Christos Stavrakakis authored
      Workaround for race where OP_INSTANCE_REMOVE starts executing on Ganeti
      before OP_INSTANCE_CREATE. If this is the case, OP_INSTANCE_REMOVE will
      not wait for locks, instead it will fail because the instance has not
      yet be created. Dispatcher will received the failed OP_INSTANCE_REMOVE
      job and will query Ganeti to see if the instance exists. However, if the
      OP_INSTANCE_CREATE has not yet started, the query will return 404, and
      dispatcher will delete the instance from DB and release its IP
      addresses. Following instance creations will fail because the IPv4
      address will be already used in Ganeti.
      This commit is a workaround for this issue until OP_INSTANCE_REMOVE
      supports the 'depends' attribute. Until then, the API will raise 409 if
      the job has not yet completed and the intance has not been added to
    • Christos Stavrakakis's avatar
      cyclades: Create server in public net with FIP · 227ccc21
      Christos Stavrakakis authored
      Remove 'floating_ips' extension attribute to POST /servers API call.
      Instead use the 'fixed_ip' attribute of 'networks' attribute to specify
      the IPv4 address of a floating IP. So in order to create a server
      connected to a private network and a public network, the 'networks'
      attribute will be:
      [{"uuid": "<private-network-uuid>"},
       {"uuid": "<floating-ip-network-uuid>",
        "fixed_ip": "<floating-ip-address>"}]
  15. 02 Nov, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Create server with existing ports · 8c29b065
      Christos Stavrakakis authored
      Extend POST /servers API call to support creation of servers that will
      be using existing ports. Networking of the instance is defined via the
      'networks' attribute which can contain either network UUIDs or port
      UUIDs. In case of network UUIDs, the user can also request for a
      specific IPv4 address. For example:
      {"network":  [{"uuid": 41, "fixed_ip": ""}, {"port": 42}]}
      This patch also changes the 'floating_ips' attribute to contain not
      IPv4 addresses of floating IPs, but the UUIDs of the floating IPs that
      the user want to connect to the instance.
  16. 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.
  17. 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.
  18. 09 Oct, 2013 5 commits
    • Christos Stavrakakis's avatar
      cyclades: Make API server tests pass · ea15eddf
      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.
    • Christos Stavrakakis's avatar
      cyclades: Change format of 'attachment' attribute · 0e604e91
      Christos Stavrakakis authored
      Change the format of the 'attachment' attribute. Until now, each
      attachment had an identifier of the form 'nic-$vm_id-$nic_id'. This
      commit changes the identifier to just '$nic_id', since from now on
      is unique for the lifetime of a NIC.
    • Christos Stavrakakis's avatar
      cyclades: Use NIC UUID in firewall tags · ab906b2c
      Christos Stavrakakis authored
      Use NICs UUID instead of index to generate firewall tags. Make the
      'set_firewall_profile' action to take the NICs ID as argument. Also,
      update the firewall settings.
    • Christos Stavrakakis's avatar
      cyclades: Add 'ip_type' attribute to NIC · 14f14bc8
      Christos Stavrakakis authored
      Extend NetworkInterface model with the 'ip_type' attribute to show
      whether the IP is a floating or fixed.
      Signed-off-by: default avatarChristos Stavrakakis <cstavr@grnet.gr>
    • Christos Stavrakakis's avatar
      cyclades: Use Ganeti NIC UUIDs · 1a4633ef
      Christos Stavrakakis authored
      Since Ganeti 2.8, it is supported to refer to devices (NICs and Disks)
      not only by their index but also by their name or UUID. This commit
      updates Synnefo to refer to devices by their name. Synnefo will set the
      name of the devices which will be a UUID. We do not use Ganeti's UUIDs
      because the UUID can not be known, until the NIC is created in the VM.
      Modify backend methods for connecting and removing a NIC from a VM, to
      not refer to NICs by index, but use the NICs backend_uuid. Also, set the
      name of the NIC to the backend_uuid, when creating a NIC.
      API relevant methods, will create a NIC object in BUILDING state,
      instead of creating the NIC when the message arrives from the backend.
      Modify NetworkInterface model:
      * remove 'dirty' attribute since it is no longer needed
      * make index null, since when the NIC is in building state, the index
        can not be known.
      * add property for getting the UUID of the NIC in the Ganeti backend.
      Fix relevant tests.
  19. 07 Oct, 2013 1 commit
  20. 01 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      Request Django=>1.4, <1.5 · f8082d99
      Christos Stavrakakis authored
      Drop support for Django 1.2. Remove compatibility code that were used in
      order to support Django 1.2 and 1.4. Finally update django documentation
      link in the docs.
  21. 24 Sep, 2013 1 commit
  22. 20 Sep, 2013 1 commit
  23. 17 Sep, 2013 2 commits
    • Christos Stavrakakis's avatar
      cyclades: Mock vm removal if creation fails · a2daae31
      Christos Stavrakakis authored
      In case creating a VM fails before the OP_INSTANCE_CREATE job is
      enqueued in Ganeti, the VM and its NICs must be deleted, and the
      resources must be released from Quotaholder, which is exactly what is
      done when a VM is deleted from Ganeti. Instead of duplicating the code,
      this commit uses the same function that is used by snf-dispatcher, by
      mocking an successfully OP_INSTANCE_REMOVE.
    • Christos Stavrakakis's avatar
      cyclades: Fix bug during server creation · baae8e7f
      Christos Stavrakakis authored
      Commit #32a0b85, modified server creation, by refetching the object from
      DB after issuing commission to quotaholder. However, the new object is
      not having the 'config_url' attributed, which is added to the vm object
      by the 'vmapi'. This commit, fixes this by moving the signal dispatching
      code after refetching the vm. Also, this commit makes more clear the
      exception handling code, when the creation job can not be enqueued to
  24. 12 Sep, 2013 2 commits
    • Giorgos Korfiatis's avatar
      cyclades: Do not save stale objects after a commit · 9b94fc30
      Giorgos Korfiatis authored
      Call to issue_and_accept_commission saves the resource object (eg a vm)
      and commits the transaction. This has the side-effect that the resource
      object becomes stale: its lock is released and another thread may acquire
      it and update the db record. It is thus not safe to further update and then
      save the stale object, since this would override others' changes. Instead,
      lock and fetch the object again, where needed.
    • Giorgos Korfiatis's avatar
      cyclades: Do not release resources if already deleted · 8101def7
      Giorgos Korfiatis authored
      Ensure that a commission to release vm resources is issued only once.
      If a vm is marked `deleted', then resources must have already been
  25. 10 Sep, 2013 1 commit
  26. 28 Aug, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Fix bug in handling of reboot type. · 6b9f1b3f
      Christos Stavrakakis authored
      'type' attribute of reboot OS API call was directly mapped to the
      'reboot_type' option of Ganeti reboot job. However these two are
      semantically different. The 'SOFT' and 'HARD' reboot types of OS API are
      mapped to 'shutdown_timeout' option of Ganeti jobs. However, setting
      this option from Ganeti RAPI is not supported. Until implemented, we
      will map both types to 'hard' ganeti reboot, and fallback to default
      shutdown timeout of Ganeti (120s).
      Also, modify UI to not set the 'HARD' reboot type and fallback to
      default option of API which is 'SOFT'.
  27. 07 Aug, 2013 2 commits
    • Christos Stavrakakis's avatar
      cyclades: extend VM info with 'port_forwarding' · 05d32a11
      Christos Stavrakakis authored
      Extend servers info API response with 'SNF:port_forwarding' attribute,
      describing port fowarding rules (DNAT) that are applied to vms. The
      description of such rules is done via the new CYCLADES_PORT_FORWARDING
      setting. This setting can be either a dictionary mapping to ports to
      tuples of (host, port), or a callable object that must return such a
      tuple.   The caller will pass to the callable the following positional
      arguments, in the following order:
      * server_id: The ID of the VM in the DB
      * ip_address: The IPv4 address of the public VM NIC
      * fqdn: The FQDN of the VM
      * user: The UUID of the owner of the VM
    • Christos Stavrakakis's avatar
      cyclades: Extend servers info with fqdn attribute · 22948bca
      Christos Stavrakakis authored
      Extend the servers info API response with the 'SNF:fqdn' attribute,
      containg the vm's domain name in a DNS. This attribue is configurable by
      the 'CYCLADES_SERVERS_FQDN' setting. If this setting is set to None,
      then then the first public IPv4 or IPv6 address is returned.
  28. 24 Jul, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Set firewall profile per NIC · b35254cf
      Christos Stavrakakis authored
      Set firewall profile per NIC, because since Floating IPs an instance can
      have more than one NICs in a public network. Extend the API call to take
      the NIC index as argument, and modify the Ganeti instance tags to be
      formated with the NIC index.
  29. 17 Jul, 2013 1 commit
  30. 07 Jul, 2013 1 commit
  31. 02 Jul, 2013 1 commit