[Pacemaker] Syntax error when using binary-op types in crm cli.

Dejan Muhamedagic dejanmm at fastmail.fm
Mon Jul 13 19:25:55 UTC 2009


Hi,

On Fri, Jul 10, 2009 at 10:09:11AM -0400, Alain St-Denis wrote:
> Hi,
> 
> Here's a quick fix (for pacemaker-1.0.4.1+hg20090606):
> 
> *** crm Wed Jul  8 14:41:46 2009
> --- /usr/sbin/crm       Fri Jul 10 14:02:21 2009
> ***************
> *** 3227,3232 ****
> --- 3227,3233 ----
>               return False
>           cli_list += l
>           i += numtoks
> +         if len(cli_list[2][1]) == 4: i -= 1
>       if len(s) < i:
>           syntax_err(s[i:],context = "location")
>           return False
> ***************
> *** 3880,3885 ****
> --- 3881,3889 ----
>       return cli_format(l,format)
>   def exp2cli(node):
>       operation = node.getAttribute("operation")
> +     type = node.getAttribute("type")
> +     if type:
> +         operation = "%s:%s" % (type, operation)
>       attribute = node.getAttribute("attribute")
>       value = node.getAttribute("value")
>       if not value:
> 
> The first one is really quick and dirty, but it does prevent the error when 
> the ['type', 'something'] element adds an extra token.

Thanks for the report and fixes. We'll have to do the dirty one
in a different way though. I completely forgot about this usage :)

Cheers,

Dejan

> Alain.
> -- 
> Alain St-Denis
> Supercomputing, Systems and Storage / Superinformatique, syst?mes et stockage,
> High Performance Computing Support / Soutien aux calculs en haute performance
> Chief Information Officer Branch / Direction G?n?rale du dirigeant principal 
> de l'information
> Environment Canada / Environnement Canada
> Tel: +1 514 421 4697
> 
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker




More information about the Pacemaker mailing list