MRP-2104 tests: simulate lctl conf_param failure

This adds a test which simulates llog_init_handle() failure. Wrong
handling for the failure may cause endless umount.

Change-Id: I00383a67d9bd1bd832de9340caa43ca090c94a11
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3800
Reviewed-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2104 llog: fix error handling in record_start_log()

Have record_start_log() to call llog_close() if llog_init_handle()
fails and have all record_start_log() callers to return immediately if
it fails.

Change-Id: Id93871cc50933140276fb03ac3d1a57f15e1e6a9
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>                                                                                                                     # Please enter the commit message for your changes. Lines starting
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3801
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-767 tests: conf-sanity 71 for  dualnode configuration

Test conf-sanity 71 failed in dualnode configuration.
This patch split commands on ost and mds using do_facet.
The test is ported from master 41e89dd629e5ed4da3c65184a77138282e87c563

Change-Id: I266431a063c932150364c9f7d2ae5c3190bbaf2f
Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/252
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Reviewed-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Tested-by: Jenkins
Tested-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
MRP-2105 tests: two checks added to conf-sanity.sh:test_66

lctl conf_param does not work after lctl replace_nids.
Add check for that.
llog backup is created with wrong size and may get wrong content
after two serial calls to lctl replace_nids.
Add check for that.

Change-Id: I0b03efda165d48976e2f4484a2ab316273aa590c
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3802
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2105 mgs: Initialize uuid of llogs created by replace_nids

Initialize "Target uuid" with same data as in record_start_log().
This is backport of patch for LU-3357.

Change-Id: Iab42d66dc546cb50b291daa7caff70a89771365d
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3932
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Sergey Cheremencev <sergey_cheremencev@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2105 mgs: fix mgs_backup_llog

-read source/write target loop in mgs_backup_llog is corrected
-writes to llog file go via buffer cache and transactions
 (fsfilt_ldiskfs_write_handle), so before reading the llog file via
 page cache based file read the transactions which wrote the llog file
 are to be flushed (checkpointed, not only committed).
 fs_journal_flush operation is added to struct fsfilt_operations and
 is called before accessing a llog file via file read.

Change-Id: I71dbf6efb9c115587162da6cd0b628674551a803
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3860
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2091 mgs: remove skip records from config file

Configuration logs are append only files of limited size. In course of
time the logs may grow over the limit size. Usually, configuration
logs keep needless records marked as SKIP. The new lctl command
"clear_conf" is added to allow administartors to clear configuration
files by removing mentioned SKIP records.
lctl man page is updated.
conf-sanity test is added to test the new command.

Change-Id: Iee71234442c7e2fcc289955d11e055e2e86377a4
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/4003
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2105 test: EXCLUDE records are not to be deleted

Have conf-sanity.sh:test_66 to add EXCLUDE records to config
file. lctl replace_nids removes those records which lead to problem on
mounting.

Change-Id: I5c08644202c6781b452043fea1082bd80179b768
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Artem Blagodarenko <Artem_Blagodarenko@xyratex.com>
MRP-2105 mgs: do no skip EXCLUDE records on lctl replace_nids

Skip records marked as SKIP instead.

Change-Id: Ia7f9e522d6d94fff345b93b51240006886f543dd
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Artem Blagodarenko <Artem_Blagodarenko@xyratex.com>
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
MRP-1988 test: fix for failloc according to US

During upstream landing failloc was occupied by another
patch at Intel. This patch updates failloc number.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I41e19e1f9ae471f7ae7508c737e307e2960d41fc
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/4092
Reviewed-by: Sergey Cheremencev <sergey_cheremencev@xyratex.com>
Tested-by: Jenkins
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>