Hi Lars,
On Wed, Jul 03, 2013 at 12:05:17PM +0200, Lars Marowsky-Bree wrote:
> On 2013-07-03T10:26:09, Dejan Muhamedagic <[email protected]> wrote:
>
> > > Not sure that is expected by most people.
> > > How you then delete attributes?
> > Tough call :) Ideas welcome.
>
> Set them to an empty string, or a magic "#undef" value.
>
> > It's not only for the nodes. Attributes of resources should be
> > merged as well. Perhaps to introduce another load method, say
> > merge, which would merge attributes of elements instead of
> > replacing them. Though the use would then get more complex (which
> > seems to be justified here).
>
> Well, that leaves open the question of how higher-level objects
> (primitives, clones, groups, constraints ...) would be affected/deleted.
>
> I'm not sure the complexity is really worth it. Merge rules get *really*
> complex, quickly. And eventually, one ends with the need to annotate the
> input with how one wants a merge to be resolved (such as "#undef"
> values).
Perhaps I misunderstood the original intention, but the idea was
more simple:
primitive r1 params p1="v1" p2="v2" meta m1="mv1"
primitive r1 params p1="nv1" p3="v3" <- merge
---
primitive r1 params p1="nv1" p2="v2" p3="v3" meta m1="mv1"
If the attribute already exists, then it is overwritten. The
existing attributes are otherwise left intact. New attributes are
added.
Thanks,
Dejan
> Then, one might go the easier way of having the caller tell us what they
> want changed explicitly, instead of having to figure it out ourselves.
> The whole "I'll magically replace the whole configuration and crmsh will
> figure it out" premise seems broken.
>
> Regards,
> Lars
>
> --
> Architect Storage/HA
> SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer,
> HRB 21284 (AG Nürnberg)
> "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
>
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems