File pacemaker-regular-expression-for-fail-counts-crm_resource.patch of Package pacemaker.14737

commit 60b3ee4f6d0b8eff543c4152246ed9486a39c4df
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Mon Jan 16 16:42:08 2017 -0600

    Low: tools: use correct regular expression for fail counts in crm_resource
    
    The previous pattern, "fail-count-*", would (unintentionally) match an
    attribute containing "fail-count" anywhere in its name. The new pattern,
    "^fail-count-", matches only attributes starting with "fail-count-".

diff --git a/tools/crm_resource.c b/tools/crm_resource.c
index 6cb71bf07..4fde33ece 100644
--- a/tools/crm_resource.c
+++ b/tools/crm_resource.c
@@ -992,8 +992,9 @@ main(int argc, char **argv)
 
         crm_debug("Re-checking the state of all resources on %s", host_uname?host_uname:"all nodes");
 
-        rc = attrd_update_delegate(
-            NULL, 'u', host_uname, "fail-count-*", NULL, XML_CIB_TAG_STATUS, NULL, NULL, NULL, attrd_opt_none);
+        rc = attrd_update_delegate(NULL, 'u', host_uname, "^fail-count-", NULL,
+                                   XML_CIB_TAG_STATUS, NULL, NULL, NULL,
+                                   attrd_opt_none);
 
         if (crm_ipc_send(crmd_channel, cmd, 0, 0, NULL) > 0) {
             start_mainloop();
openSUSE Build Service is sponsored by