[Pacemaker] Is there any character which must not be used for an attribute name?

Andrew Beekhof andrew at beekhof.net
Mon Jun 17 23:16:44 EDT 2013


On 18/06/2013, at 11:42 AM, yusuke iida <yusk.iida at gmail.com> wrote:

> Hi, Andrew
> 
> I used libqb which installed from source.
> A version is tag:v0.14.4.
> 
> I read the code of Pacemaker.
> "default_ping_set(1)" is connected with "CRM_meta_" and becomes
> "CRM_meta_default_ping_set(1)".
> It had failed, when it was passed to xmlCtxtReadDoc().
> 
> Jun  5 14:43:13 vm1 crmd[22669]:    error: crm_xml_err: XML Error:
> Entity: line 1: parser error : Specification mandate value for
> attribute CRM_meta_default_ping_set
> Jun  5 14:43:13 vm1 crmd[22669]:    error: crm_xml_err: XML Error: 2"
> on_node="vm2" on_node_uuid="3232261508"><attributes
> CRM_meta_default_ping_set
> Jun  5 14:43:13 vm1 crmd[22669]:    error: crm_xml_err: XML Error:
> 
>    ^
> Jun  5 14:43:13 vm1 crmd[22669]:    error: crm_xml_err: XML Error:
> Entity: line 1: parser error : attributes construct error
> Jun  5 14:43:13 vm1 crmd[22669]:    error: crm_xml_err: XML Error: 2"
> on_node="vm2" on_node_uuid="3232261508"><attributes
> CRM_meta_default_ping_set
> Jun  5 14:43:13 vm1 crmd[22669]:    error: crm_xml_err: XML Error:
> 
>    ^
> Jun  5 14:43:13 vm1 crmd[22669]:    error: crm_xml_err: XML Error:
> Entity: line 1: parser error : Couldn't find end of Start Tag
> attributes line 1
> Jun  5 14:43:13 vm1 crmd[22669]:    error: crm_xml_err: XML Error: 2"
> on_node="vm2" on_node_uuid="3232261508"><attributes
> CRM_meta_default_ping_set
> Jun  5 14:43:13 vm1 crmd[22669]:    error: crm_xml_err: XML Error:
> 
>    ^
> Jun  5 14:43:13 vm1 crmd[22669]:  warning: string2xml: Parsing failed
> (domain=1, level=3, code=73): Couldn't find end of Start Tag
> attributes line 1
> 
> This is because the "(" in the character of the attribute is not
> allowed in notation of xml.
> 
> In light of such problems, I would like to check.
> You should not use the character which is not allowed by the notation
> of xml for the attribute of a node?

Yes.
Not because it will cause a crash though, I can't think of anything that would result in that.
But the attributes end up as environment variables... so any character that can't be in the name of an environment variable should not be used in an attribute name.

Almost all symbols except _ would make sense to avoid. 

> 
> The cause by which core was made is because the outside of the range
> of a memory was referred to, when the character string beyond
> QB_LOG_MAX_LEN is passed to libqb.
> About it, it corrected below.
> https://github.com/asalkeld/libqb/commit/0532fa56ce3e19184a592c3ae9660e8e9fcc4c54
> 
> Regards,
> Yusuke
> 
> 2013/6/12 Andrew Beekhof <andrew at beekhof.net>:
>> What version of libqb is installed?
>> It doesn't appear to have been installed with yum/rpm.
>> 
>> On 05/06/2013, at 7:56 PM, yusuke iida <yusk.iida at gmail.com> wrote:
>> 
>>> Hi, Andrew
>>> 
>>> crmd took out core in the environment which I am using, and the
>>> phenomenon of stopping occurred.
>>> 
>>> Pacemaker currently used is the following.
>>> Pacemaker-1.1.10-rc3(changeset 7209c02a0e0435024a104d40e2165a18b6288dec)
>>> 
>>> If STONITH occurs in the state where "(" is attached to the attribute
>>> of the node, this problem will occur.
>>> 
>>> question:
>>> Is there any character which must not be used for an attribute name?
>>> 
>>> Regards,
>>> Yusuke
>>> --
>>> ----------------------------------------
>>> METRO SYSTEMS CO., LTD
>>> 
>>> Yusuke Iida
>>> Mail: yusk.iida at gmail.com
>>> ----------------------------------------
>>> <pcmk-Wed-05-Jun-2013.tar.bz2>_______________________________________________
>>> Pacemaker mailing list: Pacemaker at 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 at 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
> 
> 
> 
> --
> ----------------------------------------
> METRO SYSTEMS CO., LTD
> 
> Yusuke Iida
> Mail: yusk.iida at gmail.com
> ----------------------------------------
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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





More information about the Pacemaker mailing list