diff --git a/sdcm/sct_config.py b/sdcm/sct_config.py index c740944e05..617ef2b894 100644 --- a/sdcm/sct_config.py +++ b/sdcm/sct_config.py @@ -1939,6 +1939,10 @@ def __init__(self): # noqa: PLR0912, PLR0914, PLR0915 prefix_max_len -= 3 self['user_prefix'] = user_prefix[:prefix_max_len] + # remove any special characters from user_prefix, since later it will be used as a part of the instance names + # and some platfrom don't support special characters in the instance names (docker, AWS and such) + self['user_prefix'] = re.sub(r"[^a-zA-Z0-9-]", "-", self['user_prefix']) + # 11) validate that supported instance_provision selected if self.get('instance_provision') not in ['spot', 'on_demand', 'spot_fleet', 'spot_low_price']: raise ValueError(f"Selected instance_provision type '{self.get('instance_provision')}' is not supported!")