Backup: clean all non printable caracters in backend path.

Previously, only non-ascii chars, shell special chars and spaces was cleaned.
Actually, some non-printable characters are ASCII and they must be cleaned too.

Change-Id: Iff91035003a448bf75307354c4011c53b8e19f10
Fix possible crash in db_exec_sql.

Change-Id: I4d8ec749e45de1f5b52294f8d8f1c9ef3b60b7b8
spec: make libattr-devel a Build dependency for everything Lustre

Change-Id: I42d43a4698ec4cd02cfadd3dcdbc6c87ffef409d
Signed-off-by: Thomas Leibovici <thomas.leibovici@cea.fr>
rbh-config: backup_db use option --single-transaction of mysqldump.

By default, mysqldump locks the whole tables to backup them,
which blocks any robinhood activity during the backup.
Using --single-transaction option with InnoDB avoids this wide locking
whereas the backup is still consistent.

Change-Id: I3f0bb92335dc4fe531ec74c1295a7ba8d8722529
entry_processor: improved fake mtime detection.

Report mtime in the future (mtime > now + 24h).
Improve code robustness for corrupted mtimes.

Change-Id: Ideef8167da605695e394be7280a50898ef131ad3
Benchmarking: improved id repartition and avoid faulty getstripe when
benchmarking robinhood DB ingest rate.
FS scan: improved speed statistics.

Change-Id: I5fcda1d5aaa37f2c55105cb150b7bcc3eedac1b7
ListMgr: allow specifying the MySQL DB engine.

Replaced the 'innodb = on/off' parameter with
an 'engine = <enginename>' parameter (defaults to 'InnoDB').

Change-Id: I2b1b74d29cf8286e60b537189606e3ccb7712a86
backup mode: prevent from string overflow when executing custom archive comand.

Archiving a file with name length > 1024 caused an overflow and possibly a SEGFAULT.

Change-Id: I25354be8c3615dfb911a475ab698d0c799088f71
lustre: support of layout swap with an empty layout.

Drop the stripe information in DB when a file is "unstriped".

Change-Id: I03bfca614e5ddba66b17b5dedeb4b5b365922dc7
logs: display non printable characters (eg. from file names) as '?' in the log.

Avoid issues with log parsing tools.

Change-Id: Iafc4409c46c35302dcc4ed9be57386612a7b58a5
FS scan: prevent from dropping entries from DB when opendir fails.

If opendir fails, all entries in the directory where dropped from DB
at the end of a scan, as they hadn't been updated.
For instance, this occurs when the robinhood host is evicted by the MDS,
so the client returns ESHUTDOWN for each opendir.

This patch prevents this by disabling namespace GC at the end of the scan
when such an opendir error is encountered.

Change-Id: I57001381bb6a5f409cc359a039115d9626c8abb2
entry processor: optimization to batch more requests.

Previously, the criteria for batching DB operations was having the
same operation type (insert, update...) and the same attribute mask.
Actually, requests with different attribute masks can be batched
as long as the attribute mask for each table is the same (or 0).
Thus, this allows batching operations on directories and striped files,
as the directoy has no stripe information, but its attribute mask
is the same as files for other DB tables.

Change-Id: I6015b33aa3b72405b4ba3e46fc4fdc7752928b88
fs_scan/entry_proc: handle all cases of layout change in Lustre 2.4+

Since Lustre 2.4 <non-striped> to <striped> is not the only possible
change in file striping, as it can now been changed by swap_layouts, hsm_release...
With Lustre2.4, this patch detects stripe change based on layout_gen number.
This information is stored as the "validator" field in stripe_info table.
FS scan now systematically get file stripe info in Lustre 2.4+
as it is needed to check the layout_gen.

Added tests 117a-k and 118a-c to check most of the possibles cases
with FS scan, changelogs, and rbh-diff.

Change-Id: I348df7051f30b35f60a66e407c55262c4400779b
listmgr: manage conversion of stripe validator field.

STRIPE_INFO.validator field changes from 2.5.3 to 2.5.4.
Previously it was an "INT UNSIGNED" it is now just an "INT"
as it must handle special values like "-1" for empty layout
(unfortunately, "0" is a valid layout_gen number).

The conversion automatically runs when robinhood starts.
It takes about 10sec per million of files.

Change-Id: Ieb5ac48cbb421341c93fbd95e9dd4cc5fd2ab81f
The xattr library is necessary for Lustre, and is also
useful for other filesystems, so always build Robinhood with it.

Change-Id: I5d8cf528cd0b25c55c8ab87823375e5a9e496e42
listmgr: display an estimated time to convert a DB field.

Change-Id: I0147d8374cb5edcb9c67473f68f1f35d298c744c
release 2.5.4.

Change-Id: Ic58f28241907bc52312ac022baaf034d3474c1fb
tests: add lines of context in test output.

grep 5 lines before and 1 line after the error.

Change-Id: I7197bb71bc6a58205b1f179f4ae656b445839ada