Hi Dejan,
thank you for spending your time. To your question: Sorry, but it was not intended to have two meta-attributes sections. I just overlooked it even after looking at the config snippet for many time. The reason for that was, that I assumed (yes, yes, IT and assumptions, two things which don't get together well) crm will aggregate several 'meta' commands to one meta-attributes section. This assumption is wrong as I have learned now. It also didn't come to awareness as 'crm resource start' and 'crm resource stop' seem to work as expected. They just put a <nvpair name="target-role" value="Started" id="blabla"/> to all meta-attribute-sections. Besides me being wrong, this part of the behaviour of crm seems not totally ok for me. The initial loading of the config inserted one line <nvpair name="target-role" value="Started" id="blabla"/> into the cib whereas "start" and "stop" insert this line in any meta-attributes section. Arguing that crm shall hide the cib innards and shall hinder the user inserting crap I would expect something different. I'm not sure what I would expect because I don't know which seems valid vor the cib, pacemaker and commandline tools: a) When pacemaker and all other commandline tool can live nicely with multiple meta-attributes sections (it seems to be allowed by the xml definition) and address all nvpairs just by name beneath this tag, than crm should insert or change only one instance of that nvpair. Demoting via crm_resource should have worked with this, shouldn't it? b) When the duplication of the meta-attriutes section by itself is problematic I would expect crm refusing or at least warning about that construct. What do you think? Best regards Andreas Mock -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Dejan Muhamedagic Gesendet: Montag, 9. September 2013 13:26 An: 'General Linux-HA mailing list' Betreff: Re: [Linux-HA] Problem with crm 1.2.6 rc 3 and older Hi Andreas, On Fri, Sep 06, 2013 at 02:20:55PM +0200, Andreas Mock wrote: > Hi all, hi Kristoffer, hi Dejan, > > I do have the following problem with crm 1.2.6 rc3 and older > in the context of ms resources. > > When I declare the following config: > > primitive r_drbd_fodb ocf:linbit:drbd \ > params drbd_resource="fodb" drbdconf="/usr/local/etc/drbd.conf" \ > op monitor interval="15s" timeout="120s" role="Master" \ > op monitor interval="45s" timeout="120s" role="Slave" \ > op start timeout="240" \ > op stop timeout="240" > ms ms_drbd_fodb r_drbd_fodb \ > meta master-max="1" master-node-max="1" \ > clone-max="2" clone-node-max="1" \ > notify="true" \ > meta target-role="Stopped" migration-threshold="2" > > then two meta-attributes sections are inserted into the cib: Is this what you really intented, i.e. to have two meta attributes sets? Or was it accidental? > <meta_attributes id="ms_drbd_fodb-meta_attributes"> > <nvpair name="master-max" value="1" > id="ms_drbd_fodb-meta_attributes-master-max"/> > <nvpair name="master-node-max" value="1" > id="ms_drbd_fodb-meta_attributes-master-node-max"/> > <nvpair name="clone-max" value="2" > id="ms_drbd_fodb-meta_attributes-clone-max"/> > <nvpair name="clone-node-max" value="1" > id="ms_drbd_fodb-meta_attributes-clone-node-max"/> > <nvpair name="notify" value="true" > id="ms_drbd_fodb-meta_attributes-notify"/> > </meta_attributes> > <meta_attributes id="ms_drbd_fodb-meta_attributes-0"> > <nvpair name="target-role" value="Stopped" > id="ms_drbd_fodb-meta_attributes-0-target-role"/> > <nvpair name="migration-threshold" value="2" > id="ms_drbd_fodb-meta_attributes-0-migration-threshold"/> > </meta_attributes> > > You can see one <nvpair name="target-role"/>. > > After a 'crm resource start ms_drbd_fodb' you see the following: > > <meta_attributes id="ms_drbd_fodb-meta_attributes"> > <nvpair name="master-max" value="1" > id="ms_drbd_fodb-meta_attributes-master-max"/> > <nvpair name="master-node-max" value="1" > id="ms_drbd_fodb-meta_attributes-master-node-max"/> > <nvpair name="clone-max" value="2" > id="ms_drbd_fodb-meta_attributes-clone-max"/> > <nvpair name="clone-node-max" value="1" > id="ms_drbd_fodb-meta_attributes-clone-node-max"/> > <nvpair name="notify" value="true" > id="ms_drbd_fodb-meta_attributes-notify"/> > <nvpair id="ms_drbd_fodb-meta_attributes-target-role" > name="target-role" value="Started"/> > </meta_attributes> > <meta_attributes id="ms_drbd_fodb-meta_attributes-0"> > <nvpair name="target-role" value="Started" > id="ms_drbd_fodb-meta_attributes-0-target-role"/> > <nvpair name="migration-threshold" value="2" > id="ms_drbd_fodb-meta_attributes-0-migration-threshold"/> > </meta_attributes> > > HAAAAA: Now you have two entries name="target-role". > As long as I use a 'crm resource stop ms_drbd_fodb' it's no (?) problem as > you get the follwing: > > <meta_attributes id="ms_drbd_fodb-meta_attributes"> > <nvpair name="master-max" value="1" > id="ms_drbd_fodb-meta_attributes-master-max"/> > <nvpair name="master-node-max" value="1" > id="ms_drbd_fodb-meta_attributes-master-node-max"/> > <nvpair name="clone-max" value="2" > id="ms_drbd_fodb-meta_attributes-clone-max"/> > <nvpair name="clone-node-max" value="1" > id="ms_drbd_fodb-meta_attributes-clone-node-max"/> > <nvpair name="notify" value="true" > id="ms_drbd_fodb-meta_attributes-notify"/> > <nvpair id="ms_drbd_fodb-meta_attributes-target-role" > name="target-role" value="Stopped"/> > </meta_attributes> > <meta_attributes id="ms_drbd_fodb-meta_attributes-0"> > <nvpair name="target-role" value="Stopped" > id="ms_drbd_fodb-meta_attributes-0-target-role"/> > <nvpair name="migration-threshold" value="2" > id="ms_drbd_fodb-meta_attributes-0-migration-threshold"/> > </meta_attributes> > > You see, both incarnations are set to "Stopped". > > Now the bug "BUT": > > When I try a 'crm resource demote ms_drbd_fodb' insted of the stop, I get > the following: > > Multiple attributes match name=target-role > Value: Started (id=ms_drbd_fodb-meta_attributes-target-role) > Value: Started (id=ms_drbd_fodb-meta_attributes-0-target-role) > Error performing operation: Invalid argument > > what is definitely correct as shown by the cib-excerpt. > > So, I'm not sure whether the initial duplication is the problem or the > behaviour > in the demote case. Resource start/stop/manage/unmanage are handled by crmsh internally (because of possible children/parent relations; see crm options help manage-children), whereas for resource promote/demote crmsh invokes crm_resource. That's why the behaviour is different, that is crm_resource cannot handle multiple attributes sets. I guess that the two meta attributes sets should have been only one in the first place. Otherwise, I'm not quite sure how is this to be handled. Thanks, Dejan > Thank you in advance. > > Best regards > Andreas Mock > > > > _______________________________________________ > Linux-HA mailing list > <mailto:[email protected]> [email protected] > <http://lists.linux-ha.org/mailman/listinfo/linux-ha> http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: <http://linux-ha.org/ReportingProblems> http://linux-ha.org/ReportingProblems _______________________________________________ Linux-HA mailing list <mailto:[email protected]> [email protected] <http://lists.linux-ha.org/mailman/listinfo/linux-ha> http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: <http://linux-ha.org/ReportingProblems> 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
