An error occurred fetching the project authors.
  1. 18 Apr, 2023 2 commits
  2. 28 Mar, 2023 1 commit
  3. 20 Mar, 2023 1 commit
  4. 17 Mar, 2023 2 commits
  5. 11 Nov, 2022 1 commit
  6. 10 Nov, 2022 1 commit
  7. 25 Oct, 2022 1 commit
  8. 24 Oct, 2022 1 commit
    • Jérome Perrin's avatar
      cli/info: better output of connection parameters · 0642e884
      Jérome Perrin authored
      before:
      
          $ slapos service info slapos-sr-testing
          Software Release URL: /srv/slapgrid/slappart15/srv/project/slapos/software/slapos-sr-testing/software.cfg
          Instance state: busy
          Instance parameters:
          {}
          Connection parameters:
          ("<?xml version='1.0' encoding='utf-8'?>\n"
           '<instance>\n'
           '  <parameter '
           'id="environment-script">/srv/slapgrid/slappart15/srv/runner/instance/slappart7/etc/slapos-local-development-environment.sh</parameter>\n'
      
      after:
      
          $ slapos service info slapos-sr-testing
          Software Release URL: /srv/slapgrid/slappart15/srv/project/slapos/software/slapos-sr-testing/software.cfg
          Instance state: busy
          Instance parameters:
          {}
          Connection parameters:
          {'environment-script': '/srv/slapgrid/slappart15/srv/runner/instance/slappart7/etc/slapos-local-development-environment.sh'}
      0642e884
  9. 22 Sep, 2022 1 commit
  10. 20 Sep, 2022 2 commits
  11. 16 Feb, 2022 1 commit
  12. 19 Oct, 2021 1 commit
    • Xavier Thompson's avatar
      slapproxy: Fix software URL migration · 23f35307
      Xavier Thompson authored
      The `local-software-release-url` option allows migrating the software
      URLs which are local paths by rebasing them on the path provided by
      the option.
      
      Do not migrate software release URLs if the old root path and the
      new root path are subpaths or superpaths one of the other.
      
      In addition, do not migrate an URL if the old one refers to an
      existing file and the new one doesn't.
      
      Also, create a backup of the database before migrating.
      
      See merge request nexedi/slapos.core!338
      23f35307
  13. 05 May, 2021 3 commits
  14. 22 Apr, 2021 1 commit
    • Xavier Thompson's avatar
      slapproxy: Add minimal hateoas support for cli · 655fb891
      Xavier Thompson authored
      Add the minimum hateoas support required for the cli commands:
      - `slapos service list`
      - `slapos service info <reference>`
      - `slapos computer list`
      - `slapos computer info <reference>`
      
      To enable hateoas, complete the slapos.cfg configuration with:
      ```
      [slapos]
      master_rest_url = <proxyaddr>/hateoas
      ```
      
      Also: Fix some bugs and python3 incompatibilities in slap/hateoas.py.
      
      See merge request nexedi/slapos.core!290
      655fb891
  15. 22 Feb, 2021 1 commit
    • Xavier Thompson's avatar
      slapproxy: Prefix forwarded requests with id · d3984193
      Xavier Thompson authored
      When slapproxy forwards a request to an external master it is seen as
      coming from the slapproxy and the original requester's id is lost.
      
      This means forwarded requests from different requesters can collide.
      
      e.g. two partitions request a frontend and when the second request is
      handled the external master updates the first frontend to redirect to
      the second partition instead of creating a second frontend.
      
      To avoid collisions, the id of the requester as seen in the slapproxy
      is prefixed to the instance name (partition reference) in the request:
      
      - case 1: requester is embedded partition => prefix with partition id
          e.g. 'myinstance' -> 'slappart0_myinstance'
      
      - case 2: requester is user => prefix with 'user'
          e.g. 'myinstance' -> 'user_myinstance'
      
      See merge request nexedi/slapos.core!282
      d3984193
  16. 08 Oct, 2020 1 commit
    • Jérome Perrin's avatar
      proxy: support partitions destruction · a58c14b0
      Jérome Perrin authored
      So far implementation of slapos proxy was incomplete regarding partition destructions:
      A partition requested as destroyed was properly destroyed "physically", files were
      removed from filesystem, services were removed from supervisor, but the partition was
      still marked as busy in proxy database, so it was never re-used in subsequent requests.
      
      To solve this, implement the destroyedComputerPartition endpoint to mark the partition
      as free.
      
      This is straightworfard for root partitions, but the cases of child partitions was a bit
      more tricky, especially because software releases usually does not implement properly
      the chain of deletion (it seems this is not properly implemted with softwaretype, only
      with switch_softwaretype) and generally because we don't want to leave orpheans partitions.
      
      In the case of ERP5 implementation of SlapOS master we have an alarm which garbage
      collect in these cases, so we implement something to reach similar goals. We refuse freeing
      a partition while their child paritions are not freed - and we request deletion of these
      partitions so that they are deleted on next slapos node report run. Then after a few runs,
      the whole partition tree will be completely destroyed and freed, even for software which
      does not implement deletion properly.
      a58c14b0
  17. 15 Sep, 2020 1 commit
  18. 11 May, 2020 2 commits
    • Jérome Perrin's avatar
      slapos/proxy: support forwarding requests as a partition · c755cba8
      Jérome Perrin authored
      In SlapOS, both users or partitions can requests partitions. With the
      multimaster support of slapos proxy, all requests where made as a user,
      but in the case of recursive slapos - where a partition from the "outer"
      slapos includes an "inner" slapos, it makes sense to forward partitions
      requests as the partition in the "outer" slapos - this way when this
      partition is destroyed all partitions that might have been requested are
      also destroyed.
      
      To request as partition, the multi-master entry must define two extra
      keys:
       - computer, that can be optained by $${slap-configuration:computer}
      from instance buildout
       - partition, that can be optained by $${slap-configuration:partition}
      
      When these are not set, the request will be made as a user, like it was
      the case before.
      
      We also change the test to unset SLAPGRID_INSTANCE_ROOT because this
      implementation has side effect - the environment variable is set and
      never unset. Without this, test fail when running the full test suite
      because a previous test was leaking SLAPGRID_INSTANCE_ROOT. This is
      definitely something we'll have to improve later.
      c755cba8
    • Jérome Perrin's avatar
      slapos/proxy: use slapos API when forwarding request · 8f3a7989
      Jérome Perrin authored
      Eventhough implementation might be a bit more efficient is we use the
      low level API, we probably don't need performance here and it's easier
      to use the request API
      8f3a7989
  19. 17 Jan, 2020 1 commit
  20. 15 Jan, 2020 1 commit
  21. 25 Nov, 2019 2 commits
  22. 26 Oct, 2019 1 commit
  23. 01 Oct, 2019 4 commits
  24. 01 Aug, 2019 2 commits
  25. 22 Mar, 2019 3 commits
    • Jérome Perrin's avatar
      slapproxy: update database version to 13 · d0ce721b
      Jérome Perrin authored
      Because we want to trigger an upgrade that will remove old tables.
      
      Note that re-dumping database_dump_version_current fixed the column
      order in software table - the dump was incorrect (this also change
      output of `proxy show` for this test)
      d0ce721b
    • Jérome Perrin's avatar
      test_slapproxy: Review test for migrations · 18c814a1
      Jérome Perrin authored
      Create a test for each previous versions to current version (starting
      from version 10, earlier versions are not really supported).
      
      Procedure to add test for new version can be:
       * update table structure and increase version in slapos/proxy/schema.sql
       * use generate_dump.sh script to generate
         slapos/tests/test_slapproxy/database_dump_version_$NEW_VERSION.sql
         from slapos/tests/test_slapproxy/database_dump_version_$PREVIOUS_VERSION.sql
         (with computer_id "computer")
       * add TestMigrateVersion$(NEW_VERSION)ToLatest in
         slapos/tests/test_slapproxy/__init__.py
       * use generate_dump.sh script to update in-place
         slapos/tests/test_slapproxy/database_dump_version_current.sql
         (with computer_id "slaprunner")
      18c814a1
    • Jérome Perrin's avatar
      slapproxy: remove old tables on migration · 2f83e1e7
      Jérome Perrin authored
      Instead of keeping old tables which cause confusion for humans and tools
      directly operating on the database, remove old tables and create a
      separate backup file.
      2f83e1e7
  26. 19 Mar, 2019 2 commits