Added tests for cases when:
0 - there is no config file at all
0a - config file has no domains defined
9a - spare is in global domain
15 - spare is in global domain for $platform metadata
Test 4 pass condition changed for imsm metadata.
disk_policy only adds controller domain for imsm
when config_rules_has_path=1.
If there are any domains in config then every disk will have also
a controller domain.
As a result the array needing spares has at least
one controller domain even when it doesn't have any other
domains specified explicitly. In this case any spare in the same
controller domain matches when it has no other domains from config.
(This behaviour is different from the case when there is no paths
in config at all as array domain then is null and no spare matches)
Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Test 9: We do not block spare migration between different metadatas.
test 13: Migrated spare must belong the same domain as destination -
there is no additional condition for action.
Signed-off-by: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This is a series of tests checking if mdadm Monitor migrates spares
according to rules in /etc/mdadm.conf defined by POLICY lines.
Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>