libs: move to upstream nfs4j

Acked-by:
Target: master
Require-book: no
Require-notes: no
 nfs4: implement proxy-io on read

Linux client too often falls back to IO through MDS (door).
This ends up with IO error on the client side as dCache does
not supports it.

This change set aims to add proxy IO by using internally DCAP
protocol. The door-pool communication can be changed later to
other protocol.

This is for master, nevertheless, 2.7 and 2.6 should have it as well.

Acked-by: Gerd Behrmann
Target: master
Require-book: no
Require-notes: no
(cherry picked from commit 93ec46a)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>

Acked-by:
Target: master
Require-book: no
Require-notes: no
chimera: Provide meaningful exceptions on failure to delete a file

Addresses issues in Chimera in which failures to delete a file or
directory result in a generic error message without information
about the actual error.

The root cause is that Chimera copies a bad API from Java in which
remove methods simply return a boolean indicating whether the file
was deleted or not. This patch changes this such that an exception
is thrown in case of failure.

Motivation for this patch can be found in server logs of running
S2 against dCache (see http://svn.dcache.org/build/job/master%20post%20testing/167/console).
The log contains entries like:

30 Oct 2013 23:07:14 (PnfsManager) [RiY:547:srm2:rmdir SRM-sisyphus PnfsDeleteEntry] Failed to delete entry: Entry could not be removed: /data/s2/vm-dcache-wn01-tester5/20131030-230600-25706x

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/6169/
(cherry picked from commit 87413b7a38b9fb8284dbb9c8363379f51d4d431d)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
nfs4: fix orphan proxy movers

Check client state before starting a proxy mover.
This prevents orphan movers when client recovery failed
or stateid provided by client is not valid.

Acked-by: Gerd Behrmann
Target: master, 2.7
Require-book: no
Require-notes: no
(cherry picked from commit b9d945f9e1dfb47bf501870cc91f1334b33fb6dc)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
(cherry picked from commit 4dc9af127988889d16b995bcc0ab5fbb9e65fe1e)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
libs: update nfs library to 0.7.1

fixes IO on 'dot' files.
fixes misbehavior in reboot recovery

Changelog for nfs4j-0.7.0..nfs4j-0.7.1
    * [eb6adf4] vfs: chimera: let inode to call setStat()
    * [d5b5a52] nfs4: implement missing RECLAIM_COMPLETE
    * [f361946] nfs4: fix open CLAIM_PREVIOUS
    * [a6d7c13] pom: enforce  maven-release-plugin 2.4.2

Acked-by: Albert Rossi
Target: master, 2.7

Require-book: no
Require-notes: yes
(cherry picked from commit dfeaa7c3fe5f984e8a3a364d5e4a3d78c3bc4497)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
(cherry picked from commit 5be250a84154798d61499aa141805f508f350ccf)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
libs: update nfs code to 0.7.2

new version with possibility to hide dcache from dcap
clients accessing NFS. This allows applications, which use
libdcap for all files, see dCache's NFS to a a regular
file system.

New export options added: dcap(defualt) and no_dcap.

Example:

/pnfs 10.0.1.1/24(rw,acl,no_dcap)

Changelog for nfs4j-0.7.1..nfs4j-0.7.2
    * [5c4808c] vfs: add a special option to hide dcache from dcap clients

Acked-by:
Target: master, 0.7
Require-book: yes
Require-notes: yes
(cherry picked from commit 33bafddac3e69f1d6057697e4244d253138943a3)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
libs: update to bugfix nfs4j-0.7.3

Changelog for nfs4j-0.7.2..nfs4j-0.7.3
    * [f2b0d2b] vfs: fix regression introduced in 1c916c5

Acked-by: Gerd Behrmann
Target: master, 2.8, 2.7
Require-book: no
Require-notes: no
(cherry picked from commit 2d14212ba231232090277b767b7e3352d60474d1)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
pom: enforce maven-release-plugin 2.4.2

the latest plugin broke git support.

Acked-by: Gerd Behrmann
Target: master, 2.7, 2.6
Require-book: no
Require-notes: no
(cherry picked from commit 5a5ccd2d5c3353331881dc5df0645a429df836e9)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
dcache-core, alarms: remove postgresql precondition on schema

There is nothing in the liquibase schema for alarms which specifically requires postgresql.
Removing this precondition allows the rdbms option to be tested in system-test using hsqldb.

Target: 2.6
Patch: http://rb.dcache.org/r/6548/
Require-book: no
Require-notes: no
Acked-by: Gerd
Committed: b84b3fa2fe66b44a9f24dcdeda8cc344780f492b
[maven-release-plugin] prepare release 2.6.21
[maven-release-plugin] prepare for next development iteration
core, billing: remove unit test

The unit test for billing persistence uses timeouts/sleep to check the presence and absence of entries in the database.  This timing, however, is inherently unstable because it depends on the OS and the thread scheduler in particular.  Thus the test will sometimes fail during the build process.

However, the usefulness of this test is very limited, so I propose simply to eliminate it.

Target: 2.6
Request: 2.2
Patch: http://rb.dcache.org/r/6556/
Require-book: no
Require-notes: no
Acked-by: Gerd
Acked-by: Pau
xrootd: Upgrade to xrootd4j v1.2.4

Contains the following changes over v1.2.3:

42101c6 xrootd4j: Make errors null terminated
5ae3a44 Fix read beyond end of file

These changes improve compatibility with the "new xrootd client".

Target: trunk
Request: 2.8
Request: 2.7
Request: 2.6
Ticket: http://rt.dcache.org/Ticket/Display.html?id=8156
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6557/
(cherry picked from commit 68055d49528c12e714928c0d83418798fb8cf793)

Conflicts:
	pom.xml

(cherry picked from commit d39e76a6fec5cdde2e1a87b2ab17e2ca07d81cc3)

Conflicts:
	pom.xml
pool: Fix access time update

The bug causes access time update to happen on pool to pool and not on regular
downloads - the reverse is supposed to happen.

This affects sweeper garbage collection order, space cost calculation, and
access time update in the name space.

Target: trunk
Request: 2.8
Request: 2.7
Request: 2.6
Require-notes: yes
Require-book: no
Ticket: http://rt.dcache.org/Ticket/Display.html?id=8234
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6564/
(cherry picked from commit 05cb3fcab635d741210801efbcc39bd2590dead1)
Merge remote-tracking branch 'upstream/2.6' into 2.6-backport-proxy-io
nfs4: fix IO on special files

regression introduced in 93ec46a3a1be602c0e47d54abd8b0cb12ebb730f

Acked-by: Albert Rossi
Target: master, 2.7
Require-book: no
Require-notes: no
(cherry picked from commit 623a93b44a852b64fe90f58300c070af8ef75efd)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
nfs-proxy: add support for open-less read requests

in a production we observe situations, where client
decides to perform IO through MDS (door) with
all-zero stateid. Such behavior is  allowed by
rfc5661 (#8.2.3) and should be supported
to keep clients happy.

Acked-by: Gerd Behrmann
Target: master, 2.8, 2.7
Require-book: no
Require-notes: no
(cherry picked from commit f29613b1859c22b99abbcd3de063a15fd7a01831)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
nfs4: clean failed request from pending queue

if door have failed to start a mover, then we have to
clean pending message queue to avoid dead records. A
new entry will be created on client retry.

Acked-by: Gerd Behrmann
Target: master, 2.7, 2.8
Require-book: no
Require-notes: no
(cherry picked from commit 9f78b39ca1aac8418e9adea9c1ab219316178ce8)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
chimera: fix rename into a file

fix confitions when file is remove into an existing file
as a parent.

Ticket: #8250
Acked-by: Paul Millar
Target: master, 2.8, 2.7, 2.6
Require-book: no
Require-notes: yes
(cherry picked from commit 119ecfe92c1a69925ad31934f7517421e3f74405)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
libs: update nfs to 0.7.4

minor bugfix to support chimera's rename fixes

Changelog for nfs4j-0.7.3..nfs4j-0.7.4
    * [b11ec2a] nfs4: fix lookupp on the root of the tree
    * [f99922b] nfs4: fix handling of illegal operations
    * [5646570] vfs: chimera: translate exceptions to nfs errors

Acked-by: Gerd Behrmann
Target: master, 2.8, 2.7
Require-book: no
Require-notes: no
(cherry picked from commit fb72047265ae500fbdad0d26eef35d0028781339)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>