spacemanager: Set file to TRANSFERRING on accept file request message

By changing the file entry to TRANSFERRING on the accept
file request rather than response we save:

- A database lookup
- A database update
- A message queueing phase

Target: trunk
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6547/
spacemanager: Replace freespaceinbytes with availablespaceinbytes in link group table

Queries and triggers become simpler when we track available space rather
than free space.

On upgrade, the link group table will be updated. The table is small and the
schema change will be almost instantaneous. Note however that should dCache
be downgraded, the schema changes have to rolled back using one of the 'dcache
dabase rollback' commands.

Target: trunk
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6532/
pool: Bind FTP data channel to single interface

The FTP protocol only allows a sinle IP address to be returned to the client,
yet the mover listened on the wildcard address.  This has lead to surprising
results, as an application can by a socket to the wildcard address even when
another socket is already bound to the same port on a specific interface. This
could lead to situations in which the client would connect to the other socket
and not the socket created by the mover (e.g. the admin door that listens in
the same port range).

The patch addresses the problem by only binding the server socket to the
address we would return to the client. The patch changes the behaviour by
removing one DNS reverse lookup and DNS forward lookup: Previously the pool
would return the canonical name of the interface and the door would resolve
that back to an IP address before returning the address to the client. Now the
pool send an address to the door and the door just passes on that address. In
theory this could lead to changes in which pool interface is reported. For this
reason I do not request this patch to be merged to stable branches.

Target: trunk
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6593/
system-test: Fix wrong path in hostCredentials script

Fixes a recently introduced regression.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6604/
chimera: Optimize read of file and directory attributes

Chimera's inode class provides convenient access to the attributes stored in
the inode table. It also supports caching that information, which allows it to
be used in modular code without repeated loading of the same database row.

Chimera does not provide such support for attributes not stored in the inode
table, eg locations, access latency, retention policy and tags. Those have to
be queried through the FileSystemProvider interface. Besides not being
particularly OO like, this approach lacks the convenient caching feature of the
inode.

This patch introduces the dCache specific ExtendedInode subclass of FsInode.
It provides access to those attributes that are not stored directly in the
inode table. Those attributes are cached, which means the ExtendedInode class
is primarily intended for reading an inode, not for updating it.

In particular access to locations and tags has been optimized. Previously
locations could only be read for a particular location type, requiring two
queries to the database. This cost of reading all locations at once is likely
to be very close to that of just reading locations of one type, so this patch
adds means through which to read all locations in a single query. Likewise for
tags: Existing code would always first check for the existence of a tag by
loading the entire list of tag names for a directory. It would then for each
tag do another lookup in the same table to read the tag id, followed by a read
in another table to load the data. This has now all been collapsed to a single
method capable of reading all tag data in one operation by joining the two
tables.  The data is cached in the ExtendedInode, which allows those tags to be
access by the storage info extractor without additional queries.

Target: trunk
Require-notes: yes
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6611/
srmclient: fix support for URLs with IPv6 address

a bit of DRY, but have to be solved more globally.

Ticket: #8248
Acked-by: Dmitry Litvintsev
Target: master
Require-book: no
Require-notes: no