Newer versions of crmsh will report that a stonith resource is in maitenance by the maintenance keyword, while older versions use unmanaged instead.
This was addressed in commit b3998aaf6b23053772ad09eaa2e33964229c6fdb, but it is also causing the test script to connect twice to the cluster nodes over SSH to check first for unmanaged and then for maintenance.
Changes provided in this commit extend the function check_cluster_conf_ssh so it is able to match any or all of the keywords passed to it.
It does so by introducing a third parameter to check_cluster_conf_ssh so the function is able to match all provided keywords, or just one of them. The extra parameter informs the function whether it should do an "or" (set to false, i.e., "and", by default) and return True when any of the keywords is matched, or do an "and" and match all as it was doing before.
This commit also improves the log messages to reference both unmanaged and maintenance.
Newer versions of crmsh will report that a stonith resource is in maitenance by the
maintenance
keyword, while older versions useunmanaged
instead.This was addressed in commit b3998aaf6b23053772ad09eaa2e33964229c6fdb, but it is also causing the test script to connect twice to the cluster nodes over SSH to check first for
unmanaged
and then formaintenance
.Changes provided in this commit extend the function
check_cluster_conf_ssh
so it is able to match any or all of the keywords passed to it.It does so by introducing a third parameter to
check_cluster_conf_ssh
so the function is able to match all provided keywords, or just one of them. The extra parameter informs the function whether it should do an "or" (set to false, i.e., "and", by default) and return True when any of the keywords is matched, or do an "and" and match all as it was doing before.This commit also improves the log messages to reference both unmanaged and maintenance.