skel: fix billing database properties to work with dcache database commands

module: skel, defaults

While conditional initialization of the billing database works when the cell is created (via Spring), the database commands currently do not handle correctly the case where there is no billing database and billingToDb=no. In particular, database ls lists the billing database regardless, and database update fails because it tries to run the liquibase changelog on a non-existent database.

To fix this, we have added conditional immutable properties in the style of several other default properties files.

Target: master
Committed: master@02dacf3
Patch: http://rb.dcache.org/r/5563
Require-book: no
Require-notes: yes
Request: 2.6
Request: 2.2
Bug: http://rt.dcache.org/Ticket/Display.html?id=7809
Acked-by: Paul

RELEASE NOTES: Fixes a bug in the dcache database commands where update could not run if the billing database does not exist. dcache database ls now correctly lists or does not list the billing database, depending on the billingToDb property, and dcache database update will ignore billing if billingToDb=no.
Merge pull request #48 from alrossi/fix/2.2/billing_props_for_db_cmds

skel: fix billing database properties to work with dcache database comma...
(2.2) dcache: minimal backport to enable remote logging from 2.2 domains

dcache: alarms

For mixed installations where the head and door nodes may be running later versions but pool nodes are not updated from 2.2, it would still be nice for a potential alarm server to receive error or warn events from the pools.

This patch provides a minimal backport of alarm sending (actually, log event sending) capabilities.

  - IAlarms interface for certain constants that are used
  - An appender implementation which adds some properties to the MDC before sending the event
  - an alarms.properties default with only the properties used to configure the appender
  - the necessary xml for the remote appender in logback.xml

Note that this preserves the 2.6 semantics (e.g., the error/warn limitation and the property naming), not the more generalized configuration added to 2.7+.

Target: 2.2
Patch: http://rb.dcache.org/r/5564
Require-notes: yes
Require-book: yes
Acked-by: Tigran

RELEASE NOTES:
BOOK:

Version 2.2 does not contain the full alarm service capabilities (server, store and webpage); however, this patch allows all 2.2 domains to communicate with a potential alarm server by enabling the sending of log events (at the ERROR or WARN levels) to a remote server.  The following properties determine the server endpoint and the level of log events sent:

(one-of?off|error|warn)alarms.remote-logging.level=off

alarms.server.host=localhost

alarms.server.port=60001

The default for 2.2 has been set to "off", unlike later versions, where it is set to warn.
Merge pull request #49 from alrossi/feature/2.2/backport_remote_logging

(2.2) dcache: minimal backport to enable remote logging from 2.2 domains
dcache: fix billing liquibase add plpgsql changeset

module: dcache

Prior to version 8.4, postgres did not automatically contain support for plpgsql, and the language had to be explicitly added to the database.

The liquibase changeset was written to use an sqlCheck which was intended to execute the sql statement and ignore the warning that the language was already present.  For 8.4+ this worked fine, but on an actual 8.3 installation, the sql would not execute because sqlCheck required a return value and was getting none (what is shown in the interpreter after the statement is executed evidently is not a return value).  Hence the changeset fails entirely there.  Another disadvantage of this was the fact that the successful completion (where the warning is skipped) looked like an error and was confusing (see the ticket reported below).

Our approach here is to modify the original changeset by substituting for it two new ones with new ids which will behave correctly.  The absence of the old changeset from the changelog does not cause problems -- the entry for just continues to occupy a dead row in the databasechangelog table.

Target: master
Patch: http://rb.dcache.org/r/5572
Require-notes: no
Require-book: no
Request: 2.6
Request: 2.2
Ticket: http://rt.dcache.org/Ticket/Display.html?id=7809
Acked-by: Tigran

Ran the new changeset successfully over a previous installation without errors or warnings.
Merge pull request #52 from alrossi/fix/2.2/fix_plpsql_changeset

dcache: fix billing liquibase add plpgsql changeset