SUSE Support

Here When You Need Us

Running stage 2 fails with an exception related to a bad character range

This document (000020288) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Enterprise Storage 6

Situation

Running DeepSea stage 2 results in the following example exception:
 
Exception occurred in runner push.proposal: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/salt/client/mixins.py", line 385, in low
    data['return'] = func(*args, **kwargs)
  File "/srv/modules/runners/push.py", line 82, in proposal
    common = pillar_data.organize(filename)
  File "/srv/modules/runners/push.py", line 221, in organize
    proposal_files = _parse(self.proposals_dir + "/" + line)
  File "/srv/modules/runners/push.py", line 301, in _parse
    files = glob.glob(line)
    files = glob.glob(line)
  File "/usr/lib64/python3.6/glob.py", line 20, in glob
    return list(iglob(pathname, recursive=recursive))
  File "/usr/lib64/python3.6/glob.py", line 72, in _iglob
    for name in glob_in_dir(dirname, basename, dironly):
  File "/usr/lib64/python3.6/glob.py", line 83, in _glob1
    return fnmatch.filter(names, pattern)
  File "/usr/lib64/python3.6/fnmatch.py", line 52, in filter
    match = _compile_pattern(pat)
  File "/usr/lib64/python3.6/fnmatch.py", line 46, in _compile_pattern
    return re.compile(res).match
  File "/usr/lib64/python3.6/re.py", line 233, in compile
    return _compile(pattern, flags)
  File "/usr/lib64/python3.6/re.py", line 301, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib64/python3.6/sre_compile.py", line 562, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib64/python3.6/sre_parse.py", line 855, in parse
    p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
  File "/usr/lib64/python3.6/sre_parse.py", line 416, in _parse_sub
    not nested and not items))
  File "/usr/lib64/python3.6/sre_parse.py", line 765, in _parse
    p = _parse_sub(source, state, sub_verbose, nested + 1)
  File "/usr/lib64/python3.6/sre_parse.py", line 416, in _parse_sub
    not nested and not items))
  File "/usr/lib64/python3.6/sre_parse.py", line 553, in _parse
    raise source.error(msg, len(this) + 1 + len(that))
sre_constants.error: bad character range 2-1 at position 9
 

Resolution

Edit the "/srv/pillar/ceph/proposals/policy.cfg" file and use valid globbing to target minions or target minions individually without the use of globbing.

Cause

Invalid globbing is being used to target minions in the "/srv/pillar/ceph/proposals/policy.cfg" file.

Additional Information

The error is related to how DeepSea handles globbing, for the example provided above the problem entries in the policy.cfg file were the storage minions, excerpt of the problematic entry:
 
#STORAGE
role-storage/cluster/node[2-18]*.sls

Specifying something like [2-18] as per the above is not interpreted as any number between 2 and 18 as would be expected, it's interpreted as the character range 2-1 which is invalid, because it's backwards (hence the exception), plus the character 8.

For the above example, one possible solution while still using globbing is to specify the minions as follows instead:
 
role-storage/cluster/node[2-9]*.sls
role-storage/cluster/node1[0-8]*.sls

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020288
  • Creation Date: 16-Jun-2021
  • Modified Date:16-Jun-2021
    • SUSE Enterprise Storage

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.