clustershell
clustershell copied to clipboard
topology.conf parser error when using extended patterns
[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""
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.
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'