correcting IoMode check for SEEK_AND_WRITE
Merge pull request #294 from daniel-meister/master

correcting IoMode check for SEEK_AND_WRITE
commons: add a way to reset gauges and counters

Acked-by: Gerd Behrmann
Target: master
Require-book: no
Require-notes: no
srm: Fix a few IllegalStateTransition errors in srmLs

Besides supressing the errors, the code refactors state related
checks, renames the State#isFinalState method, and deletes the
static variant of the method (per reviewer request).

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6238/
srm: Improve logging on pin failure

Adds file name to log messages for pinning failures, avoids
duplicate error logging, and propagates authorization errors
back to the client.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6239/
ssh2: fix int overflow with timeout

As mina sshd used int as timeout value, max long
converted into negative number and ignored.

Acked-by: Paul Millar
Target: master
Require-book: no
Require-notes: no
info-provider: Fix regression in publishing GlueServiceEndpoint

Target: trunk
Request: 2.7
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6246/
srm-client: fix building of tagged RPMs

The master and 2.7 branches contain code to build the srm-client RPMs when
dCache has a "-SNAPSHOT" in the version (e.g., "2.7.0-SNAPSHOT").  The "-"
is illegal in the RPM name and the build-helper maven plugin is used to
remove it (to "2.7.0SNAPSHOT").

Tagged versions of dCache code do not contain the "-SNAPSHOT", so
the regexp in the build-helper maven plugin has nothing to replace.
Unfortunately, a failure to match results in the build process failing.

This patch fixes the problem by making the replacement optional.

Target: master
Request: 2.7
Requires-notes: no
Requires-book: no
Patch: http://rb.dcache.org/r/6242/
Acked-by: Gerd Behrmann
pool: Fix -sticky option in migration module

Addresses a regression that causes the -sticky option when
used without a value to not match any files.

The issue was that the empty value of a multi-valued option
was translated to an array with the empty string rather than
the empty array.

Target: trunk
Request: 2.7
Request: 2.6
Ticket: http://rt.dcache.org/Ticket/Display.html?id=8108
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6247/
srm: Refactor Scheduler

This is the first iteration to clean up the Scheduler class. The
patch mostly addresses logging and locking issues, and also replaces
a number of chained if-statements with switch.

Appologies for auto-reformatting, but the existing indentation was
too inconsistent to work with.

I deliberately did not make major changes to the logic or error
messages. That will be done in subsequent patches.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Acked-by: Dmitry Litvintsev <litvinse@fnal.gov>
Patch: http://rb.dcache.org/r/6199/
srm: Get rid of dead exception code in Scheduler

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Acked-by: Dmitry Litvintsev <litvinse@fnal.gov>
Patch: http://rb.dcache.org/r/6206/
srm: More Scheduler refactoring

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Dmitry Litvintsev <litvinse@fnal.gov>
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6209/
srm: Some more refactoring of Scheduler

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6212/
srm: Fix compilation error introduced by bad merge

Target: trunk
Require-notes: no
Require-book: no
Patch: none
billing: Add shebang header to indexer cronjob

Addresses an issue with the billing indexer cronjob, that
prevented it from being executed.

Target: trunk
Request: 2.7
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6249/
nfs: add -c option to statics command to reset counters

Acked-by: Gerd Behrmann
Target: master
Require-book: no
Require-notes: no
chimera: compact hadles passed to NFS server

The chimera IDs on the wire presented as:

0:TAG:0000DA875B38D9E0461F9ADFEA7C7422A956:OSMTemplate

This change introduses a binary form with backward compatibility,
e.q. new version can understand and decode old forms.

The new form:

<byte 1> : fsid
<byte 2> : inode type
<byte 3> : len of the id
<byte 4:id len> id of the file
<byte ~22> : len of inode specific data
<byte 24:opque len> specific data.

For example above, ithe old encoding: will produce 68 byte nfs file handle,
with new scheme - 47.

Ticket: #7927
Acked-by: Paul Millar
Target: master
Require-book: no
Require-notes: no
dcap: separate protocol name and client ip in DCapProtocolInfo#toString()

from
   DCap-3.0141.34.224.41:20009
to
   DCap-3.0,141.34.224.41:20009

Acked-by: Paul Millar
Target: master, 2.6, 2.7
Require-book: no
Require-notes: no
namespace: use liquibase for chimera based tests

Acked-by: Gerd Behrmann
Target: master
Require-book: no
Require-notes: no
chimera: remove historic SQL code

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