1. 29 Nov, 2013 1 commit
  2. 15 Nov, 2013 2 commits
  3. 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
        CYCLADES_DEFAULT_SERVER_NETWORKS.
      
       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.
      056eee6c
  4. 04 Nov, 2013 1 commit
  5. 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": "192.168.2.0"}, {"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.
      8c29b065
  6. 29 Oct, 2013 2 commits
    • Christos Stavrakakis's avatar
      cyclades: Make tests work with multiple IP pools · 5b4d7306
      Christos Stavrakakis authored
      Refactor tests so that they are aware that a network can have multiple
      IP pools. Also, add extra check to PoolManager methods in order to check
      whether a value is contained in the pool.
      5b4d7306
    • Ilias Tsitsimpis's avatar
      snf-cyclades-app: Use the new AstakosClient · 625bd291
      Ilias Tsitsimpis authored
      Change AstakosClient to use ASTAKOS_AUTH_URL as entry point to the
      Astakos service, instead of ASTAKOS_BASE_URL it was using until now.
      
      Remove ASTAKOS_BASE_URL from Cyclades settings, replace it with
      ASTAKOS_AUTH_URL. Modify Cyclades to determine ASTAKOS_ACCOUNT_URL and
      ASTAKOS_UI_URL with calls to astakosclient.
      625bd291
  7. 14 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Refactor code for allocating IPs · 1fcb59b8
      Christos Stavrakakis authored
      Refactor code that was used for allocating IP addresses and creating
      NetworkInterfaces. The new code is more suitable to the new DB schema
      where each network may have many IPv4 subnets and each subnet may
      have many IP pools. Also, the new functions are using prefetch related
      to minimize the needed DB queries.
      1fcb59b8
  8. 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
  9. 09 Oct, 2013 2 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.
      ea15eddf
    • Christos Stavrakakis's avatar
      cyclades: Use UUIDs to update VM NICs · d91498a3
      Christos Stavrakakis authored
      Callback functions of snf-dispatcher updated the NICs of a VM by
      deleting all NICs from DB, and creating the new NICs that were described
      in the message. However, since NICs have UUIDs, this is no longer
      required. This commit update callbacks to update the NICs based on their
      UUID.
      d91498a3
  10. 20 Sep, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Handle errors during vm creation · c99c44cb
      Christos Stavrakakis authored
      Commit #f2080d1 mocked an OP_INSTANCE_REMOVE when enqueuing an
      OP_INSTANCE_CREATE job to Ganeti failed. However, this may result in
      releasing IPs that may get reserved in Ganeti, because we can never
      really know if the job has reached Ganeti or not (e.g.  timeout).  For
      this reason, we should *never* delete the VM. Instead we mark the VM as
      being in error state.  The user must explicitly delete the server.  This
      has the downside, that we return 202 with the resulting VM being in
      ERROR state. However, this is the only way to be really secure.
      c99c44cb
  11. 19 Sep, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: refactor server creation command · 4ff07fee
      Christos Stavrakakis authored
      Split the server creation command in more steps in order to be
      decorated with the 'server_command' function and follow the logic of all
      other server commands. The main change is that the commission job is not
      accepted when the VM is stored in DB, but when the OP_INSTANCE_CREATE
      job finishes in Ganeti, no matter whether it succeeded or not. Finally,
      this commit includes a transaction testcase that checks instance
      creation.
      4ff07fee
  12. 27 Aug, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Do not pass 'hotplug' if disabled · 0feb4ee0
      Christos Stavrakakis authored
      Fix passing of hotplug argument to GanetiRAPIClient, in case the
      GANETI_USE_HOTPLUG is unset. If the Ganeti version does not support
      hotplug, passing hotplug=False, will make the jobs fail at Ganeti opcode
      validation. This commit fixes this by passing the argument, only when
      the setting is set to True.
      0feb4ee0
  13. 20 Aug, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Add check for net action with no hotplug · e6120d41
      Christos Stavrakakis authored
      In case hotplug is disabled, via GANETI_USE_HOTPLUG setting, network
      actions should be allowed only on STOPPED vms. This commit adds this
      check and a unittest for this case. Also it makes some other checks
      regarding actions and states of vms more strict.
      
      Finally, this commit changes the default value of GANETI_USE_HOTPLUG to
      True.
      e6120d41
  14. 07 Aug, 2013 1 commit
  15. 17 Jul, 2013 1 commit