[ClusterLabs] LXC resource agent not usable

Marc MAURICE marc.maurice at objectif-libre.com
Thu Apr 16 12:47:37 UTC 2015


Hello guy,

I tried to apply the patch on a 1.1.10 pacemaker tree (ubuntu source 
package), and the problem remains.

Am I missing something ?

I tried to compile pacemaker from scratch (1.1.13-rc2 tree), but it 
seems that pacemaker also depends on a more recent corosync version.
For now I have not the time to recompile everything, so I fell back on 
regular Ubuntu source tree.

For now the workaround I am using is renaming the parameter name in the 
resource agent :
wget -O/usr/lib/ocf/resource.d/heartbeat/lxc 
https://raw.githubusercontent.com/ClusterLabs/resource-agents/master/heartbeat/lxc
sed -i -e 's/name="container"/name="containername"/' \
  -e 's/OCF_RESKEY_container/OCF_RESKEY_containername/' \
  /usr/lib/ocf/resource.d/heartbeat/lxc


Marc MAURICE - 05 82 95 65 36
Objectif Libre  www.objectif-libre.com
Infrastructure et Formations Linux

Le 07/04/2015 05:49, Andrew Beekhof a écrit :
>> On 4 Apr 2015, at 9:59 am, Lars Ellenberg <Lars.Ellenberg at linbit.com> wrote:
>>
>> On Fri, Apr 03, 2015 at 05:39:11PM +0200, Marc MAURICE wrote:
>>> Hello all,
>>>
>>> I think I found a bug, but I don't know where to file it (pacemaker
>>> ? lxc resource agent ? crmsh ?).
>>>
>>> Or is it something with my environment?
>>>
>>> This is easy to reproduce : try to add a ocf:heartbeat:lxc resource.
>>> (Ubuntu 14.04)
>>>
>>> crm(live)configure# primitive mylxc ocf:heartbeat:lxc params
>>> container="TestMigration" config="/var/lib/lxc/TestMigration/config"
>>> crm(live)configure# verify
>>>    error: setup_container:     Resource mylxc: Unknown resource
>>> container (TestMigration)
>>> Errors found during check: config not valid
>>>
>>>
>>> I found that there is a naming conflict between the "container"
>>> parameter from the resource agent, and some pacemaker internal
>>> parameter.
>>>
>>> Something in : https://github.com/ClusterLabs/pacemaker/blob/master/lib/pengine/unpack.c
>> beekhof:
>>
>> diff --git a/lib/pengine/complex.c b/lib/pengine/complex.c
>> index fe03d44..a019de9 100644
>> --- a/lib/pengine/complex.c
>> +++ b/lib/pengine/complex.c
>> @@ -130,12 +130,6 @@ get_meta_attributes(GHashTable * meta_hash, resource_t * rsc,
>>      unpack_instance_attributes(data_set->input, rsc->xml, XML_TAG_META_SETS, node_hash,
>>                                 meta_hash, NULL, FALSE, data_set->now);
>>
>> -    /* populate from the regular attributes until the GUI can create
>> -     * meta attributes
>> -     */
>> -    unpack_instance_attributes(data_set->input, rsc->xml, XML_TAG_ATTR_SETS, node_hash,
>> -                               meta_hash, NULL, FALSE, data_set->now);
>> -
>>      /* set anything else based on the parent */
>>      if (rsc->parent != NULL) {
>>          g_hash_table_foreach(rsc->parent->meta, dup_attr, meta_hash);
>>
>>
>> I think "the GUI" can do that now...
> I see your patch and raise you https://github.com/ClusterLabs/pacemaker/commit/35e2d8f :-)
>
>>> When hacking the resource agent
>>> (/usr/lib/ocf/resource.d/heartbeat/lxc), replacing the "container"
>>> parameter name with something else : everything works fine.
>>>
>>> So : bug or not ?
>>>
>>> Thanks in advance,
>>> Marc
>> -- 
>> : Lars Ellenberg
>> : http://www.LINBIT.com | Your Way to High Availability
>> : DRBD, Linux-HA  and  Pacemaker support and consulting
>>
>> DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
>>
>> _______________________________________________
>> Users mailing list: Users at clusterlabs.org
>> http://clusterlabs.org/mailman/listinfo/users
>>
>> Project Home: http://www.clusterlabs.org
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> Bugs: http://bugs.clusterlabs.org
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
>
> 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 Users mailing list