doors: Allow loginbroker property to be empty

It should be possible to not register with any loginbroker.

Target: trunk
Require-notes: no
Require-book: no
Request: 2.7
Acked-by: Dmitry Litvintsev <litvinse@fnal.gov>
Patch: http://rb.dcache.org/r/6219/
(cherry picked from commit eb26c213d4ae019eca7bed9c02d30c19c746b1bd)
Merge pull request #270 from gbehrmann/fix/2.7/rb6219

doors: Allow loginbroker property to be empty
deb: Include cron job for billing compression and indexing

Target: trunk
Request: 2.7
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6216/
(cherry picked from commit cf33d78af4e828e2f99b8bc211753699040ce11a)
info-provider: Fix regression caused by info-provider using a deprecated property

Introduces the new property 'info-provider.http.port', which defines
the TCP port the info-provider will contact the httpd service on.

Sites that previously relied on redefining httpdPort will have to
set this new info-provider property.

Also fixed a bug that caused the HTTP_PORT and HTTP_HOST environment
variables to be ignored by the info-provider.

Target: trunk
Require-notes: no
Require-book: no
Request: 2.7
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6217/
(cherry picked from commit a16d3ebcb5e9afb25d538bdd8a573c393d9f583f)
srm: Fix regression in srmGetSpaceMetaData

The spec is not precise about what file requests level statuses should
be considered a non-success return code for the srmGetSpaceMetaData
operation itself. It seems however logical to not consider
space-lifetime-expired and exceeded-allocation as failures of the
getSpaceMetaData operation.

Atlas transfers currently fail at NDGF due to this problem.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6218/
(cherry picked from commit 264ebd20e480b63e1eb0c470efe8774069470cb6)
srm: Fix space expiration check in space query

Target: trunk
Require-notes: no
Require-book: no
Request: 2.7
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6220/
(cherry picked from commit 7782b922864f7ab3332cb21ec4cb289486416ab2)
info-provider: Fix publishing of SRM

When srm-loginbroker was removed as a service, publishing the
srm to loginbroker was altered to publish the family name as
'srm' rather than 'SRM'. This is in line with our other doors,
but I was unaware that info-provider checks for this particular
string and that the check is case sensitive.

This patch updates info-provider to check for the lower case
string.

Target: trunk
Request: 2.7
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6222/
(cherry picked from commit 74a070b89280c79f5aa45ed8df253e58b604141f)
srm: Improve error message on file_busy and duplication_errors

I think these messages are more to the point. The duplication error
message is taken from the SRM spec.

Target: trunk
Request: 2.7
Require-notes: no
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/6223/
(cherry picked from commit 90996939d7cc3bf37f8509e78c0ed54b26db930c)
Merge pull request #276 from gbehrmann/fix/2.7/rb6222

info-provider: Fix publishing of SRM
Merge pull request #277 from gbehrmann/fix/2.7/rb6223

srm: Improve error message on file_busy and duplication_errors
Merge pull request #278 from gbehrmann/fix/2.7/rb6216

deb: Include cron job for billing compression and indexing
Merge pull request #279 from gbehrmann/fix/2.7/rb6217

info-provider: Fix regression caused by info-provider using a deprecated...
Merge pull request #280 from gbehrmann/fix/2.7/rb6218

srm: Fix regression in srmGetSpaceMetaData
Merge pull request #281 from gbehrmann/fix/2.7/rb6220

srm: Fix space expiration check in space query
libs: update to nfs4j-0.6.2

Changelog for nfs4j-0.6.1..nfs4j-0.6.2
    * [2f24baa] nfsv3: fix creation of symbolic link

Acked-by: Albert Rossi
Target: master, 2.7
Require-book: no
Require-notes: no
(cherry picked from commit 1142ec37e8e8eede1ecff49d62357498871ed7de)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Merge pull request #283 from kofemann/fix-nfs-2.7

libs: update to nfs4j-0.6.2
    chimera: fix handling of bytea data in path2inode and path2inodes stored procedures

    when migrating from 8.4 to 9.2 postgresql it was noticed that assigning of bytea data
    to varchar produced unexpected result due to bytea_output='hex' as default in postgresql 9.2
    This patch addresses it by calling encode(ifiledata,'escape') before assigning it to
    varchar variables

    Ticket: #number
    Acked-by: Paul Millar, Tigra Mkrtchyan
    Target: trunk
    Request: 2.2
    Request: 2.6
    Request: 2.7
    Require-book: no
    Require-notes: no
Merge pull request #284 from DmitryLitvintsev/fix/2.7/r6196

    chimera: fix handling of bytea data in path2inode and path2inodes st...
srm: Add an access log

Adds an access log to the SRM. The access log writes a line to
/var/log/dcache/access-DOMAIN.log for each SRM access. The log
is rotated once a day and kept for 30 days. Log level and age
can be adjusted through the new properties dcache.log.level.access
and dcache.log.access.max-history. Currently only the SRM supports
this log file, but it is invisioned that other doors could
produce similar logs. Note that an access log file is generated
for every domain, but only domains with an srm service will write
anything to the file. The log format follows the NetLogger format.
Currently, only SRM v2 requests are logged.  IMPORTANT: To allow
dcache to generate the log file the /var/log/dcache directory will
be changed to dcache upon upgrade.

We have regularly found ourselves in the position of not knowing
whether some particular problem is to be attributed to the client
or the server. An access log which for each SRM request shows
some basic information would help alot in such situations.

I tried to keep the format generic enough that we could implement
similar functionality for other doors. Therefore I chose the
NetLogger format. The Common Logging Format used by web servers
does not apply to the kind of informatio I want to log.

The fields to be logged are a tradeoff between logging something
that is useful, but without logging too much or to log something
that can readily be extracted from the SRM database. Hence I
log client IP, DN, session, request method, request token if
available, surl if request token is not available, the return
status and the user-agent. More detailed information about
requests can often be found by looking up the request using the
request token.

Note that I had a change of heart regarding overship of the log
directory. I have always insisted on the directory to not be
writable by the dcache user, but concluded it is just too much
trouble for the default setup. A site that wants the extra
protection against log tampering can still customize their
setup. Our new default is no different from how other services
are setup by default on various distros. As a consequence of
that change I have also moved the events log to the log directory.
The events log too uses a rolling appender, but with a history
of 0 days (so it should delete log files after one day).

I adjusted the name of the events logger such that it too is
placed under the org.dcache hierarchy. Finally I adjusted the
timestamp to include the timezone (per NetLogger recomendations).

A few SRM status codes have been reclassified to not be errors.

The srmLs implementation has been altered to return a request
token no matter what. This is useful no matter whether the request
is processed synchronously or asynchronously as it bind the request
to the request identifier used in the database. I also remove
a useless status string for the ls implementation that I found
while looking at the access log output.

Target: trunk
Request: 2.7
Require-notes: yes
Require-book: yes
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6226/
(cherry picked from commit cc106cec5cc2785161336133f624fefefe492172)
Fix build failure in EventLogger class.

Target: trunk
Request: 2.7
Require-notes: no
Require-book: no
Patch: none
(cherry picked from commit 59440b0640effcf3fb4624f30c028be47d25a473)