[Pacemaker] Patch for bugzilla 2541: Shell should warn if parameter uniqueness is violated

Holger Teutsch holger.teutsch at web.de
Tue Mar 8 03:15:01 EST 2011


On Fri, 2011-03-04 at 13:06 +0100, Holger Teutsch wrote:
> On Thu, 2011-03-03 at 10:55 +0100, Florian Haas wrote:
> > On 2011-03-03 10:43, Holger Teutsch wrote:
> > > Hi,
> > > I submit a patch for
> > > "bugzilla 2541: Shell should warn if parameter uniqueness is violated"
> > > for discussion.
> > 
> > I'll leave it do Dejan to review the code, but I love the functionality.
> > Thanks a lot for tackling this. My only suggestion for an improvement is
> > to make the warning message a bit more terse, as in:
> > 
> > WARNING: Resources ip1a, ip1b violate uniqueness for parameter "ip":
> > "1.2.3.4"
> > 
> 
> Florian,
> I see your point. Although my formatting allows for an unlimited number
> of collisions ( 8-) ) in real life we will only have 2 or 3. Will change
> this together with Dejan's hints.
> 
> > Cheers,
> > Florian
> > 
Florian + Dejan,
here the version with terse output. The code got terser as well.
- holger

crm(live)configure# primitive ip1a ocf:heartbeat:IPaddr2 params ip="1.2.3.4" meta target-role="stopped"
crm(live)configure# primitive ip1b ocf:heartbeat:IPaddr2 params ip="1.2.3.4" meta target-role="stopped"
crm(live)configure# primitive ip2a ocf:heartbeat:IPaddr2 params ip="1.2.3.5" meta target-role="stopped"
crm(live)configure# primitive ip2b ocf:heartbeat:IPaddr2 params ip="1.2.3.5" meta target-role="stopped"
crm(live)configure# primitive ip3 ocf:heartbeat:IPaddr2 params ip="1.2.3.6" meta target-role="stopped"
crm(live)configure# primitive dummy_1 ocf:heartbeat:Dummy params fake="abc" meta target-role="stopped"
crm(live)configure# primitive dummy_2 ocf:heartbeat:Dummy params fake="abc" meta target-role="stopped"
crm(live)configure# primitive dummy_3 ocf:heartbeat:Dummy meta target-role="stopped"
crm(live)configure# commit
WARNING: Resources ip1a,ip1b violate uniqueness for parameter "ip": "1.2.3.4"
WARNING: Resources ip2a,ip2b violate uniqueness for parameter "ip": "1.2.3.5"
Do you still want to commit? 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: shell.diff
Type: text/x-patch
Size: 2683 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110308/e575a200/attachment-0003.bin>


More information about the Pacemaker mailing list