1. 13 Feb, 2014 1 commit
  2. 23 Jan, 2014 3 commits
  3. 20 Dec, 2013 1 commit
  4. 20 Nov, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Fix bugs relative with quotas · 87987d11
      Christos Stavrakakis authored
      * Reject previous unaccepted serials if action is 'DESTROY'. This is
        required because multiple DESTROY actions may be pending for the same
        resource (e.g. VM). The one who succeeds will be accepted, while all
        others will be rejected. This isn't optimal since it causes circular
        issuing and rejection of commissions and should be fixed in a better
        way.
      * Update dispatcher to handle commissions before updating the state of
        the VM, since if a new commission will be issued, this commission will
        depend on the state of the VM.
      87987d11
  5. 15 Nov, 2013 10 commits
  6. 06 Nov, 2013 1 commit
  7. 29 Oct, 2013 1 commit
    • 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
  8. 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: Replace FloatingIP with IPAddress · 13a5bff7
      Christos Stavrakakis authored
      This commit just replaces all references to FloatingIP objects with
      references to IPAddress object, in order to be able to just load the
      code. But the code is left unchanged, so all tests will fail.
      13a5bff7
  9. 20 Sep, 2013 1 commit
  10. 19 Sep, 2013 1 commit
  11. 17 Sep, 2013 1 commit
    • 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
      Ganeti.
      baae8e7f
  12. 25 Jul, 2013 1 commit
  13. 02 Jul, 2013 3 commits
    • Christos Stavrakakis's avatar
      cyclades: Make Floating IPs a quotable resource · 6d560c8c
      Christos Stavrakakis authored
      Add 'cyclades.floating_ip' to quotable resources. Update helper
      functions and tests to include this resource.
      6d560c8c
    • Christos Stavrakakis's avatar
      cyclades: Major refactor to api and logic apps · d15f509c
      Christos Stavrakakis authored
      Major refactor to cyclades api and logic apps that removes most code
      from the api views and moves it to logic app, so that the same logic
      code can be used by different apps (e.g. EC2 API). Code is moved into
      logic.servers.
      
      This commit also introduces the VirtualMachine.task attribute
      which contains the last issued action to a server. This attribute is set
      when the corresponding job is sent to Ganeti, and is cleared upon
      completion of the corresponding job (task_job_id attribute). Until the
      task is completed, no other action is allowed on the VM. The only
      exception is 'DESTROY' action which is always allowed. Actions on VMs
      with uncompleted tasks results in a bad request fault.  Also, some
      actions are not allowed if the operating state of the VM is not correct.
      For example, it is not allowed to start or resize a running VM.  The
      running task is also exposed to the API (SNF:task_state), and the
      available states are:
      * BUILDING
      * STARTING
      * STOPPING
      * REBOOTING
      * DESTROYING
      * RESIZING
      * CONNECTING
      * DISCONNECTING
      
      Also, this commit introduces two quotable resources, the 'active_ram'
      and 'active_cpu' representing the ram and cpu of running instances,
      specifically the instances in 'STARTED', 'BUILD' and 'ERROR' operstate.
      In order to count quotas for these resources, commissioning is needed
      when starting, stopping and rebooting instances. Also, the destroy
      commissioning is different if the vm is running or is stopped.
      
      Finally this commit changes the way commissioning is used in
      snf-dispatcher. Until now dispatcher only accepted or rejected
      commissions issued by the API. This commit introduces extra logic in
      dispatcher, to issue commissions for every quotable change, if a
      commission for this change has not already been issued by the API. This
      enables the administrator to do whatever action in the Ganeti backend
      without resulting in unsynced quotas. If a new commission is required,
      the previous commission for the VM by the API (if existing) will be
      rejected, since this commission will reflect a different change in the
      VM.
      d15f509c
    • Christos Stavrakakis's avatar
      cyclades: Mark serial as resolved if auto_accept · 6a3be3c1
      Christos Stavrakakis authored
      Modify 'issue_commission' function to mark the QuotaHolderSerial object
      as resolved, if auto_accept option is used.
      6a3be3c1
  14. 10 Jun, 2013 1 commit
  15. 07 Jun, 2013 1 commit
  16. 03 Jun, 2013 1 commit
    • Georgios D. Tsoukalas's avatar
      make synnefo URLs consistent and configurable · 79f2ca3b
      Georgios D. Tsoukalas authored
      https://service.deployment.vendor.tld/service-base/api-prefix/hard/path
      |___________________________________| |__________| |________| |_______|
                   BASE_HOST                  BASE_PATH    PREFIX    Hardcoded
      |_________________________________________________|
                   SERVICE_BASE_URL
      
      - Introduce <SERVICE>_BASE_URL setting, and <API>_PREFIX constants
        for all services. Extract BASE_HOST, BASE_PATH from the setting.
      
      - Use settings and constants to construct top-level patterns
        (base-path/api-prefix) in services' urls.py
      
      - Refactor/extend proxy() to be compatible with the above.
      
      - Change URLs passed around (ui, e-mails) to be compatible.
        (needs more work)
      
      Notes:
      
      This configuration REQUIRES that any rewriting and proxying on the
      front-end must eventually result in the application server (gunicorn)
      getting the original path of the request, otherwise the view-generated
      URLs will be different.
      
      Changes:
      - set top-level urlpatterns from <SERVICE>_BASE_URL
      - rename setting: APP_INSTALL_URL to CYCLADES_BASE_URL
      - rename setting: ASTAKOS_URL to ASTAKOS_BASE_URL everywhere
      - introduce setting: PITHOS_BASE_URL
      - update shipped .confs, quick install admin guide, upgrade guide
      - fix urls/views/reverse()/other that were broken
      - (more not listed)
      79f2ca3b
  17. 31 May, 2013 1 commit
  18. 30 Apr, 2013 8 commits
    • Christos Stavrakakis's avatar
      cyclades: Rename 'qh_resolve_commissions' function · 2a498e06
      Christos Stavrakakis authored
      Rename 'qh_resolve_commissions' function to 'resolve_commissions'.
      2a498e06
    • Christos Stavrakakis's avatar
      cyclades: Check qh resolve commission response · 3d6a5fb4
      Christos Stavrakakis authored
      Check Quotaholder response to see if the commissions were accepted or
      rejected as requested, or failed for some reason.
      
      Accepting or rejecting a commission will fail if the commission was
      already resolved. Since this is sometimes accepted, like when
      reconciling commissions, this commit extends 'qh_resolve_commissions'
      function with the 'strict' argument, denoting whether the function
      should fail if resolving a commissions fails.
      3d6a5fb4
    • Christos Stavrakakis's avatar
      cyclades: resolve previous commissions · 26836734
      Christos Stavrakakis authored
      Extend 'issue_and_accept_commission' function to resolve previous
      unresolved commission, if exists. In order to resolve it, the
      commission must not be pending, because if it is there is not
      enough information to resolve it.
      26836734
    • Christos Stavrakakis's avatar
      cyclades: refactor code relative to commission · ac96b3ca
      Christos Stavrakakis authored
      Refactor Cyclades code that handles commissioning with Quotaholder. This
      commit removes the 'uses_commission' decorator. Instead it introduces
      the 'issue_and_accept_commission' function that is responsible for
      implenting the commission workflow. This function  must be called
      exactly after and in the same transaction that creates/modifies the
      resource, because resource creation/modification must happen in the same
      transaction with issuing and storing the serial in the DB.
      ac96b3ca
    • Christos Stavrakakis's avatar
      Varous fixes to cyclades-usage-verify command · ceb968d4
      Christos Stavrakakis authored
      Extend 'cyclades-usage-verify' management command to cover the usage of
      'cyclades-reset-usage' and remove the second one. The new command
      reconciles resources(usage) by detecting inconsistencies between the
      usage of resources in Astakos and Cyclades DB and fixing them by issuing
      a commission with the difference of the usage in DB and Astakos. If
      there is a pending commission for a resource, reconciliation for this
      resource is skipped. Refs #3627
      
      Also, make this command do not consider only users that exist in
      Cyclades DB, but also users that exist in Quotaholder. For such users,
      it is assumed that they have zero usage for all Cyclades resources.
      Refs #3606 #3491
      ceb968d4
    • Christos Stavrakakis's avatar
      Cyclades: remove all quotaholder settings · 47413b6e
      Christos Stavrakakis authored
      Remove from cyclades all settings that were relative with Quotaholder.
      Remove CYCLADES_USE_QUOTAHOLDER settings, since Cyclades can not work
      any more without quotas.
      Remove CYCLADES_QUOTAHOLDER_URL and CYCLADES_QUOTAHOLDER_TOKEN since
      Quotaholder is merged with Astakos.
      47413b6e
    • Christos Stavrakakis's avatar
      Various fixes to quotas · 59ce6ec5
      Christos Stavrakakis authored
      59ce6ec5
    • Giorgos Korfiatis's avatar
  19. 08 Apr, 2013 1 commit