nfs: switch to jpnfs-0.0.5

Use stand alone NFS code with following key features:

  - full acl support. You can enable/disable acls per export option ‘acl’/’noacl’.
    The ‘noacl’ option is default. Notice, even is ACLs are disabled for some clients
    changes from other client will have an effect on access control. For example, let
    say we have two clients A mounted with acl and B mounted without acl. If client A
    sets an acl ‘EVERYBODY READ DENY’ for a file, then client B will fail to read file
    as well.

 - proper behavior for read-only exports.
 - Significant performance improvement on listing of big directories.
 - Session leak on mount/umount which can cause DoS
 - Support 4MB IO blocks
 - The NFS file handle modified to allow changes in the export file to be validated for
   each request. With ‘exports reload’ command in admin interface this makes any change
   in export file to take an immediate effect, like setting client to read only, enabling acls or
   removing client from the export list. In case of client matches to multiple export entries
   at the same time, most precise match will be applied:
           a.b.c.d/N
           a.b.c.d/n ( N > n)
           somelonger*.at.some.net
           some*.at.some.net

Notice, all NFS clients (v3 and v4) have to unmount prior update.

Ticket: #7654
Acked-by: Gerd Behrmann
Target: trunk
Require-book: yes
Require-notes: yes
chimera: special files mtime should be always current time

recently added '.(get)(<file>)(locality)' special file uses mtime from the original file.
As file is not changes the mtime get not updated. This tells NFS client that content is
not changes and cached value is OK.

Set mtime always to be current time to invalidate NFS client cache.

Acked-by: Paul Millar
Target: trunk, 2.6
Require-book: no
Require-notes: no
patch: http://rb.dcache.org/r/5471/
pool: Fix CPU spin in Netty based transfer services

Netty 3.5.7 modified the channel factory to no longer lazily
instatiate the worker threads at channel registration. Instead
it starts the workers in its constructor.

In some cases - and I haven't figured out exactly what those
cases are - the resulting worker begins to spin on the empty
selector. This may be a problem limited to Mac OS X, or it
may be a more generic problem.

I tried to write a test program to reproduce the problem, but
the problem is not easy to reproduce. For this reason it is
also difficult to report this problem to the Netty project.

As a solution this patch adds lazy instantiation of the channel
factory. Althoug one may consider this a woraround, the change
is necessary to avoid instantiating the worker unless we need
them. The premis that creating the channel factory early is cheap
no longer holds.

Target: trunk
Request: 2.6
Require-book: no
Require-notes: no
Acked-by: Paul Millar <paul.millar@desy.de>
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/5466/
spacemanager: fix NPE and corresponding logging

Acked-by: Paul Millar
Target: trunk, 2.6
Require-book: no
Require-notes: no
Patch: http://rb.dcache.org/r/5484/
nfs: add a possibility to list exports per host

Acked-by: paul Millar
Target: trunk, 2.6
Require-book: no
Require-notes: yes
gplazma: Remove internal principals from reply

Addresses compatibilty issues between 2.2 head nodes and 1.9.12 pools.

Some plugins, like the kpwd plugin, do not fill well into gPlazma 2's
architecture. The kpwd file plays the role of all four steps of a
gPlazma login and the plugin must do tricks to pass information from
one phase to the next. It does this by injecting a KpwdPrincipal that
holds the kpwd record.

Unfortunately, this principal escapes gPlazma and is passed along to
other dCache components as part of the Subject. Besides exposing
plugin specific internal principals, and making the subject unnecessarily
larger, this poses a compatbility problems with 1.9.12 pools - these
pools do not have the means to deserialize the internal KpwdPrincipal.

This patch solves the problem by removing all non-public principals
before constructing the gPlazma reply.

Target: trunk
Request: 2.6
Request: 2.2
Require-notes: yes
Require-book: no
Patch: http://rb.dcache.org/r/5487/
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Merge branch 'master' of https://github.com/dCache/dcache
pool: Make access time update non-blocking

Addresses a performance issue when reading files from a pool.

Patch http://rb.dcache.org/r/4568/ modified the pool to let access
time be updated whenever a file is read. The update is however blocking,
which means that the notification thread in the pool is blocked until
a reply from PnfsManager is received. Given that we do not use the
reply for anything, we can just as well turn the access time update
into a non-blocking notification.

Target: trunk
Request: 2.6
Require-notes: no
Require-book: no
Acked-by: Dmitry Litvintsev <litvinse@fnal.gov>
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/5472/
Add ANSI output for admin shell help text

Adds pleasant looking formatting using bold and underlined
text for help output of some admin shell commands. Support
for more commands may be added in the future.

One of the motivations for introducing annotated commands as
a replacement to the old ac_ methods was so we could make
programatic use of the additional information captured by
the annotations.

This patch adds one such use, namely the ability to output
help text formatted for an ANSI console. I have copied the
output format of man pages, using bold for headings and
literal strings, and underlined text for value placeholders.

The short summary is that the help output of some commands
in the admin is now much prettier.

Target: trunk
Require-notes: yes
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/5469/
pool: Clean up flush controller

- Flush properties can now be queried through 'bean properties'

- Shell commands are now implemented as annotated commands

- Background tasks now execute on a thread pool

- Addresses inconsistent source code formatting

- Addresses potential lock contention on flush controller monitor

Target: trunk
Require-book: no
Require-notes: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/5467/
pkgs: Debian package missing chown for alarms directory

The debian packaging was missing the chown statement for the /var/lib/dcache/alarms directory; consequently it was being created by root.

Patch adds necessary line to postinst.template.

Target: trunk
Request: 2.6
Patch: http://rb.dcache.org/r/5492/
Bug: http://rt.dcache.org/Ticket/Display.html?id=7774
Require-notes: yes
Require-book: no
Acked-by: Gerd

RELEASE NOTES:

Fixes bug where alarms directory is owned by root instead of dcache user (Debian).
A step towards configurable cell names for gPlazma and billing

Addresses several cases of hardcoded cell names for the gplazma and
billing services.

The patch does not address all hardcoded names. The patch moves
some hardcoded names from the Java code to the batch file. A subsequent
patch should introduce a property to define the name of the billing
cell to use.

Target: trunk
Require-notes: no
Require-book: no
Ticket: http://rt.dcache.org/Ticket/Display.html?id=6836
Acked-by: Albert Rossi <arossi@fnal.gov>
Patch: http://rb.dcache.org/r/5494/
pool: Don't claim a restore was successfull when it failed

Addresses the issue that the pool logs "File successfully
restored from tape" no matter whether the restore was
successful or not.

Target: trunk
Request: 2.6
Request: 2.2
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5485/
ftp: Fix regression in gPlazma and billing cell names

Addresses a regression introduced in the recent change that remove
hard coded cell names. The batch file of the ftp services contained
a white space character different from an ASCII 32 space and thus
ended up being part of the cell name.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5504/
ftp: Fix NPE regression in door initialization

Addresses a regression introduced in the recent removal of hard
coded cell names. The regression leads to a null pointer exception
during door initialization.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5503/
SRM: log client disconnecting at debug level

Currently, if a client disconnects during the SSL/GSI handshake then
the EOFException is logged as just EOFException.  This is both
non-obvious and unnecessary as dCache is behaving correctly.

This patch updates the message to be meaningful and reduces the
log-level to debug.
SRM: don't talk to SpaceManager when disabled

There is a configuration value describing whether or not space-manager
is enabled.  Currently, SRM sends messages to space-manager even when
space-manager is disabled.  Because of this, sites are required to run
space-manager, even when it is disabled.

This patch alters the SRM so that if space-manager is disabled then not
communication with space-manager is attempted.  Under this circumstance,
SRM will report any space-token information for srmLs operations and
space-specific operations will fail with a friendly error message.
cleaner: Fix null pointer exception in 'hsms attached to pool' command

Addresses a null pointer exception in the cleaner.

Ticket: http://rt.dcache.org/Ticket/Display.html?id=7769
Target: trunk
Request: 2.6
Request: 2.2
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5493/
gplazma2-jaas: add principal mutator plugin

JAAS plug in can be configured to use any jaas login module. As a
result we may get principas which can't be handles by gplazma. New
MutatorPlugin allows to convert some principals to supported equivalents.

in gplazma.conf:
auth jaas
...
map optional mutator gplazma.mutator.accept=org.apache.activemq.jaas.UserPrincipal gplazma.mutator.produce=username
map sufficient nsswitch
...

The supported output types:
   dn
   name
   username
   kerberos
   fqan

Ticket: #7763
Acked-by: Paul Millar
Target: trunk, 2.6, 2.2
Require-book: yes
Require-notes: yes
Remove deprecated code.

Breaks compatibility with components older than dCache 2.6.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/5531/