(2.10) dcache-webadmin: change Jetty setting so .war is not unpacked

See http://rt.dcache.org/Ticket/Display.html?id=8489.

When upgrading from 2.6 to 2.10, there is a potential
for the webadmin directory timestamps to be more recent
than the timestamp of the /usr/share/dcache/classes/webapps/webadmin.war
file, which then causes Jetty to ignore the new war
and use the old directory. This subsequently provokes
jndi issues because the new httpd.batch file does not
pass through properties that the webadmin spring file
expects to find in the naming and directory interface.

The simplest solution is to turn off unpacking in
versions subsequent to 2.6.

Note that https://rb.dcache.org/r/7436/ does this for master.

Testing:

Installed 2.6.  Then updated to master (this patch) over it,
leaving the old webadmin directory intact.  Httpd confirmed
to start without issues, navigation through pages is normal.

Target: 2.10
Request: 2.9
Request: 2.8
Request: 2.7
Acked-by: Gerd
Require-book: no
Require-notes: yes

RELEASE NOTES:  The webadmin.war found in /usr/share/dcache/classes/webapps
is no longer unpacked (by default, /var/lib/dcache/httpd).  This
avoids potential conflicts between versions when update installs are run.

Conflicts:

	skel/share/defaults/httpd.properties
alarms:  fix regex for checksum alarm

The alarm definition for CHECKSUM uses the regex

Marking (.+) as BROKEN.

Unfortunately this matches both the error emitted by
the ChecksumScanner

 _log.error("Marking {} as BROKEN: {}", id, e.getMessage());

as well as the broken file message from WriteHandleImpl:

 _log.warn("Marking pool entry as BROKEN");

The latter should not produce an alarm.

The regex for the CHECKSUM alarm has been made more specific
in order to exclude matching the latter logging statement.

Note that the changes to alarms in 2.11 render this
patch unnecessary for 2.11 or master.

Target: 2.10
Request: 2.9
Request: 2.8
Reqeust: 2.7
Reqeust: 2.6
Acked-by: Dmitry
Require-notes: no
Require-book: no
webadmin: Fix ClassCastException in cell admin

Fixes

07 nov. 2014 23:32:44 (httpd) [] RuntimeException while executing runnable org.dcache.cells.CellStub$1@135dac1f with executor com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService@12afd1d3
java.lang.ClassCastException: java.lang.String cannot be cast to diskCacheV111.vehicles.Message
        at org.dcache.cells.CellStub$1.run(CellStub.java:503) ~[dcache-core-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) [guava-17.0.jar:na]
        at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156) [guava-17.0.jar:na]
        at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145) [guava-17.0.jar:na]
        at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185) [guava-17.0.jar:na]
        at org.dcache.cells.CellStub$CallbackFuture.set(CellStub.java:594) [dcache-core-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at org.dcache.cells.CellStub$CallbackFuture.answerArrived(CellStub.java:616) [dcache-core-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at dmg.cells.nucleus.CellNucleus$CallbackTask.innerRun(CellNucleus.java:1050) [cells-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at dmg.cells.nucleus.CellNucleus$AbstractNucleusTask.run(CellNucleus.java:1005) [cells-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) [guava-17.0.jar:na]
        at dmg.cells.nucleus.CellNucleus.addToEventQueue(CellNucleus.java:813) [cells-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at dmg.cells.nucleus.CellGlue.sendMessage(CellGlue.java:557) [cells-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at dmg.cells.nucleus.CellNucleus.sendMessage(CellNucleus.java:371) [cells-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at dmg.cells.nucleus.CellAdapter.messageArrived(CellAdapter.java:831) [cells-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at dmg.cells.nucleus.CellNucleus$DeliverMessageTask.innerRun(CellNucleus.java:1095) [cells-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at dmg.cells.nucleus.CellNucleus$AbstractNucleusTask.run(CellNucleus.java:1005) [cells-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_20]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_20]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]

The problem was hidden by the use of a raw type and thus the compiler didn't
reject the code.

Target: trunk
Request: 2.11
Request: 2.10
Request: 2.9
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/7478/
(cherry picked from commit 0b23cfca5c0faf2019dfcaa332875d00908c94f8)
doors: Add pnfs ID to billing remove entries

Doors reform billing when files are deleted, but many only included the path.
Since the path is ambiguous, this patch adds PnfsId to those notifications. In
a few cases we even have the file size available and add that too. The client
IP address is also added.

Please advice whether this should be backported to 2.10.

Target: trunk
Require-notes: yes
Require-book: yes
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/7476/
(cherry picked from commit 6a750afd1044aba4471dbffcbee81d11d28a5270)
Merge pull request #1065 from alrossi/fix/2.10/checksum-regex

alarms:  fix regex for checksum alarm
Merge pull request #1071 from gbehrmann/fix/2.10/rb7478

webadmin: Fix ClassCastException in cell admin
Merge pull request #1074 from gbehrmann/fix/2.10/rb7476

doors: Add pnfs ID to billing remove entries
[maven-release-plugin] prepare release 2.10.10
[maven-release-plugin] prepare for next development iteration
alarms.properties fix accidental header corruption

Present only on 2.10 and 2.9 branches.

Target: 2.10
Require-book: no
Require-notes: no
Merge pull request #1076 from alrossi/fix/2.10/alarms-properties-header

(2.10) alarms.properties fix accidental header corruption
Merge pull request #1028 from alrossi/fix/2.10/war-no-unpack

(2.10) dcache-webadmin: change Jetty setting so .war is not unpacked
xrootd,pool: Fix xrootd and http logging context

Several executors didn't use a CDC resetting executor, causing the CDC
to be from whatever transfer first created the thread.

Target: trunk
Request: 2.11
Request: 2.10
Require-notes: yes
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: https://rb.dcache.org/r/7507/
(cherry picked from commit 2b652204310d8164fbff2a3903c8cedeb1b12986)
cells: Refine TTL discard message

A recent addition has added automatic discard of messages when their TTL is
exceeded. dCache logs a warning when this happens. Our admins have noted that
in particular for String messages, the warning is not particularly useful, as
only the message type is logged.

Since String messages are already a special case in dCache, I think it makes
sense to also log when they are discarded in a special way. This patch logs the
(possibly truncated) content of the string.

The patch also adds the message age and ttl to the log message.

Given how minor the change is and given that the log message was recently
introduced and may trigger support requests, I request that this change is
backported.

Target: trunk
Request: 2.11
Request: 2.10
Require-notes: yes
Require-book: yes
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/7503/
(cherry picked from commit fa36eb22260be4eaeed138f27408cd4d54fd1ee9)
Merge pull request #1079 from gbehrmann/fix/2.10/rb7507

xrootd,pool: Fix xrootd and http logging context
Merge pull request #1081 from gbehrmann/fix/2.10/rb7503

cells: Refine TTL discard message
[maven-release-plugin] prepare release 2.10.11
[maven-release-plugin] prepare for next development iteration
dcache-webadmin: revert rrd data source names

The following releases

2.10.8
2.9.12
2.8.16
2.7.21
2.6.36

introduced improvements to the pool queue plots code
which also unfortunately altered the data source names
(mainly in order to eliminate NaNs from the underlying
store). This results in an incompatibility with
existing .rrd files preventing plot generation (see
the exception trace below).

While the round-robin datastore is transient (the old
default was 15 days of queue information, now changed to 2)
and can be eliminated and then recreated afresh, this
patch restores the old names, so that upgrades from before
these releases to the current will avoid this issue.
It turns out that the storing of NaNs has no impact
on the principal issue the original patch was trying
to address (faulty stacked rendering of histogram bars).

Those who have already moved to the indicated releases
will see the stack trace again and will have
to remove the .rrd files.  Those upgrading from
a version prior to those indicated will experience
no such error.

Target: master
Patch: https://rb.dcache.org/r/7434
Acked-by: Tigran
Require-book: no
Require-notes: yes

RELEASE NOTES:  Those upgrading to

2.10.8
2.9.12
2.8.16
2.7.21
2.6.36

Will experience an error message regarding the pool-queue plots reporting "Unknown datasource name".
The problem can be fixed in the following ways:

1) No upgrade.  Do:

dcache stop httpdDomain
rm -f /var/lib/dcache/plots/*.rrd
dcache start httpDomain

2) Upgrade to this release.

If a fix such as 1) was applied, and then an upgrade is done, 1) will have to be reapplied.

Upgrading from a version preceding the listed versions to this one should experience no
such error.
pool: Avoid interrupting Berkeley DB in migration module server

Berkeley DB for Java doesn't like thread interrupts, and the pool tries to
never interrupt threads while they update the meta data database. We however
missed at least one case:

17 Nov 2014 11:11:10 (ore_ndgf_org_001) [ore_ndgf_org_002 PoolMigrationCopyReplica 00007D0EC04343684CF6A5F78B289361CD7B] Fault occured in repository: Internal repository error
diskCacheV111.util.CacheException: No transaction is active
        at org.dcache.pool.repository.meta.db.CacheRepositoryEntryImpl.setSticky(CacheRepositoryEntryImpl.java:225) ~[dcache-core-2.10.10.jar:2.10.10]
        at org.dcache.pool.repository.v5.CacheRepositoryV5.setSticky(CacheRepositoryV5.java:890) [dcache-core-2.10.10.jar:2.10.10]
        at org.dcache.pool.repository.v5.CacheRepositoryV5.setSticky(CacheRepositoryV5.java:600) [dcache-core-2.10.10.jar:2.10.10]
        at org.dcache.pool.migration.MigrationModuleServer$Request.run(MigrationModuleServer.java:301) [dcache-core-2.10.10.jar:2.10.10]
        at org.dcache.util.CDCExecutorServiceDecorator$1.run(CDCExecutorServiceDecorator.java:104) [dcache-core-2.10.10.jar:2.10.10]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_71]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_71]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_71]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_71]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]

This patch fixes this problem.

Target: trunk
Request: 2.11
Request: 2.10
Request: 2.9
Request: 2.8
Request: 2.7
Request: 2.6
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Acked-by: Karsten Schwank <karsten.schwank@desy.de>
Patch: https://rb.dcache.org/r/7509/
(cherry picked from commit 19d6b127d170c700f1fd77afdfd65846aab1fc0a)