Merge pull request #317 from mmichal10/fix-init-script

casctl: fix matching multilevel configuration
This commit is contained in:
Daniel Madej
2020-01-30 16:09:04 +01:00
committed by GitHub

View File

@@ -44,7 +44,7 @@ def add_core_recursive(core, config):
.format(core.device, core.cache_id))
exit(3)
core.marked = True
match = re.match(r'/dev/cas(\d)-(\d).*', core.device)
match = re.match(r'/dev/cas(\d{1,5})-(\d{1,4})', core.device)
if match:
cache_id,core_id = match.groups()
with_error = add_core_recursive(config.caches[int(cache_id)].cores[int(core_id)], config)