[Pacemaker] possible regex error in "pcs resource enable/disable"

Bob Haxo bhaxo at sgi.com
Thu Feb 20 23:25:20 UTC 2014


Andrew,

>From my vantage point, it will be most unfortunate if pcs and crm cannot
both be used for routine start and stop of resources, and other routine
tasks.

I am using pcs (almost exclusively) for my RHEL6.5 Pacemaker port.

But, I am **REALLY** hoping that I can present a relatively consistent
crmsh interface to the consumers of my HA work (customers, in-house
engineers) with RHEL and SLES installations. At least the in-house
engineers find the HA very confusing. This sort of a break will make it
impossible to ship with crmsh, thus continuing the confusion of two
distro specific interfaces.

Regards,
Bob Haxo


On Fri, 2014-02-21 at 09:26 +1100, Andrew Beekhof wrote:
> On 21 Feb 2014, at 4:30 am, Bob Haxo <bhaxo at sgi.com> wrote:
> 
> > Andrew, Lars,
> > 
> > Yes, I have determined that this error is the result of mixing crmsh 
> stop/start with pcs disable/enable (or maybe pcs stop/start mis-usage) commands. 
> 
> Specifically it will be when you use pcs first and crmsh afterwards.
> I just checked, pcs (which uses crm_resource) does the right thing if 
> either one exists (ie. doesn't create a second entry), but necessarily 
> bails out if both do.
> 
> (libvirtd-clone-meta_attributes is the one created by crm_resource/pcs)
> 
> > 
> > I've started to respond with how this happens, but have been pulled 
> off to a higher priority task.  Back when I have the resolved.
> > 
> > Bob Haxo
> > 
> > 
> > 
> > 
> > 
> > On Thu, 2014-02-20 at 07:56 -0800, Bob Haxo wrote:
> >> Andrew,
> >> 
> >> 
> >> 
> >> I think that this is what you identified:
> >> 
> >> 
> >> 
> >> This error appears to be related to the two instances of <meta_attributes> with 
> >> libvirtd-clone, both which contain a name="target-role" value="Stopped".  
> >> Deleted one of these entries and the error did not occur.
> >> 
> >> 
> >> 
> >>      <clone id="libvirtd-clone">
> >>         <primitive class="lsb" id="libvirtd" type="libvirtd">
> >>           <operations>
> >>             <op id="libvirtd-monitor-interval-15" interval="15" name="monitor" start-delay="15" timeout="15"/>
> >>             <op id="libvirtd-start-interval-0" interval="0" name="start" on-fail="restart" timeout="15"/>
> >>             <op id="libvirtd-stop-interval-0" interval="0" name="stop" on-fail="ignore" timeout="15"/>
> >>           </operations>
> >>           <meta_attributes id="libvirtd-meta_attributes"/>
> >>         </primitive>
> >>         <meta_attributes id="libvirtd-clone-meta">
> >>           <nvpair id="libvirtd-interleave" name="interleave" value="true"/>
> >>           <nvpair id="libvirtd-ordered" name="ordered" value="true"/>
> >>           <nvpair id="libvirtd-clone-meta-target-role" name="target-role" value="Stopped"/>
> >>         </meta_attributes>
> >>         <meta_attributes id="libvirtd-clone-meta_attributes">
> >>           <nvpair id="libvirtd-clone-meta_attributes-target-role" name="target-role" value="Stopped"/>
> >>         </meta_attributes>
> >>       </clone>
> >> 
> >> 
> >> 
> >> I do occasionally use a crmsh command, mostly the "crm resource cleanup <resource>" ...
> >> the pcs version of this seems to never cleanup the remote system entries.  I classify
> >> this as a bug that I have not reported.
> >> 
> >> 
> >> 
> >> So, yes, how the duplicate entry got there is probably the crux of the issue.  And
> >> I have no answer.  I have not used crmsh to create resources (the creates are 
> >> scripted using pcs cmds).  Perhaps I used a "crm stop"  rather than a "pcs disable".
> >> 
> >> 
> >> 
> >> Regardless, even if RH is not going to support crmsh, at least RH needs to be sensitive
> >> to the use of crmsh with their PCS Pacemaker implementation.
> >> 
> >> 
> >> 
> >> I'll test/investigate the "crm stop" and see whether this creates the additional entry.
> >> 
> >> 
> >> 
> >> Cheers,
> >> Bob Haxo
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> On Thu, 2014-02-20 at 10:12 +1100, Andrew Beekhof wrote:
> >> > Have you been mixing pcs and crmsh again? :-)
> >> > The interesting part is how the dup got in there in the first place.
> >> > 
> >> > Can you remove both settings and try to recreate that step?
> >> > 
> >> > On 20 Feb 2014, at 9:39 am, Bob Haxo <bhaxo at sgi.com> wrote:
> >> > 
> >> > > Chris, was easy to duplicate ... I thought that I had cleared 
> >> > > the error, but that had not happened.
> >> > > 
> >> > > Bob Haxo
> >> > > 
> >> > > [root at mici-admin ~]# pcs resource disable virt
> >> > > [root at mici-admin ~]# pcs resource disable libvirtd-clone
> >> > > Error: Error performing operation: Invalid argument
> >> > > Multiple attributes match name=target-role
> >> > >  Value: Started        (id=libvirtd-clone-meta-target-role)
> >> > >  Value: Started        (id=libvirtd-clone-meta_attributes-target-role)
> >> > > 
> >> > > [root at mici-admin ~]# pcs --debug resource disable libvirtd-clone
> >> > > Running: /usr/sbin/crm_resource -r libvirtd-clone -m -p target-role -v Stopped
> >> > > Return Value: 22
> >> > > --Debug Output Start--
> >> > > Error performing operation: Invalid argument
> >> > > Multiple attributes match name=target-role
> >> > >  Value: Started        (id=libvirtd-clone-meta-target-role)
> >> > >  Value: Started        (id=libvirtd-clone-meta_attributes-target-role)
> >> > > 
> >> > > --Debug Output End--
> >> > > 
> >> > > Error: Error performing operation: Invalid argument
> >> > > Multiple attributes match name=target-role
> >> > >  Value: Started        (id=libvirtd-clone-meta-target-role)
> >> > >  Value: Started        (id=libvirtd-clone-meta_attributes-target-role)
> >> > > 
> >> > > [root at mici-admin ~]# pcs resource disable libvirtd-clone
> >> > > Error: Error performing operation: Invalid argument
> >> > > Multiple attributes match name=target-role
> >> > >  Value: Started        (id=libvirtd-clone-meta-target-role)
> >> > >  Value: Started        (id=libvirtd-clone-meta_attributes-target-role)
> >> > > 
> >> > > 
> >> > > On Wed, 2014-02-19 at 15:23 -0600, Chris Feist wrote:
> >> > >> On 02/19/2014 11:16 AM, Bob Haxo wrote:
> >> > >>> Encountered this error with pcs but not with crm.  Looks like a regex
> >> > >>> error, with the existing regex grabbing all strings starting with the
> >> > >>> string "libvirtd-clone" ...
> >> > >>> 
> >> > >>> 
> >> > >>> [root at mici-admin2 ~]# pcs resource disable libvirtd-clone
> >> > >>> Error: Error performing operation: Invalid argument
> >> > >>> Multiple attributes match name=target-role
> >> > >>>   Value: Started        (id=libvirtd-clone-meta-target-role)
> >> > >>>   Value: Started        (id=libvirtd-clone-meta_attributes-target-role)
> >> > >>> 
> >> > >>> [root at mici-admin ~]# crm resource stop libvirtd-clone
> >> > >>> 
> >> > >>> <<no error, success>>
> >> > >>> 
> >> > >>> [root at mici-admin ~]# pcs resource enable libvirtd-clone
> >> > >>> Error: Error performing operation: Invalid argument
> >> > >>> Multiple attributes match name=target-role
> >> > >>>   Value: Stopped        (id=libvirtd-clone-meta-target-role)
> >> > >>>   Value: Stopped        (id=libvirtd-clone-meta_attributes-target-role)
> >> > >>> 
> >> > >>> xml:
> >> > >>>       <clone id="libvirtd-clone">
> >> > >>>         <meta_attributes id="libvirtd-clone-meta">
> >> > >>>           <nvpair id="libvirtd-clone-meta-target-role" name="target-role" value="Stopped"/>
> >> > >>>         <meta_attributes id="libvirtd-clone-meta_attributes">
> >> > >>>           <nvpair id="libvirtd-clone-meta_attributes-target-role" name="target-role" value="Stopped"/>
> >> > >>> 
> >> > >>> Regards,
> >> > >>> Bob Haxo
> >> > >> 
> >> > >> Can you send the output of the following command:
> >> > >> pcs --debug resource disable libvirtd-clone
> >> > >> 
> >> > >> Thanks,
> >> > >> Chris
> >> > >>> 
> >> > >>> 
> >> > >>> _______________________________________________
> >> > >>> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> >> > >>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >> > >>> 
> >> > >>> Project Home: http://www.clusterlabs.org
> >> > >>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> >> > >>> Bugs: http://bugs.clusterlabs.org
> >> > >>> 
> >> > >> 
> >> > > 
> >> > > 
> >> > > _______________________________________________
> >> > > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> >> > > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >> > > 
> >> > > Project Home: http://www.clusterlabs.org
> >> > > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> >> > > Bugs: http://bugs.clusterlabs.org
> >> > 
> >> > _______________________________________________
> >> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> >> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >> > 
> >> > Project Home: http://www.clusterlabs.org
> >> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> >> > Bugs: http://bugs.clusterlabs.org
> >> 
> >> 
> >> 
> >> 
> >> _______________________________________________
> >> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> >> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >> 
> >> 
> >> 
> >> 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 Pacemaker mailing list