[Pacemaker] exit code crm_attibute
Andrey Groshev
greenx at yandex.ru
Thu Nov 21 13:33:21 UTC 2013
Hi, Andrew!
I'm trying to find the source of my problems.
This touble exist only on "--query"
I learned crm_attribute.c
IMHO, when call
rc = read_attr_delegate(the_cib, type, dest_node, set_type, set_name,
attr_id, attr_name, &read_value, TRUE, NULL);
I thick that dest_node == NULL
Since in following piece of code ignored return value.
238 if (pcmk_ok != query_node_uuid(the_cib, dest_uname, &dest_node, &is_remote_node)) {
239 fprintf(stderr, "Could not map name=%s to a UUID\n", dest_uname);
240 }
Maybe it should look like this?
238 rc = query_node_uuid(the_cib, dest_uname, &dest_node, &is_remote_node))
239 if (rc != pcmk_ok) {
239 fprintf(stderr, "Could not map name=%s to a UUID\n", dest_uname);
240 return crm_exit(rc);
241 }
19.11.2013, 16:12, "Andrey Groshev" <greenx at yandex.ru>:
> Hellow Andrew!
>
> I'm sorry, forgot about this thread, and now again came across the same problem.
> # crm_attribute --type nodes --node-uname fackename.node.org --attr-name notexistattibute --query > /dev/null; echo $?
> Could not map name=fackename.node.org to a UUID
> 0
>
> Version PCMK 1.1.11
>
> 23.09.2013, 08:23, "Andrew Beekhof" <andrew at beekhof.net>:
>
>> On 20/09/2013, at 5:53 PM, Andrey Groshev <greenx at yandex.ru> wrote:
>>> Hi again!
>>>
>>> Today again met a strange behavior.
>>> I asked for a non-existent attribute of an existing node.
>>>
>>> # crm_attribute --type nodes --node-uname exist.node.domain.com --attr-name notexistattibute --query ; echo $?
>>> Could not map name=dev-cluster2-node2.unix.tensor.ru to a UUID
>>> 0
>>>
>>> That is, to STDERR - swore, but the exit code - 0.
>> That probably shouldn't happen. Version?
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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