[ClusterLabs] LXC resource agent not usable

Lars Ellenberg lars.ellenberg at linbit.com
Fri Apr 3 22:59:50 UTC 2015


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...

> 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.




More information about the Users mailing list