srm: Fix lock congestion

To support SRM_FILE_BUSY, both get and ls requests scan for active
put requests. This causes lock congestion as reading the SURL of
the put request acquires a read lock, while abort and put done calls
are processed with a write lock (and these calls trigger callouts
to pnfsmanager).

The read lock to access the surl is however unneeded as surl is a
final field. This patch removes the read-lock for surl access. The
patch also removes the read-lock on several other final fields, as
well as marking several fields that are not modified as final.

Target: trunk
Request: 2.9
Request: 2.8
Request: 2.7
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/7054/
pinmanager,srm,spacemanager,xrootd: Fix pool monitor expiration

The pool manager state (aka pool monitor) is cached in a number of
other services. A recent change modified the cache logic to trigger
in-thread asynchronous updates rather than dedicated an entire thread
to the update. The Guava cache class is configured to trigger an update
after 20 seconds, however the update is asynchronous, meaning that the
first access after 20 seconds will still get the old data. There is a
total lifetime of 10 minutes, meaning that once the entry is 10 minutes
old, it is purged and a blocking update is done instead (i.e. you
never get data older than 10 minutes).

Unfortunately the cached pool state in pool monitor is considered
invalid after 5 minutes and the pool is then treated as offline. On
a lightly loaded system this causes some strange effects.

The immediate fix is to reduce the max lifetime to 3 minutes (allowing
some slack up to the 5 minute lifetime of the pool data). An async.
update is still triggered after 20 seconds.

Longer term, the pool information should be channelled directly from
pools to the services that need it.

Target: trunk
Request: 2.9
Require-notes: yes
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: https://rb.dcache.org/r/7055/
xrootd,nfs: Add support for space management

Xrootd and NFS doors fail to include the space manager in pool manager
requests, thus failing to support space management. Even though the
protocols don't have explicit support for space management, they may
still be used with the WriteToken tag or with implicit reservations.

If space manager is disabled, the message flow is unaffected. Even if
space manager is enabled, read requests or writes to unmanaged space
are simply passed through in space manager (which when space manager
is placed in the same domain as pool manager is fairly cheap).

Target: trunk
Require-notes: yes
Require-book: yes
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: https://rb.dcache.org/r/7049/
Request: 2.9
Request: 2.8
Request: 2.7
dcache-star: create valid xml even on db connection failure

the dcache-star script creates invalid xml output if the connection to
the database failes.
This patch ensures that valid xml is created under those circumstances,
too.

Ticket: 8251
Acked-by: Tigran
Target: master
Require-book: no
Require-notes: no
http: fix multipart response size

Acked-by: Paul Millar
Target: master
Require-book: no
Require-notes: no