Skip to content
Snippets Groups Projects
  1. Feb 10, 2025
  2. Sep 10, 2024
  3. Aug 30, 2024
  4. Aug 27, 2024
  5. Jul 11, 2024
  6. Jul 02, 2024
  7. Jun 04, 2024
  8. May 31, 2024
  9. May 29, 2024
    • Nicolas Dandrimont's avatar
      multiplexer: handle PermissionErrors in `check_config` · cd672034
      Nicolas Dandrimont authored
      Some objstorages are configured read-only implicitly by way of
      permissions, so `check_config` raises a PermissionError instead of
      returning False. Handle that situation explicitly.
      
      Also handle RemoteExceptions with a warning, to support the old
      situation where PermissionError was not properly wrapped by the RPC
      layer.
      cd672034
    • Nicolas Dandrimont's avatar
      api: support PermissionErrors · b2f39088
      Nicolas Dandrimont authored
      `check_config` raises a PermissionError under some circumstances, and
      it's nicer to be able to handle that directly than to have to unwrap a
      RemoteException.
      b2f39088
  10. May 23, 2024
  11. May 22, 2024
    • David Douard's avatar
      Make the ReadOnlyObjStorageProxy raise ReadOnlyObjStorageError when needed · daee75c0
      David Douard authored
      It used to do nothing, which is inconsistent with the behavior of the
      HTTPReadOnlyObjStorage.
      
      Adapt a bit the multiplexer to handle this properly:
      
      - keep a list of RW storage threads separated from the full list of
        backend storage threads
      - the decision is made using a call to check_config(check_write=True)
        for each of the backend storages
      - adapt a bit the API/behavior of the check_config() method to make it
        return False when called with 'check_write=True' for a RO obj storage,
      - for the multiplexer, check_config(check_write=True) returns True if at
        least one backend objstorage is green,
      - remove reference to deleted filters in the multiplexer doc string.
      daee75c0
    • David Douard's avatar
      Rename ReadOnlyObjStorage and NonIterableObjStorage exceptions · 315e84d0
      David Douard authored
      Add an 'Error' suffix so there is no confusion, especially with regard
      to the new ReadOnlyProxyObjStorage proxy objstorage class (even if it's
      not the same name, it can be very confusing).
      315e84d0
    • David Douard's avatar
      Simplify a bit the MultiplexerObjStorage · 59f19176
      David Douard authored
      Move the implementation in swh/objstorage/multiplexer.py since there is
      nothing left in the swh/objstorage/multiplexer/ but this class.
      
      Make the constructor able to instantiate the encapsulated objstorages so
      we can get rid of the factory _construct_multiplexer_objstorage
      function.
      59f19176
    • David Douard's avatar
      Convert the ObjStorageFilter as a simple proxy ObjStorage · d32b610c
      David Douard authored
      Get rid of the generic ObjStorageFilter complexity, since we only have a
      single filter. This allows also to get rid of the
      _construct_filtered_objstorage() factory function in factory.py; this later
      is only deprecated for now for bw compat, but uses the new
      ReadOnlyObjstorageProxy class instead.
      d32b610c
    • David Douard's avatar
      Add support for naming objstorage instances from configuration · 807be812
      David Douard authored
      this will allow using this name to add statsd probes ie.g. counting which
      backend has been successful in a multiplexed backend.
      807be812
  12. May 05, 2024
  13. May 04, 2024
  14. Apr 25, 2024
  15. Apr 24, 2024
  16. Apr 23, 2024
    • Nicolas Dandrimont's avatar
    • Nicolas Dandrimont's avatar
      winery: add support for rbd_map_options · b02163db
      Nicolas Dandrimont authored
      Some ceph clusters (for instance, the one spawned by the ceph/demo
      docker image) require some options to be passed to rbd device map. Add
      support for configuring these options in all relevant functions.
      b02163db
    • Nicolas Dandrimont's avatar
      winery tests: add envvar to hardcode ceph pool name · d917209f
      Nicolas Dandrimont authored
      This is useful to use a manually managed pool for all tests, e.g. when
      using a toy ceph cluster generated by the ceph demo image.
      
      Example usage (needs /etc/ceph to be empty!):
      
        docker run -d --net=host -v /etc/ceph:/etc/ceph -e MON_IP=192.168.1.201 -e CEPH_PUBLIC_NETWORK=192.168.1.0/24 -e CEPH_DEMO_UID=test-user quay.io/ceph/demo
        sudo chmod -R a+r /etc/ceph
        ceph config set global mon_allow_pool_size_one true
        ceph osd pool create winery-test-shards replicated --size=1 --yes-i-really-mean-it
        ceph osd pool create winery-test-shards-data replicated --size=1 --yes-i-really-mean-it
        ceph osd pool application enable winery-test-shards rbd
        ceph osd pool application enable winery-test-shards-data rbd
      
        CEPH_HARDCODE_POOL=winery-test-shards RBD_MAP_OPTIONS=ms_mode=prefer-secure pytest swh -k 'winery and not bench_real'
      d917209f
Loading