Skip to content
Snippets Groups Projects
  1. May 31, 2024
    • Antoine R. Dumont's avatar
      multiplexer: Check backends with respect to their read-only nature · 12bc3ba8
      Antoine R. Dumont authored
      Prior to this commit, a multiplexer instance would start during its
      initialization to check the configuration of all its backends but also check
      whether they can write or not even when not needed. As it exists read-only
      backends for a multiplexer, that would just fail to start the service.
      
      This evolves the objstorage to grow a check_write attribute (hence parametric
      through configuration file). And then adapts accordingly the multiplexer
      constructor so it can check the configuration of its backends according to
      their respective configuration.
      
      Refs. #4746
      Refs. swh/infra/sysadm-environment#5334
      12bc3ba8
  2. May 29, 2024
  3. May 23, 2024
  4. 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
  5. May 05, 2024
  6. May 04, 2024
  7. Apr 25, 2024
  8. Apr 24, 2024
  9. Apr 23, 2024
  10. Apr 19, 2024
    • Nicolas Dandrimont's avatar
      pathslicing: skip over bogus files when iterating · a6fc3e5a
      Nicolas Dandrimont authored
      When an addition has been interrupted, a tmpfile can be lying around. A
      lot of pathslicing objstorages are legacy, read-only partitions, so
      removing these bogus files is not an option. Instead of breaking
      iteration, just print a warning and keep on going.
      a6fc3e5a
  11. Apr 18, 2024
  12. Apr 02, 2024
  13. Mar 29, 2024
Loading