poolmanager: Fix infinite loop in lru partition type

Target: trunk
Require-notes: yes
Require-book: no
Request: 2.9
Request: 2.8
Request: 2.7
Request: 2.6
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6938/
srm: Fix race condition in listing

The ListDirectoryHandler only worked if replies arrived in sequence
and sequentially. For singe threaded cells this worked fine, however
srm now uses multithreaded message delivery and thus listing broke.

The fix updates the handler to deal with concurrent and out of order
reply delivery.

Target: trunk
Request: 2.9
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6946/
pool: Report correct client IP to billing for passive FTP transfers

The pool incorrectly reported the FTP proxy address of the FTP door
even when a direct connection between the client and the pool was
established.

I am undecided how far back to fix this. Please advice.

Target: trunk
Request: 2.9
Request: 2.8
Request: 2.7
Request: 2.6
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6940/
systemtest: add support for generating user credentials

Add support for the --user option.  This will use the disposable
CA to generate user credentials in addition to the host credentials.

The existing generated certificate's CN and subjectAltName (email) are
used as default CN and subjectAltName, if present, otherwise the git
'user.name' and 'user.email' config options are used.  Either may be
overwritten by specifying command-line options.

The script will store these credentials in ~/.globus.  If there is
no existing default credential then it will set the freshly created
credential as the default; but, otherwise, it will leave the existing
default credential alone.

If --generate is specified and existing user credentials are detected
then the --user option is assumed.

Target: master
Patch: http://rb.dcache.org/r/6954/
Acked-by: Gerd Behrmann
alarms, billing: fix liquibase character varying and cleanup.

The latest liquibase (all 3.x versions) has a problem - it generated
invalid SQL:

    https://liquibase.jira.com/browse/CORE-1853

The solution is to update all changesets to use 'VARCHAR(xxx)' instead of
'CHARACTER VARYING(xxx)'.

The affected changesets all seem to be in alarms and billing.

This patch, in addition to applying these necessary changes, has
also cleaned up the logic on index creation:

1. errors should be fail-fast, so onError=WARN have been eliminated
   from these table creation routines.
2. each index is given a separate changeset with a separate pre-condition.
3. the pre-existence of the table with which the indices are associated
   is assumed from the failure logic and sequence of changesets itself.

We have also eliminated a changeset from alarms which creates an unused
table.

The older affected changesets have been eliminated and their newer
versions all given new names/ids.  While this will leave changeset
entries in the database changeset log table, the changes should
be idempotent inasmuch as the preconditions will prevent them from
running if the tables and indices already exist.

Inasmuch as the changes here actually do constitute fixes to
the liquibase logic, I believe this justifies backporting
the entire patch at least to 2.9.

Testing Done: deployed over fresh installation and pre-existing installation of the databases.

Target: master
Request: 2.9
Require-book: no
Require-notes: yes
Acked-by: Dmitry

RELEASE NOTES:  fixes a regression in liquibase scripts for alarms and billing
due to a bug in updated version (3.x) producing incorrect SQL for 'character varying'.
srm: fix retry of copy-pull

When srmCopy copies a file from a remote site it issues a prepareToPut and putDone
when the transfer is successful.  If the transfer is unsuccessful then an abortPut
is called, which destroys the upload directory.

The current behaviour attempts to reuse the transfer TURL when retrying.  Since
abortPut has been called, this directory no longer exists and the transfer-manager
will fail the request as it discovers this.

This patch fixes the problem by issuing prepareToPut when retrying.

Target: master
Patch: http://rb.dcache.org/r/6956/
Acked-by: Gerd Behrmann
Request: 2.9
srm: Split standalone configuration from generic configuration

Large parts of the Configuration class is only used by the standalone server.
This patch moves that part to the subclass specific to the standalone server.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6959/
core: split protocol name form the client IP in HttpProtocolInfo

Acked-by: Gerd Behrmann
Target: master, 2.8, 2.9
Require-book: no
Require-notes: no