dCache/dcache — pull request #1153 by gbehrmann (2014-12-04 12:48:43+00:00)
Title: spacemanager: Get rid of access latency and retention policy defaults

I recently got contacted by KIT about the differences between the AL/RP
defaults in space manager and pnfs manager. It became clear that the
documentation in our property files wasn't clear enough about the difference.

While looking at this, it became clear that there was no need for defaults in
space manager. The defaults where used in two places: When creating
reservations through the command line interface and when creating reservations
through SRM. In the former case we can just as well make the al and rp options
required, forcing the admin to be explicit about the desired al and rp. In the
latter case, the SRM declares retention policy a required parameter (so we
don't need a default), but access latency is optional. However, rather than
limiting the access latency to a single site default, it makes much more sense
to let the retention policy steer the link group selection and then see which
options we have for access latency. Most likely the retention policy is enough
to limit the choice to a single link group and most likely only a single access
latency is possible for that case. This avoids the need for a default and
even makes the code more intelligent.

When reserving through the SRM withoug an explicit access latency, the code
prefer ONLINE for REPLICA reservations, and NEARLINE for CUSTODIAL reservations,
but falls back to whatever the link group allows.

For reservations through the command line (admin shell), the code has been
simplified: There is no point in a complicated query to the database when the
command invocation already specified the link group to use. All we need to do
is to verify the parameters. This also allows us to provide better error
messages. The patch makes one change to authorization for admin created
reservations: Previously the owner (the FQAN or user allowed to release the
reservation) had to be among the list of principals authorized to create
reservations in the link group. There is however no reason for this
restriction. Indeed, this limitation prevented useful scenarios, e.g. allowing
user made or implicit reservations in a link group, but block release of the
reservation by setting the owner to an admin.

The patch also gets rid of some dead code in the SpaceManagerService and
simplifies the logic for reserving space.

I request backport to 2.10 as the presence of the defaults in space manager has
caused confusion for those upgrading.

Target: trunk
Request: 2.11
Request: 2.10
Require-notes: yes
Require-book: yes
Acked-by: Dmitry Litvintsev
Patch: https://rb.dcache.org/r/7538/
(cherry picked from commit 9094d68dc8fac928dc50287498c28ef6c230a664)