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

Alain St-Denis alain.st-denis at ec.gc.ca
Fri Jul 10 14:09:11 UTC 2009


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.

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




More information about the Pacemaker mailing list