clustershell icon indicating copy to clipboard operation
clustershell copied to clipboard

topology.conf parser error when using extended patterns

Open thiell opened this issue 5 years ago • 2 comments

[routes]
sh-hn01: @service
@sherlock:1&@service: @sherlock:1&@compute
@sherlock:2&@service: @sherlock:2&@compute

results in:

clush: Unknown group source: "service"

Quotes don't help:

[routes]
"sh-hn01": "@service"
"@sherlock:1&@service": "@sherlock:1&@compute"
"@sherlock:2&@service": "@sherlock:2&@compute"
clush: Unknown group source: "service""

thiell avatar Sep 13 '19 16:09 thiell

Unfortunately, it is due to a limitation of ConfigParser.

https://stackoverflow.com/questions/17947319/python-configparser-with-colon-in-the-key https://bugs.python.org/issue16374

Instead of trying to hack this, I think we need to get rid of configparser and switch to a (simple) yaml file for topology.conf.

thiell avatar Sep 29 '19 05:09 thiell

A possible workaround (for now) is to define groups in the default group source that can be used as key (with NO ":") in topology.conf, something like that in the default yaml group file:

'gateways_sh1':   '@sherlock:1&@service'
'gateways_sh2':   '@sherlock:2&@service'

thiell avatar Sep 29 '19 05:09 thiell