When killing a job for timeout, check if a report exist before writing the fake-one
Remove Autoincrement check for MySQL

From the MySQL documentation:

```
InnoDB uses the following algorithm to initialize the auto-increment counter for a table t that contains an AUTO_INCREMENT column named ai_col: After a server startup, for the first insert into a table t, InnoDB executes the equivalent of this statement:

SELECT MAX(ai_col) FROM t FOR UPDATE;
InnoDB increments the value retrieved by the statement and assigns it to the column and to the auto-increment counter for the table. By default, the value is incremented by one.
...
If the table is empty, InnoDB uses the value 1.
```

In case of a server restart we have security that the auto-increment will be preserved to the max job_id present, the only case where removing this check might cause problems
is if the most recent workflow was deleted and so the index in wmbs_job is lower than before and then you restart MySQL before the TaskArchiver/CleanUpPoller cleans couch. To account for this, this patch adds support in CMSCouch to specify a callback function on conflicts during a commit or queue of documents. For the ChangeState, job and fwjr jobs document are overwritten when a conflict occurs without generating conflicts (i.e. not using all_of_nothing).

The benefit of this change is avoiding errors when the JobCreator is restarted after a couch crash.

Fixes #4005
Implement checksums in LCGImpl backend module

Add support for verifying the adler32 checksum when available
through the lcg-ls -l command. Also add general support
for passing the locally calculated checksums of the files
to the StageOutImpl objects, this will enable the checksum
verification in the rfcp-CERN backend plugin as well.

For the LCGImpl plugin the checksum is obtained as follows:

echo "$LCG_OUTPUT" | sed -nr 's/^.*\s([a-f0-9]{8})\s*\([aA][dD][lL][eE][rR]32\)\s*$/\\1/p'

Where LCG_OUTPUT=`lcg-ls -l -b -D srmv2 <SURL> 2>/dev/null`

The expected format of LCG_OUTPUT is a multi-line string where one of the lines has the following format:

* Checksum: <8-hex character string> (ADLER32)

Or

* Checksum: <8-hex character string> (adler32)

If this line is not present then it is assumed that the checksum is not supported and the check is skipped,
but if a checksum is present then it will be compared and will fail with exit code 63011 if it doesn't match.
Error code is the same as for size mismatch.

Fixes #4185
remove workloadsummary installation from reqmgr and move to reqmon
Make component sleeping configurable

Factor out the sleeping part of the component of the component harness.
In some cases, simply sleeping isn't the best idea, this change makes it
so subclasses of BaseWorkerThread can choose how they sleep.
Check that files contains at least one good lumi before adding them to WWMBS. Fixes #4267
Repair resource control interface

It was blowing on Oracle, MySQL didn't complain but
it wasn't doing the right thing
Merge pull request #4277 from dballesteros7/fixResourceControl-binds

Repair resource control interface
Merge pull request #4147 from dballesteros7/job-creator-mysql

Remove Autoincrement check for MySQL
add output dataset
Allow nullauth for WorkloadSummary in local couch

Check for null auth and allow it,
also allow the update of existing documents
this is to provide support for multiple agents
and eventually cleanup. The TaskArchiver already takes care
of not doing funny stuff and uploading stuff twice
unless it's necessary.
Merge pull request #4279 from ticoann/add_output_datasets

add output dataset
Minor bugfix for the resource control script

The update threshold option had the pending and running
slots for a task swapped.
Remove restriction of autoapprove on custodial

Removing an unnecessary restriction I added that prevented
custodial subscriptions from being auto approve as well.
The Tier-0 needs it since we auto approve the custodial
subscriptions to CERN.
Adds a real LogCollect fwjr to the TaskArchiver test and changes to support it better. Changes in the summary document. fixes #4214
ConfigCacheUrl, extented reqmgr.py Ops script

* ConfigCacheUrl implemented for all worklflows types (allows to load
  ConfigCache document from an arbitrary CouchDB server, not necessarily
  the one coupled with ReqMgr (whose URL ReqMgr passes in CouchURL
  argument)).
  ConfigCacheUrl, if specified, overrides CouchURL. Is backwards compatible,
  if not specified, CouchURL is used as before. reqmgr.py Ops ReqMgr client
  script enhanced - more workflows template arguments defined
  (test/data/ReqMgr/requests)
  Fixes #4269

* Ops ReqMgr client script allows to create and assign requests in one go or
  separately. Approve is always coupled with create. If necessary can be
  separated too, however, if create succeeds, approve must too. Unfortunately,
  assignment lacks REST API so the client talks to a webpage.
  Ideally (for ReqMgr2), REST API shall support all possible status
  transitions, this will then be more easily exposed to reqmgr.py.
  Fixes #4247

 * Add /store/hidata to the lfn base allowed in the assign page of the
   ReqMgr. Fixes 4287

 * minor reqmgr.py bugfix, template default values agreed by the Ops, tested
 * by the Ops on a private VM instance
Merge pull request #4293 from zdenekmaxa/reqmgr-ops-scrips-02-1

ConfigCacheUrl, extented reqmgr.py Ops script
Allow ConfigCacheIDs for DQM harvesting

Add the option in the ReqMgr and handle the specific tweaks
for harvesting

Fixes #4262
Merge pull request #4291 from samircury/logarchives-listing-workflowsummary

Adds PFN of logArchives@CERN per task to the summary
Allow requests to run at sites without the data

Include a flag at assignment time that
allows ops to decide if a request should run
in all CMS sites filtered by whitelist/blacklist
instead of where the data is. This assumes Ops knows
what is doing (sites have xrootd to get the data).