From 9da3ff744afc35ab9f54353e9ac68eab121d5470 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Jan 22 2021 12:12:32 +0000 Subject: Low: libstonithd: improve filtering of Pacemaker-handled parameters Previously, when creating arguments to pass to fence agents, we would filter out parameters whose name contained the substring "pcmk_" anywhere. Now, use the new API call to filter out only the parameters interpreted directly by Pacemaker. --- diff --git a/lib/fencing/st_client.c b/lib/fencing/st_client.c index 034952b..a398d28 100644 --- a/lib/fencing/st_client.c +++ b/lib/fencing/st_client.c @@ -462,9 +462,11 @@ append_config_arg(gpointer key, gpointer value, gpointer user_data) { /* The fencer will filter "action" out when it registers the device, * but ignore it here in case any external API users don't. + * + * Also filter out parameters handled directly by Pacemaker. */ if (!pcmk__str_eq(key, STONITH_ATTR_ACTION_OP, pcmk__str_casei) - && (strstr(key, "pcmk_") == NULL) + && !pcmk_stonith_param(key) && (strstr(key, CRM_META) == NULL) && !pcmk__str_eq(key, "crm_feature_set", pcmk__str_casei)) {