On 11/06/2013, at 8:57 PM, Vladislav Bogdanov <bub...@hoster-ok.com> wrote:
> 11.06.2013 13:26, Andrew Beekhof wrote: >> This shouldn't be needed because of: >> >> https://github.com/beekhof/pacemaker/commit/d13dc296 > > Still have that with 8807e990c7caec633eaf2480d963365225100d66, so that > doesn't work. Interesting. I ended up going with: commit e3493c985ef54e5690ca092ecbd335c7bde181bb Author: Andrew Beekhof <and...@beekhof.net> Date: Wed Jun 12 08:58:52 2013 +1000 Fix: crm_resource: Avoid whitespace in transition keys when cleaning up and failing resources diff --git a/tools/crm_resource.c b/tools/crm_resource.c index 2aef08b..16ac9fe 100644 --- a/tools/crm_resource.c +++ b/tools/crm_resource.c @@ -669,7 +669,7 @@ send_lrm_rsc_op(crm_ipc_t * crmd_channel, const char *op, } } - key = generate_transition_key(0, getpid(), 0, __FILE__); + key = generate_transition_key(0, getpid(), 0, "xxxxxxxx-xrsc-opxx-xcrm-resourcexxxx"); msg_data = create_xml_node(NULL, XML_GRAPH_TAG_RSC_OP); crm_xml_add(msg_data, XML_ATTR_TRANSITION_KEY, key); > Probably "%-*s" should be replaced with "%*s"? "-" is a > left adjustment. Also, sscanf() is tricky to use with space-containing > strings. I usually avoid such usage. > >> >> On 10/06/2013, at 9:46 PM, Vladislav Bogdanov <bub...@hoster-ok.com> wrote: >> >>> This should make "warning: > : Bad UUID (crm_resource.c) in sscanf result (4) for > 31980:0:0:crm_resource.c" >>> go away. >>> >>> --- >>> tools/crm_resource.c | 4 +++- >>> 1 files changed, 3 insertions(+), 1 deletions(-) >>> >>> diff --git a/tools/crm_resource.c b/tools/crm_resource.c >>> index 2aef08b..0fbae4d 100644 >>> --- a/tools/crm_resource.c >>> +++ b/tools/crm_resource.c >>> @@ -42,6 +42,8 @@ >>> #include <crm/pengine/rules.h> >>> #include <crm/pengine/status.h> >>> >>> +# define FAKE_TE_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" >>> + >>> bool scope_master = FALSE; >>> gboolean do_force = FALSE; >>> gboolean BE_QUIET = FALSE; >>> @@ -669,7 +671,7 @@ send_lrm_rsc_op(crm_ipc_t * crmd_channel, const char >>> *op, >>> } >>> } >>> >>> - key = generate_transition_key(0, getpid(), 0, __FILE__); >>> + key = generate_transition_key(0, getpid(), 0, FAKE_TE_ID); >>> >>> msg_data = create_xml_node(NULL, XML_GRAPH_TAG_RSC_OP); >>> crm_xml_add(msg_data, XML_ATTR_TRANSITION_KEY, key); >>> -- >>> 1.7.1 >>> >>> _______________________________________________ >>> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org >>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker >>> >>> Project Home: http://www.clusterlabs.org >>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf >>> Bugs: http://bugs.clusterlabs.org >> >> >> _______________________________________________ >> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org >> http://oss.clusterlabs.org/mailman/listinfo/pacemaker >> >> Project Home: http://www.clusterlabs.org >> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf >> Bugs: http://bugs.clusterlabs.org >> > > > _______________________________________________ > Pacemaker mailing list: Pacemaker@oss.clusterlabs.org > http://oss.clusterlabs.org/mailman/listinfo/pacemaker > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org