1. 22 Oct, 2021 7 commits
    • Tigran Mkrtchyan's avatar
      nfs: start mountd service only if nfs v3 is enabled · b48dd6b1
      Tigran Mkrtchyan authored
      Motivation:
      As NFSv4.x doexnt required mountd service, there are no reasons to start
      it if nfsv3 is not used.
      
      Modification:
      start mountd service only if nfs v3 is enabled.
      
      Result:
      less confusion by admins
      
      Fixes: #5038
      Acked-by: Albert Rossi
      Acked-by: Paul Millar
      Acked-by: Lea Morschel
      Target: master
      Require-book: no
      Require-notes: yes
      b48dd6b1
    • Alexander Paul Millar's avatar
      bootstrap: startup can hide bugs · 2eb01a18
      Alexander Paul Millar authored
      Motivation:
      
      A bug triggered when starting the system cell would not be logged with
      the corresponding stack-trace, because it is currently wrapped by an
      ExecutionException.
      
      Modification:
      
      Take care to unwrap the potential ExecutionException, to reveal the
      exception thrown during the System cell's start process.
      
      Result:
      
      More diagnostic information should there be a bug.
      
      Target: master
      Requires-notes: no
      Requires-book: no
      Request: 7.2
      Patch: https://rb.dcache.org/r/13224/
      Acked-by: Marina Sahakyan
      2eb01a18
    • Alexander Paul Millar's avatar
      bootstrap: fix two problems with how bugs are reported on startup · 141e2dde
      Alexander Paul Millar authored
      Motivation:
      
      Two problems:
      
       1. If there is a bug when executing a batch script and when onError is
          set to continue the the stacktrace is printed twice.
      
       2. The printed stack-trace is for the wrapping CommandPanicException,
          rather than the underlying problem.  In almost all cases, the
          stack-trace of the CommandPanicException isn't of interest, only
          that of the underlying bug.
      
      Modification:
      
      Move the CommandPanicException test into the block handling onError !=
      CONTINUE.
      
      Update show the CommandPanicException's cause, if there is one;
      otherwise, show the CommandPanicException.
      
      Result:
      
      Avoid printing a stack-trace twice if a bug is triggered during startup
      and omit unnecessary information.
      
      Target: master
      Require-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Patch: https://rb.dcache.org/r/13222/
      Acked-by: Marina Sahakyan
      141e2dde
    • Alexander Paul Millar's avatar
      bootstrap: don't hide bugs in 'create' command · a5f88b25
      Alexander Paul Millar authored
      Motivation:
      
      The 'create' command starts a new cell, which may involve a non-trivial
      amount of logic to bring up the cell.  Currently, if this triggers a bug
      then that RuntimeException is wrapped in a CommandThrowableException,
      which does not indicate a bug.
      
      Modification:
      
      Allow a RuntimeException to propagate.  The command execution
      environment will take care to write this RuntimeException in a
      CommandPanicException, which indicates a bug.
      
      Result:
      
      Bugs in pool startup code are now logged with a corresponding
      stack-trace.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Patch: https://rb.dcache.org/r/13223/
      Acked-by: Marina Sahakyan
      a5f88b25
    • Alexander Paul Millar's avatar
      srmclient: add Java-11 dependency · 71073be9
      Alexander Paul Millar authored
      Motivation:
      
      RPM-based distributions have now agreed which capability represents the
      ability to run Java bytecode of a specific version.  The dCache RPM was
      updated to describe its dependency using this standard approach;
      however, the srm-client was (mistakenly) ignored.
      
      Modification:
      
      Add a Java dependency, following what is already done with the dCache
      RPM.
      
      Results:
      
      The RPM packaging system and related software (e.g,. yum) now
      understands that the srm-client package requires java.
      
      Target: master
      Request: 7.2
      Requires-notes: yes
      Requires-book: no
      Ticket: https://ggus.eu/?mode=ticket_info&ticket_id=153984
      Ticket: https://rt.dcache.org/Ticket/Display.html?id=10193
      Patch: https://rb.dcache.org/r/13200/
      Acked-by: Tigran Mkrtchyan
      71073be9
    • Alexander Paul Millar's avatar
      ftp: try harder to ensure any timer tasks are cancelled · 125c76c1
      Alexander Paul Millar authored
      Motivation
      
      A recent bug-report (see #6064) indicated that a timer task was left
      active after the FTP session had terminated.
      
      Although the trigger for that bug is currently unknown, the report
      highlights a weakness of the current FTP door; specifically, that the
      termination of an ongoing upload's progress markers depends on correct
      behaviour within the transfer itself.
      
      Modification:
      
      We want to avoid the overhead of creating threads therefore the Timer
      instance is left global (i.e., shared across all FTP sessions).
      Instead, some additional bookkeeping is added, with an additional check
      on shutdown.
      
      Result:
      
      The FTP door should be more robust against a (currently unknown) bug
      that results in the ftp session attempting to send progress queries to
      the pool after that is no longer possible.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Patch: https://rb.dcache.org/r/13194/
      Acked-by: Marina Sahakyan
      125c76c1
    • Alexander Paul Millar's avatar
      ftp: show file sizes for LIST output in bytes · 8560ed38
      Alexander Paul Millar authored
      Motivation:
      
      Some clients continue to parse the output of LIST to learn information
      about dCache namespace.  Those clients expect the file size to be in
      bytes.
      
      Modification:
      
      Update LIST output to show value in bytes.
      
      Result:
      
      Better compatibility with legacy clients.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Patch: https://rb.dcache.org/r/13228/
      Acked-by: Dmitry Litvintsev
      8560ed38
  2. 21 Oct, 2021 2 commits
    • Albert Louis Rossi's avatar
      dcache-xroot: upgrade xrootd4j to 4.2.2 · 9d9be93d
      Albert Louis Rossi authored
      xrootd4j ad0dda76
      https://rb.dcache.org/r/13201/
      
      fixed a regression introduced into the unix protocol plugin
      
      in tags 4.2.2, 4.1.3
      
      Stable branches below 7.1 are unaffected.
      
      Target: master
      Request: 7.2 (4.2.2)
      Request: 7.1 (4.1.3)
      Requires-notes: yes
      Requires-book: no
      Patch: https://rb.dcache.org/r/13218/
      Acked-by: Lea
      9d9be93d
    • Alexander Paul Millar's avatar
      pool: removing hsm with `reload` command kills pool · b6f797c0
      Alexander Paul Millar authored
      Motivation:
      
      When an HSM is removed from the pool's setup file and the `reload`
      command is used an error is reported and the configuration is not
      modified.  The following stacktrace is logged:
      
          dmg.util.CommandPanicException: (1) Possible bug detected during setup execution and service must be restarted: java.lang.UnsupportedOperationException
                  at org.dcache.cells.UniversalSpringCell.executeSetup(UniversalSpringCell.java:365)
                  at org.dcache.cells.UniversalSpringCell$LocalSetupManager.load(UniversalSpringCell.java:1228)
                  at org.dcache.cells.UniversalSpringCell$SetupCommandListener$ReloadCommand.call(UniversalSpringCell.java:561)
                  at org.dcache.cells.UniversalSpringCell$SetupCommandListener$ReloadCommand.call(UniversalSpringCell.java:544)
                  at org.dcache.util.cli.AnnotatedCommandExecutor.execute(AnnotatedCommandExecutor.java:134)
                  at dmg.cells.nucleus.CellAdapter.executeCommand(CellAdapter.java:209)
                  at org.dcache.cells.UniversalSpringCell.executeCommand(UniversalSpringCell.java:187)
                  at dmg.cells.nucleus.CellAdapter$1.doExecute(CellAdapter.java:90)
                  at org.dcache.util.cli.CommandInterpreter.command(CommandInterpreter.java:120)
                  at dmg.cells.nucleus.CellAdapter$1.command(CellAdapter.java:106)
                  at dmg.cells.nucleus.CellAdapter.command(CellAdapter.java:195)
                  at dmg.cells.nucleus.CellAdapter.executeLocalCommand(CellAdapter.java:873)
                  at dmg.cells.nucleus.CellAdapter.messageArrived(CellAdapter.java:812)
                  at dmg.cells.nucleus.CellNucleus$DeliverMessageTask.run(CellNucleus.java:1274)
                  at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:229)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
                  at dmg.cells.nucleus.CellNucleus.lambda$wrapLoggingContext$2(CellNucleus.java:727)
                  at java.base/java.lang.Thread.run(Thread.java:829)
          Caused by: java.lang.UnsupportedOperationException: null
                  at com.google.common.collect.UnmodifiableIterator.remove(UnmodifiableIterator.java:46)
                  at com.google.common.collect.TransformedIterator.remove(TransformedIterator.java:52)
                  at org.dcache.pool.nearline.HsmSet.afterSetup(HsmSet.java:539)
                  at java.base/java.lang.Iterable.forEach(Iterable.java:75)
                  at org.dcache.cells.UniversalSpringCell.executeSetup(UniversalSpringCell.java:360)
                  ... 18 common frames omitted
      
      This does, indeed, kill the pool.
      
      The problem was introduced with commit 3c0c5cd3 (committed in 2014).
      The JavaDoc for `Maps.filterKeys` says that the value view's iterator
      does not support the `remove` method.
      
      Modification:
      
      Replace the filter apprach with a simple for-each iterator, with an
      if-statement adopting the role of the filter.
      
      Result:
      
      A bug is fixed where removing a `create hsm` statement in a pool's setup
      file and running the `reload` command kills the pool.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Patch: https://rb.dcache.org/r/13219/
      Acked-by: Albert Rossi
      Acked-by: Lea Morschel
      b6f797c0
  3. 20 Oct, 2021 4 commits
    • Albert Louis Rossi's avatar
      util/frontend: change transfer rate to double · ad0dda76
      Albert Louis Rossi authored
      Motivation:
      
      Long division of bytes transferred by seconds
      yields zero for slow transfers.
      
      See:
      
      https://rt.dcache.org/Ticket/Display.html?id=10209
      
      Modification:
      
      Change to floating point division.
      
      Result:
      
      Clients are happier.
      
      Target: master
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.0
      RT: #10209
      Requires-notes: yes
      Requires-book: no
      Patch: https://rb.dcache.org/r/13215/
      Acked-by: Lea
      ad0dda76
    • Alexander Paul Millar's avatar
      pool: add support for stateful NearlineStorage · 1868c62e
      Alexander Paul Millar authored
      Motivation:
      
      A stateful NearlineStorage needs to know when it should open resources,
      such as a network socket.
      
      Modification:
      
      Add a new `start` method to the NearlineStorage to support classes that
      implement NearlineStorage and that having some kind of background state.
      
      The existing `shutdown` method is repurposed to indicate when to
      shutdown that background state, without any changes to the code.
      
      Update HsmSet to call the `start` method once the cell has actually
      started.
      
      Result:
      
      NearlineStorage implementations now have a mechanism to learn when it is
      safe to start opening resources.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Patch: https://rb.dcache.org/r/13198/
      Acked-by: Tigran Mkrtchyan
      1868c62e
    • Alexander Paul Millar's avatar
      core: update config testing to honour CellLifeCycleAware mocks · c935d879
      Alexander Paul Millar authored
      Motivation:
      
      A class may implement CellSetupProvider to indicate that it contributes
      to the cell's setup.  When loading a configuration, such classes are
      mocked, creating discardable instances with which to verify the setup
      commands.
      
      Such CellSetupProvider classes may also implement CellLifeCycleAware, in
      which a class may learn when a setup file is being "run".
      
      Currently, the testing process does not honour CellSetupProvider classes
      that implement CellLifeCycleAware, but simply invokes the commands,
      which breaks the contract of CellLifeCycleAware.
      
      Modification:
      
      Update the testing process so that the `beforeSetup` method is called on
      any `CellLifeCycleAware` mock before invoking the setup commands.  After
      the commands have completed, the `afterSetup` method is called.
      
      Some care is taken that any mock that `afterSetup` is always called for
      any mock that has had `beforeSetup` called, even in the event of
      exceptions being thrown from `beforeSetup`, during the commands, or
      `afterSetup`.
      
      Result:
      
      A misconfigured hsm instance in the pool results in a single-line error
      message in the domain's log file.
      
      Target: master
      Requires-notes: no
      Requires-book: no
      Request: 7.2
      Patch: https://rb.dcache.org/r/13197/
      Acked-by: Tigran Mkrtchyan
      c935d879
    • Dmitry Litvintsev's avatar
      Auto create table for TransferManager persistency · 9bf609eb
      Dmitry Litvintsev authored
      Motivation:
      -----------
      
      For some reason (new datanucleus library?) table auto
      create is required to be specifically set to true now.
      
      Modification:
      ------------
      
      Set "datanucleus.shema.autoCreateTables" to true
      
      Result:
      -------
      
      Observed tables created, TPC transfer complete without producing
      stack traces, errors or exessive stages
      
      Patch: https://rb.dcache.org/r/13210/
      Acked-by: Al Rossi
      
      Target: master
      Request: 7.1
      Request: 7.2
      
      Require-book: no
      Require-notes: yes
      9bf609eb
  4. 19 Oct, 2021 6 commits
    • Dmitry Litvintsev's avatar
    • Alexander Paul Millar's avatar
      gplazma: switch from `user:` to `username:` · c626b076
      Alexander Paul Millar authored
      Motivation:
      
      The gPlazma modules are somewhat inconsistent in how to represent the
      org.dcache.auth.UserNamePrincipal.  In the banfile, scitoken plugins and
      the "explain login" and "test login" admin commands it's "user:paul".
      In the multimap and mutator plugins it is `username:paul`.
      
      This inconsistency may cause confusion.
      
      Modification:
      
      Adopt `username:` as the common prefix, as `user:` is somewhat ambiguous
      as to what about the user it is referring.
      
      Update banfile, scitoken and the two admin commands to accept either
      `user:paul` or `username:paul`.  Update unit tests added to verify this
      behaviour.
      
      The a few places where the prefix `user:` is documented are also
      updated.
      
      A warning is logged if `user:` is used, encouraging admins to update
      their configuration.
      
      A future patch (targeting just master) can then remove support for the
      `user:` prefix.
      
      Result:
      
      The banfile and scitoken plugins, and the two admin commands `test
      login` and `explain login` are updated to accept the `username:` prefix
      (e.g., `username:paul`).  The prefix `user:` continues to work but is
      now deprecated.
      
      Requires-notes: yes
      Requires-book: no
      Target: master
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Closes: #6105
      Patch: https://rb.dcache.org/r/13190/
      Acked-by: Tigran Mkrtchyan
      c626b076
    • Alexander Paul Millar's avatar
      billing: fix NPE in billing from NFSv3 message · a72c05cf
      Alexander Paul Millar authored
      Motivation:
      
      The NFSv3 door sometimes sends info messages to billing that does not
      contain a subject.  This is (seemingly) valid, but triggers an
      NullPointerException in billing like:
      
          Thread Thread[billing-0,5,billing-threads] died <NFS-dcache-node01>
          java.lang.NullPointerException: null
              at org.dcache.auth.Subjects.getUids(Subjects.java:129)
              at diskCacheV111.vehicles.DoorRequestInfoMessage.getUid(DoorRequestInfoMessage.java:83)
              at org.dcache.services.billing.text.StringTemplateInfoMessageVisitor.visit(StringTemplateInfoMessageVisitor.java:78)
              at diskCacheV111.vehicles.DoorRequestInfoMessage.accept(DoorRequestInfoMessage.java:89)
              at org.dcache.services.billing.cells.BillingCell.getFormattedMessage(BillingCell.java:202)
              at org.dcache.services.billing.cells.BillingCell.messageArrived(BillingCell.java:174)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.dcache.cells.CellMessageDispatcher$ShortReceiver.deliver(CellMessageDispatcher.java:272)
              at org.dcache.cells.CellMessageDispatcher.call(CellMessageDispatcher.java:188)
              at org.dcache.cells.AbstractCell.messageArrived(AbstractCell.java:302)
              at dmg.cells.nucleus.CellAdapter.messageArrived(CellAdapter.java:848)
              at dmg.cells.nucleus.CellNucleus$DeliverMessageTask.run(CellNucleus.java:1274)
              at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:229)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at dmg.cells.nucleus.CellNucleus.lambda$wrapLoggingContext$2(CellNucleus.java:727)
              at java.base/java.lang.Thread.run(Thread.java:829)
      
      Modification:
      
      Update the visitor to correctly handle the missing Subject case.
      
      Result:
      
      Billing will no longer throw a NullPointerException with certain
      information from an NFS door serving an NFSv3 client.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Closes: #6115
      Acked-by: Lea Morschel
      Patch: https://rb.dcache.org/r/13193/
      a72c05cf
    • Alexander Paul Millar's avatar
      ftp: ensure cell is killed even if shutdown triggers a bug · 892890b7
      Alexander Paul Millar authored
      Motivation:
      
      A recent report (see #6106) indicates that if the ftp door's shutdown
      sequence triggers a bug then the cell is not killed.  Although we should
      fix the bug, the door should also be more robust in shutting down.
      
      Modification:
      
      Catch (and report) any shutdown bugs, but continue on to kill the cell.
      
      Result:
      
      The ftp door is more robust against bugs triggered when a client
      disconnects.  The problems so far have been triggered when the client
      disconnects during a transfer that is proxied.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Patch: https://rb.dcache.org/r/13196/
      Acked-by: Lea Morschel
      892890b7
    • Alexander Paul Millar's avatar
      ftp: remove deadcode · b2723937
      Alexander Paul Millar authored
      Motivation:
      
      The class AbstractInterruptibleLineBasedInterpreter appears to be a
      relic of the migration from blocking-IO based approach to a
      NIO/Netty-based approach.
      
      Modification:
      
      Removed class that's no longer used.
      
      Result:
      
      No user or admin observable changes.  The code base is slightly smaller.
      
      Target: master
      Requires-notes: no
      Requires-book: no
      Patch: https://rb.dcache.org/r/13195/
      Acked-by: Lea Morschel
      b2723937
    • Alexander Paul Millar's avatar
      pool: improve error message on badly configured hsm instance · 2d0cf041
      Alexander Paul Millar authored
      Motivation:
      
      If an hsm is badly configured, the error message says what is wrong but
      not that the problem is with an HSM configuration, nor does it say with
      which hsm instance the problem lies.
      
      Modification:
      
      Update error message to make it clearer that the problem is with an HSM
      configuration and with which HSM instance.
      
      Result:
      
      Slightly more informative error messages if a setup file badly
      configures an HSM instance.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Patch: https://rb.dcache.org/r/13199/
      Acked-by: Lea Morschel
      2d0cf041
  5. 18 Oct, 2021 1 commit
    • Tigran Mkrtchyan's avatar
      nfs-vfs: fix access check in ChimeraVfs (fixes 19fa7cf2) · bfcf3a36
      Tigran Mkrtchyan authored
      Motivation:
      the change 19fa7cf2 introduced a check `isRoot` for all files,
      however, the original code was performing such check only for special
      files.
      
      Modification:
      Ensure that `isRoot` check performed only if inode type is SURI.
      
      Result:
      fixes unexpected exception.
      
      Acked-by: Lea Morschel
      Acked-by: Paul Millar
      Acked-by: Dmitry Litvintsev
      Target: master, 7.2, 7.1, 7.0
      Require-book: no
      Require-notes: yes
      bfcf3a36
  6. 15 Oct, 2021 2 commits
    • Alexander Paul Millar's avatar
      libraries: upgrade version of canl · 17968a82
      Alexander Paul Millar authored
      Movation:
      
      "Rolling over" is a process where a CA updates the certificate for their
      root or intermediate CA certificate, but without changing their public
      private key pair.
      
      The current version of CaNL suffers from a bug where, after such a
      roll-over, the users of that CA are no longer recognised.
      
      Modification:
      
      Latest version of canl, which fixes this problem.
      
      Result:
      
      Fix a bug where dCache will no longer accept certificates issued by a
      trusted CA after that CA updates their CA certificate while keeping the
      public/private key-pair the same.  This is typically done to change
      something in CA's certificate.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Patch: https://rb.dcache.org/r/13191/
      Acked-by: Lea Morschel
      17968a82
    • Tigran Mkrtchyan's avatar
      Merge pull request #6015 from dCache/dependabot/maven/org.bouncycastle-bcprov-jdk15on-1.67 · b9b9705d
      Tigran Mkrtchyan authored
      build(deps): bump bcprov-jdk15on from 1.54 to 1.67
      b9b9705d
  7. 14 Oct, 2021 3 commits
  8. 13 Oct, 2021 1 commit
  9. 12 Oct, 2021 2 commits
  10. 11 Oct, 2021 3 commits
    • Alexander Paul Millar's avatar
      gplazma: scitoken make ExemptFromNamespaceChecks principal optional · 19dd5032
      Alexander Paul Millar authored
      Motivation:
      
      A change, introduced with commit d9eb9a97, introduces a new
      @AuthenticationOutput principal: ExemptFromNamespaceChecks.  However,
      that patch failed to provide a safe-guard that prevents that new
      principal being sent to dCache nodes that run a version of dCache that
      doesn't support that new principal.
      
      For example, if a Subject (containing ExemptFromNamespaceChecks) is sent
      to a pool node that doesn't support the principal then that message will
      fail to deserialise.  This means that, for SciToken clients, dCache will
      no longer work correctly after upgrading gPlazma.
      
      Modification:
      
      Make the inclusion of the ExemptFromNamespaceChecks principal
      configurable, disabled by default.
      
      Add unit tests to verify correct behaviour.
      
      Result:
      
      Avoid an unreleased regression in backwards compatibility.
      
      Target: master
      Requires-notes: no
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      19dd5032
    • Neele Rahmlow's avatar
      dcache: Unit tests of messageReply · dfce73a5
      Neele Rahmlow authored
      Motivation:
      The class messageReply is used in many services and allows a reply
      to be send securely from the message delivery thread.
      However, many of the cell communication tests are still missing,
      as are those for messageReply.
      
      Modification:
      Adds one test file, in which all methods of the messageReply class
      are tested.
      
      Result:
      The tests increase code coverage.
      No user observable changes.
      
      Target: master
      dfce73a5
    • Neele Rahmlow's avatar
      cells: Unit tests of cellMessage · 3b82eba0
      Neele Rahmlow authored
      Motivation:
      Some of the methods of the cellMessage class has not yet been tested.
      
      Modification:
      Adds some tests to the existing test file for the class cellMessage.
      
      Result:
      The tests increase code coverage.
      No user observable changes.
      
      Target: master
      3b82eba0
  11. 07 Oct, 2021 1 commit
    • Alexander Paul Millar's avatar
      webdav: return 507 if insufficient space on GET request · 3bdf8709
      Alexander Paul Millar authored
      Motivation:
      
      dCache treats PoolManager reporting insufficient storage capacity on a
      PUT request by returning a 507 (Insufficient Storage) HTTP status code.
      
      PoolManager may also fail because of insufficient storage capacity on
      GET requests if pool-to-pool or staging is required.  If this happens
      then dCache logs the problem (in webdav) and returns the more generic
      500 (Internal Server Error) status code.
      
      Returning 507 on a GET request is allowed (and used, in practice) and
      provides more information.  In addition, the logging by the door should
      be consistent between GET and PUT requests.
      
      Modification:
      
      Factor-out a common method that describes how a CacheException is
      converted to the corresponding WebDavException.
      
      Apply this method to both GET and PUT requests.
      
      Result:
      
      dCache now responds with a 507 (Insufficient Storage) on GET request if
      dCache must do a pool-to-pool internal-transfer or stage the file but no
      pools have sufficient free capacity to support this.
      
      Target: master
      Requires-notes: yes
      Requires-book: no
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Request: 6.2
      Closes: #6067
      Patch: https://rb.dcache.org/r/13186/
      Acked-by: Tigran Mkrtchyan
      3bdf8709
  12. 06 Oct, 2021 2 commits
  13. 05 Oct, 2021 4 commits
    • Albert Louis Rossi's avatar
      all: reformat code using Google Style Sheet · 8e450b55
      Albert Louis Rossi authored
      Modifications:
      
      The reformatting involves optimization of imports (reordering),
      application of all syntactical sugar settings, but does not
      include code rearrangement (fields, methods, classes) or code
      cleanup.
      8e450b55
    • Dmitry Litvintsev's avatar
      Merge pull request #3 from dCache/issue-10191 · 988a39e0
      Dmitry Litvintsev authored
      acl: set IDENTIFIER_GROUP flag if WHO is GROUP or OWNER_GROUP
      988a39e0
    • Lea Morschel's avatar
      global: add a new dCache code style document · e0dd9d36
      Lea Morschel authored
      Motivation:
      
      The dCache code currently conforms to an informal style imperfectly. It is desirable to have a style that is agreed upon and can be automatically enforced.
      A format based on Google's Java code style was agreed upon. The only modification concerns the number of indents: the changed document defaults to four rather than two whitespaces.
      
      Modification:
      Result:
      
      Added a changed version of Google's Java code style xml file.
      
      Target: master
      Requires-notes: no
      Requires-book: no
      e0dd9d36
    • Lea Morschel's avatar
      srm-server: fix potential NPE in trs · 1c258108
      Lea Morschel authored
      Motivation:
      
      A race condition might lead to the tape recall scheduler trying to operate on a null tape object, leading to an exception.
      
      Modification:
      Result:
      
      Prevent trowing a NPE by not deleting tape objects and checking for as well as handling null values appropriately.
      
      Target: master
      Target: 7.2
      Requires-notes: no
      Requires-book: no
      Patch: https://rb.dcache.org/r/13188/
      Acked-by: Tigran Mkrtchyan
      1c258108
  14. 30 Sep, 2021 2 commits
    • Albert Louis Rossi's avatar
      pom: move dcache-view to 2.0.0 · 09bc1240
      Albert Louis Rossi authored
      dcache-view now at v2.0.0
      
      This has the additional admin pages + icons,
      and the new quota information in user info.
      
      Target: master
      Request: 7.2
      Requires-notes: yes
      Requires-book: no
      Patch: https://rb.dcache.org/r/13187/
      Acked-by: Dmitry
      Acked-by: Lea
      09bc1240
    • Alexander Paul Millar's avatar
      webdav: fix ASCII error response · 1e018821
      Alexander Paul Millar authored
      Motivation:
      
      Commit 5e7f0ab7 introduced the possibility for dCache WebDAV door to
      return a non-HTML error response if the client doesn't indicate it
      understands HTML (e.g., curl, rclone).
      
      Unfortunately, the response handler failed to set the Content-Length
      header, which can lead to truncated HTTP entity (i.e., truncated error
      message).
      
      Modification:
      
      Ensure the Content-Length is set correctly.
      
      Result:
      
      Non-HTML error responses from the WebDAV door (for non-webbrowsers) are
      no longer truncated.
      
      Target: master
      Request: 7.2
      Request: 7.1
      Request: 7.0
      Requires-notes: yes
      Requires-book: no
      Patch: https://rb.dcache.org/r/13184/
      Acked-by: Lea Morschel
      1e018821