1. 18 Dec, 2023 3 commits
    • Kirill Smelkov's avatar
      app: Remember SSL credentials so that it is possible to retrieve them · 3dd0a3f1
      Kirill Smelkov authored
      Unfortunately after creating SSL context it is not possible, or at least
      I could not find how, to retrieve original credentials with which the
      context was created. However wendelin.core needs to be able to take a
      client storage, reconstruct zurl to refer to that particular storage,
      and pass that zurl to wcfs, so that wcfs, in turn, could access the same
      ZODB database.
      
      Given a NEO client instance, it is already possible to retrieve
      master_nodes, cluster name, and detect whether SSL is being in use.
      However without being able to retrieve original SSL credentials,
      reconstructed zurl will not be full and wcfs won't be able to use
      exactly the same secrets as python part does.
      
      -> Help wendelin.core by remembering which ca/cert/key were used to
      build SSL context.
      
      This information is used by zstor_2zurl in wendelin.core here:
      
      https://lab.nexedi.com/nexedi/wendelin.core/blob/885b3556/lib/zodb.py#L390-418
      
      /cc @levin.zimmermann
      /reviewed-by @jm
      /reviewed-on !21
      
      (cherry-picked from commit 17af7f27)
      3dd0a3f1
    • Kirill Smelkov's avatar
      client: Allow to force TLS via neos:// scheme · fa2d4212
      Kirill Smelkov authored
      Similarly to how it is done with e.g. http:// and https:// - if neos://
      is given TLS usage is forced and ca/cert/key must be there either in the
      URI itself, or in $NEO_CA, $NEO_CERT and $NEO_KEY environment variables
      mimicking the way how e.g. for https:// TLS credentials are taken from
      host environment, not from the uri.
      
      The latter might be usability convenience, but is also useful for WCFS
      which needs to be able to remove secrets from uri on zurl normalization.
      
      Please see discussion at !18 (comment 184439)
      for details.
      
      /cc @levin.zimmermann
      /reviewed-by @jm
      /reviewed-on !21
      
      (cherry-picked from commit bc3e38ea)
      fa2d4212
    • Kirill Smelkov's avatar
      client: Don't allow master_nodes and name to be present in options · f1330738
      Kirill Smelkov authored
      Because list of masters and cluster name must be already present in
      netloc and path. Previously e.g.
      
      	neo://db@α,β,γ?master_nodes=a,b,c"
      
      would mean to use master nodes {a,b,c} not {α,β,γ}. Now it is treated as
      invalid URI to remove ambiguity. Same for cluster name.
      
      /cc @levin.zimmermann
      /reviewed-by @jm
      /reviewed-on !21
      
      (cherry-picked from commit 22ccebd6)
      f1330738
  2. 11 May, 2021 2 commits
  3. 22 Mar, 2021 1 commit
  4. 19 Aug, 2020 3 commits
    • Julien Muchembled's avatar
      qa: skip broken ZODB test · a1418c9d
      Julien Muchembled authored
      ======================================================================
      FAIL: check_tid_ordering_w_commit (neo.tests.zodb.testBasic.BasicTests)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "ZODB/tests/BasicStorage.py", line 397, in check_tid_ordering_w_commit
          self.assertEqual(results.pop('lastTransaction'), tids[1])
        File "neo/tests/__init__.py", line 301, in assertEqual
          return super(NeoTestBase, self).assertEqual(first, second, msg=msg)
      failureException: '\x03\xd8\x85H\xbffp\xbb' != '\x03\xd8\x85H\xbfs\x0b\xdd'
      
      (cherry picked from commit f4cb59d2)
      a1418c9d
    • Julien Muchembled's avatar
      client: fix race with invalidations when starting a new transaction on ZODB 5 · 96a5c01f
      Julien Muchembled authored
      This requires ZODB >= 5.6.0
      
      (cherry picked from commit a7d101ec)
      96a5c01f
    • Julien Muchembled's avatar
      Code clean-up, comment fixes · fa7fbad6
      Julien Muchembled authored
      (cherry picked from commit 43029be2)
      fa7fbad6
  5. 22 May, 2020 2 commits
    • Julien Muchembled's avatar
      master: fix crash in STARTING_BACKUP when connecting to an upstream secondary master · 011eba12
      Julien Muchembled authored
      This fixes the following assertion:
      
        Traceback (most recent call last):
          File "neo/master/app.py", line 172, in run
            self._run()
          File "neo/master/app.py", line 182, in _run
            self.playPrimaryRole()
          File "neo/master/app.py", line 302, in playPrimaryRole
            self.backup_app.provideService())
          File "neo/master/backup_app.py", line 114, in provideService
            node, conn = bootstrap.getPrimaryConnection()
          File "neo/lib/bootstrap.py", line 74, in getPrimaryConnection
            poll(1)
          File "neo/lib/event.py", line 160, in poll
            to_process.process()
          File "neo/lib/connection.py", line 504, in process
            self._handlers.handle(self, self._queue.pop(0))
          File "neo/lib/connection.py", line 92, in handle
            self._handle(connection, packet)
          File "neo/lib/connection.py", line 107, in _handle
            pending[0][1].packetReceived(connection, packet)
          File "neo/lib/handler.py", line 125, in packetReceived
            self.dispatch(*args)
          File "neo/lib/handler.py", line 75, in dispatch
            method(conn, *args, **kw)
          File "neo/lib/handler.py", line 159, in notPrimaryMaster
            assert primary != self.app.server
        AttributeError: 'BackupApplication' object has no attribute 'server'
      
      (cherry picked from commit dba07e72)
      011eba12
    • Julien Muchembled's avatar
      mysql: workaround for MDEV-20693 · 70387981
      Julien Muchembled authored
      70387981
  6. 07 Jan, 2020 1 commit
  7. 28 Apr, 2019 1 commit
  8. 27 Apr, 2019 12 commits
  9. 26 Apr, 2019 4 commits
  10. 16 Apr, 2019 5 commits
  11. 05 Apr, 2019 3 commits
  12. 01 Apr, 2019 1 commit
  13. 21 Mar, 2019 2 commits