system-test: build authorized-keys file

The admin interface supports authentication via SSH pub/priv keys,
which are often stored in well-known locations.

This patch takes the user's public keys, if found, and uses them to
build an authorized-keys file for the admin interface.

Target: master
Requires-notes: no
Requires-book: no
Patch: http://rb.dcache.org/r/5754/
Acked-by: Gerd Behrmann
fix servlet classpath clash

The servlet API jar files are signed.  Recent versions of java (or
possibly bug http://bugs.sun.com/view_bug.do?bug_id=6805618 ) means
that, on some platforms, all the classes in a package must be signed
by the same certificate.  A failure results in an error message and
dCache failing to startup.

Currently, dCache includes a Jetty-supplied 'javax.servlet' jar file
(v3.0), and a 'javax.servlet'-supplied 'servlet-api' jar file (v2.5).
These are signed by different certificates and, since the v3.0 file
contains additional classes, if v2.5 precedes v3.0 in the classpath
then the classloader will find classes in the same package with
different signatures.

The previous version of Jetty depended on servlet-api jar file and,
while this too had two jar files (a Jetty-supplied and a
'javax.servlet'-supplied) since the two jar files have the same set of
classes, the classloader will take javax.servlet.* classes from one
jar file, independent of classpath order.

This patch fixes this problem by excluding the references to
servlet-api dependency in axis and axisg jar files.

Target: master
Requires-nodes: no
Requires-book: no
Patch: http://rb.dcache.org/r/5757
Acked-by: Gerd Behrmann
Add DB driver to the list of classes to load

The chimera-cli command was overhauled to make it significantly faster.
One technique used was to limit the classes in the classpath to only
those needed.

Unfortunately, this work excluded the database-driver jar. The current
chimera-cli works for system-test, as the plugin mechanism ensures the
database-driver jar is included; however, the PostgreSQL driver is not
included, resulting in chimera-cli no longer working for machines using
PostgreSQL.  The error message is a stack-trace that starts:

[root@bes-srm dcache]# chimera-cli ls /
Exception in thread "main" java.lang.ClassNotFoundException:
org/postgresql/Driver

[reported in user-forum]

Target: master
Request: 2.6
Requires-notes: yes
Requires-book: no
Patch: http://rb.dcache.org/r/5755/
Acked-by: Gerd Behrmann
info: fix concurrent modification

Gerd reported seeing this:

06 jun 2013 21:44:33 (info) [] Uncaught exception in thread Thread-79
java.util.ConcurrentModificationException: null
        at java.util.HashMap$HashIterator.remove(HashMap.java:912) ~[na:1.7.0_11]
        at org.dcache.services.info.gathers.MessageHandlerChain.flushOldMetadata(MessageHandlerChain.java:230) ~[dcache-core-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
        at org.dcache.services.info.gathers.MessageHandlerChain.getMetricTTL(MessageHandlerChain.java:173) ~[dcache-core-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
        at org.dcache.services.info.gathers.MessageHandlerChain.getMetricTTL(MessageHandlerChain.java:37) ~[dcache-core-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
        at org.dcache.services.info.gathers.CellMessageHandlerSkel.answerArrived(CellMessageHandlerSkel.java:150) ~[dcache-core-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
        at dmg.cells.nucleus.CellNucleus$CallbackTask.innerRun(CellNucleus.java:971) ~[cells-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
        at dmg.cells.nucleus.CellNucleus$AbstractNucleusTask.run(CellNucleus.java:929) ~[cells-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_11]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_11]
        at dmg.cells.nucleus.CellNucleus$1.run(CellNucleus.java:657) [cells-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
        at java.lang.Thread.run(Thread.java:722) [na:1.7.0_11]

The problem is triggered by having multiple messenger threads and the
class not being thread-safe.

This patch updates the class to make it thread-safe

Target: trunk
Requires-notes: no
Requires-book: no
Patch: http://rb.dcache.org/r/5756/
Acked-by: Gerd Behrmann
ssh2: Honor admin.colors.enable

Ssh2 admin interface did not honor admin.colors.enable, this patch resolve this problem.

Ticket: http://rt.dcache.org/Ticket/Display.html?id=7820
Acked-by:
Target: trunk
Require-book: no
Require-notes: no
Remove line that sets colors from environment param and not from within dCache
Change parameter to no type definition and switch line to above cell related properties
ssh2: Honor admin.colors.enable

Ssh2 admin interface did not honor admin.colors.enable, this patch resolve this problem.

Ticket: http://rt.dcache.org/Ticket/Display.html?id=7820
Acked-by: Gerd
Target: master
Require-book: no
Require-notes: no
Merge color fix branch with current master because not all changes got committed with the last push.

Sorry.

ssh2: Honor admin.colors.enable
Ssh2 admin interface did not honor admin.colors.enable, this patch resolve this problem.

Ticket: http://rt.dcache.org/Ticket/Display.html?id=7820
Acked-by: Gerd
Target: master
Require-book: no
Require-notes: no
ssh2: Honor admin.colors.enable

    Ssh2 admin interface did not honor admin.colors.enable, this patch resolve this problem.

    Ticket: http://rt.dcache.org/Ticket/Display.html?id=7820
    Acked-by: Gerd
    Target: master
    Require-book: no
    Require-notes: no

Squashed commit of the following:

commit 8e3db9a3f6cd0c9b8ce6f340f67eb3ecf3651163
Merge: 3887dc4 3e02f94
Author: Christian Bernardt <christian.bernardt@desy.de>
Date:   Mon Jul 15 18:33:45 2013 +0200

    Merge color fix branch with current master because not all changes got committed with the last push.

    Sorry.

    ssh2: Honor admin.colors.enable
    Ssh2 admin interface did not honor admin.colors.enable, this patch resolve this problem.

    Ticket: http://rt.dcache.org/Ticket/Display.html?id=7820
    Acked-by: Gerd
    Target: master
    Require-book: no
    Require-notes: no

commit 3887dc446e7d388659ffb651e5a0a9e1db67f868
Author: Christian Bernardt <christian.bernardt@desy.de>
Date:   Mon Jul 15 14:15:39 2013 +0200

    ssh2: Honor admin.colors.enable

    Ssh2 admin interface did not honor admin.colors.enable, this patch resolve this problem.

    Ticket: http://rt.dcache.org/Ticket/Display.html?id=7820
    Acked-by: Gerd
    Target: master
    Require-book: no
    Require-notes: no

commit 3e02f94eebb02bddf81441a9dd7ac41344577e74
Author: Christian Bernardt <christian.bernardt@desy.de>
Date:   Mon Jul 15 14:15:39 2013 +0200

    Change parameter to no type definition and switch line to above cell related properties

commit 89bd221adafba600ce35c5f103f65a6736c408e6
Author: Christian Bernardt <christian.bernardt@desy.de>
Date:   Mon Jul 15 12:22:09 2013 +0200

    Remove line that sets colors from environment param and not from within dCache

commit 0def3e296a3018c173062457b7256a4ac207ef30
Author: Christian Bernardt <christian.bernardt@desy.de>
Date:   Mon Jul 15 11:41:13 2013 +0200

    ssh2: Honor admin.colors.enable

    Ssh2 admin interface did not honor admin.colors.enable, this patch resolve this problem.

    Ticket: http://rt.dcache.org/Ticket/Display.html?id=7820
    Acked-by:
    Target: trunk
    Require-book: no
    Require-notes: no
Merge branch 'master' of github.com:dCache/dcache