An error occurred fetching the project authors.
  1. 11 Sep, 2024 2 commits
  2. 11 Jun, 2024 2 commits
  3. 10 May, 2024 1 commit
  4. 11 Apr, 2024 1 commit
  5. 28 Mar, 2024 1 commit
  6. 26 Mar, 2024 1 commit
    • Rafael Monnerat's avatar
      erp5: backend apache must not handle Remote-User · 1bd75eee
      Rafael Monnerat authored
        The backend haproxy must not handle the arbitrary variable Remote-User from headers.
      
      It isn't implemented authentication on this backend, so this setting is irrelevant by default.
      
      The proper way to handle authentication is use a trustfull frontend that will set this variable after properly authenticate the certificate and extract the user.
      1bd75eee
  7. 21 Mar, 2024 1 commit
    • Jérome Perrin's avatar
      software/erp5: add control for PYTHONHASHSEED · 774d2fcb
      Jérome Perrin authored
      See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
      
      Setting a value will set the environment variable for all zope processes
      and for the test runner.
      
      Default behavior is:
        - for zope: do not set the variable, so default python behavior will
        be used ( equivalent to setting `0` on python2 and `random` on python3)
        - for test runner: generate a random value for each execution and
        print it, to make it easy to re-run a failing test with the same seed.
      
      This means that ERP5 tests will likely reveal problems where code
      depends on python2 behavior of deterministic hashing. To keep previous
      behavior (and hide these problems), it's possible to set
      python-hash-seed to 0 in test suite parameters.
      774d2fcb
  8. 22 Feb, 2024 2 commits
    • Jérome Perrin's avatar
      stack/erp5,software/slapos-master: remove unused traces of wsgi parameter · 31c5f124
      Jérome Perrin authored
      This parameter no longer exists, this was not removed correctly
      31c5f124
    • Nicolas Wavrant's avatar
      erp5: restore ZODB using the --with-verify option of "repozo --recover" · a21d8d03
      Nicolas Wavrant authored
      "repozo --verify" is not working as this code expects it to: it simply
      prints errors in stdout, and doesn't return an error code in case of
      error. Thus, running it had absolutely no effect, except wasting IO
      and CPU time.
      
      This commit introduces the use of "repozo --recover --with-verify",
      which runs the verify and the recover in a same step, and has the
      advantage to raise (it doesn't exit with 0) in case of error. Also, as
      it does the verification and the recovery at the same time, it uses
      half the IO for the read. On a production server using SSDs, with a
      ZODB of 1Tb, runner-import-restore now takes 14h instead of 26h, iow a
      performance increase of 46%.
      a21d8d03
  9. 20 Feb, 2024 1 commit
  10. 16 Feb, 2024 5 commits
    • Jérome Perrin's avatar
      stack/erp5: implement Zope's rewrite rules in ERP5 balancer partition · 6e735808
      Jérome Perrin authored
      The strategy for compatibility is that:
       - haproxy still listen on the same port as before, without rewrite rule.
         This is called "legacy" port.
       - for each frontend from request parameters, we introduce an haproxy
         frontend with a rewrite for the corresponding `internal-path`
         parameter.
       - the shared frontend instance is updated to use this new frontend
         entry from haproxy. This will cause a small downtime until the shared
         frontend is updated to the new URL on ERP5, but since this feature
         was not used, it's OK.
      
      Technical details are that we:
       - split haproxy config to have frontends and backends.
       - introduce one frontend in haproxy for each frontend from request
         parameters.
       - routing-rule-list argument is still honored the same way, globally
         and after path from frontend.
       - change the shared frontend requests to use "" type, no longer "zope"
         type.
       - we don't do automatic detection of /VirtualHostRoot in URL but always
         add it, because it could be used to trick zope into thinking it
         serves requests for an arbitrary host and do open redirects
       - before using the request's host header in virtualhost path, we check
         that it does not contain /, to prevent injection of virutalhost path
         elements through the host header.
       - we don't use the "path" parameter from shared frontend, because we
         want the frontend to be simple, so we don't want it to rewrite the
         request path (which is also the reason why we deprecated "zope" type)
       - the tests have changed a lot, because they were using what's now the
         "legacy" URL types, so we updated it to use the new URL types with
         all the /VirtualHostRoot/../ in path and also because they use IPv6
         URL, no longer IPv4
      6e735808
    • Jérome Perrin's avatar
      stack/erp5: use slapos.recipe.build to manage haproxy parameters · 2fc522bf
      Jérome Perrin authored
      and save the already allocated ports in a state file, so that requesting
      new families does not change already allocated ports.
      2fc522bf
    • Jérome Perrin's avatar
      stack/erp5: use caucase managed certificate for balancer · d49914a6
      Jérome Perrin authored
      This reverts commit 620c9332 (stack/erp5: stop using caucase managed
      certificate for balancer, 2020-11-10) with an updated design. We add a
      caucase service for balancer in the balancer partition. The caucase
      service from the root partition (that was not used) is removed.
      
      The underlying idea is that the default configuration should use multiple
      caucases with limited scope, here we have one caucase to manage the
      certificate used by haproxy server in the balancer partition, so we put
      one caucase to manage this certificate and the caucase is configured to
      auto-accept one certificate only. The plan is that when we will add a
      certificate for mariadb server, we'll add another caucase inside this
      mariadb server.
      
      For more advanced usage and also to support the cases where a new
      certificate needs to be re-emitted for some reason, users can request
      with an existing caucase URL. In that case, they will have to accept
      the certificate requests.
      
      Notable changes:
      
      balancer/ssl/caucase-url is no longer documented in parameters, this is
      an internal parameter, users can pass one global caucase service to
      manage all partition
      
      CAUCASE environment variable is no longer set when running zope. There
      was no identified use case and with this new approach of multiple
      caucases, the term "caucase" alone became ambiguous.
      d49914a6
    • Jérome Perrin's avatar
      stack/erp5: remove not used "backend-path" · 16c9df39
      Jérome Perrin authored
      This is not documented in schema and has no effect in erp5 (but this is
      still used for slapos-master)
      16c9df39
    • Jérome Perrin's avatar
      ERP5: rework frontend instance parameter · cb78214e
      Jérome Perrin authored
      This change the format or the (mostly) unused frontend parameter to
      support requesting more than one frontend and also enable the request of
      a frontend by default, so that requesting a frontend separately is no
      longer needed.
      
      The `frontend` parameter now also supports requesting frontends for
      specific paths on the ERP5 backend, the example below requests a
      frontend serving directly a web site, with the necessary rewrite rules:
      
      ```js
      {
        "frontend": {
          "default": {
            "internal-path": "/erp5/web_site_module/renderjs_runner/"
          }
        }
      }
      ```
      
      The example below requests a default frontend to the erp5 root, to
      access the ZMI or erp5_xhtml_style interface and two web sites:
      
      ```js
      {
        "frontend": {
          "default": {},
          "erp5js": {
            "internal-path": "/erp5/web_site_module/renderjs_runner/"
          },
          "crm": {
            "internal-path": "/erp5/web_site_module/erp5_officejs_support_request_ui/"
          }
        }
      }
      ```
      
      The example below has an explicit definition of the zope families using
      `zope-partition-dict` parameter, because there is more than one zope
      family, no frontend is requested by default:
      
      ```js
      {
        "zope-partition-dict": {
          "backoffice": {
            "family": "backoffice"
          },
          "web": {
            "family": "web"
          },
          "activities": {
            "family": "activities"
          }
        }
      }
      ```
      
      Continuing this example, to have frontends for backoffice and web
      families, the frontend request can specify the families, like it is
      demonstrated in the example below. In this example, we don't specify an
      entry for "activities" family, so no frontend will be requested for
      this family.
      
      ```js
      {
        "frontend": {
          "backoffice": {
            "zope-family": "backoffice"
          },
          "web": {
            "zope-family": "web",
            "internal-path": "/erp5/web_site_module/web_site/"
          }
        }
        "zope-partition-dict": {
          "backoffice": {
            "family": "backoffice"
          },
          "web": {
            "family": "web"
          },
          "activities": {
            "family": "activities"
          }
        }
      }
      ```
      cb78214e
  11. 22 Jan, 2024 1 commit
  12. 11 Jan, 2024 1 commit
  13. 12 Dec, 2023 2 commits
  14. 23 Oct, 2023 1 commit
  15. 13 Oct, 2023 1 commit
    • Jérome Perrin's avatar
      stack/erp5: set $PYTHONUNBUFFERED for zope · d7391f8e
      Jérome Perrin authored
      stdout/stderr is sent to supervisor and we don't want buffering the
      output in that case, because it introduces a delay in the output and
      break the usage of `slapos node supervisorctl fg` to re-attach the
      process and use pdb
      d7391f8e
  16. 28 Sep, 2023 1 commit
    • Jérome Perrin's avatar
      stack/erp5: serve balancer requests when client certificate is not verified · d58bbbba
      Jérome Perrin authored
      We configure haproxy with "verify optional", which makes haproxy request
      a client certificate, but accept the case where client does not present
      a certificate, but as described in [1], if client present a certificate
      and this certificate can not be verified, handshake is aborted. This is
      not what we want, we want to treat the case of a non verified
      certificate same as the case of the absence of certificate.
      
      This configures haproxy accordingly, using "crt-ignore-err all" to allow
      handshake anyway.
      
      Once this was fixed, there was a remaining problem with
      client_cert_verified acl, haproxy acl are OR, but this rule was supposed
      to be a AND (client present a certificate AND it is verified), this was
      rewritten to use inline condition which are AND.
      
      [1]: https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.1-verify
      
      Also adjust test_x_forwarded_for_stripped_when_no_certificate to assert
      that there is no X-Forwarded-For header at all when no client
      certificate.
      d58bbbba
  17. 26 Sep, 2023 1 commit
  18. 28 Aug, 2023 1 commit
  19. 23 Aug, 2023 1 commit
  20. 17 Aug, 2023 3 commits
  21. 26 Jul, 2023 1 commit
  22. 18 May, 2023 1 commit
    • Jérome Perrin's avatar
      software/erp5: fix rotation of $ZOPE/var/log/neostorage-0.log · 8eb1881c
      Jérome Perrin authored
      log files used by neo storage are not text files, they are sqlite
      databases, so we can not use copytruncate because it leaves a broken
      database. For neo, we have to go back to sending a SIGUSR1 signal to
      tell neo client to reopen log files. This depends on neo registering
      a signal handler, which is done in [1]. It depends on ZServer, so this
      approach will probably have to be adjusted when running on python3
      because the current plan is that we don't have ZServer installed on
      python3.
      
      This depends on a recent erp5.git where runwsgi understands --pidfile
      argument.
      
      1: https://lab.nexedi.com/nexedi/neoppod/blob/fd87e153/neo/client/app.py#L58
      8eb1881c
  23. 24 Apr, 2023 1 commit
    • Levin Zimmermann's avatar
      stack/erp5: Fix master node separation in NEO URI · 6fa1d9ae
      Levin Zimmermann authored
      In nexedi/slapos@0cf70a6e we already migrated the NEO URI concatenation to the
      recent format used by WCFS. Unfortunately we missed separating the address
      (IPv6 + port) of the master nodes from each other. Without adding the
      separator ',' between them, WCFS doesn't work with NEO clusters which have
      multiple master nodes, because NEO/go can't split the different master node
      addresses.
      6fa1d9ae
  24. 05 Mar, 2023 6 commits
  25. 16 Feb, 2023 1 commit