mirror of
https://github.com/xcat2/confluent.git
synced 2025-08-30 23:08:14 +00:00
Handle underscore in volume name
Only the first underscore would be in the volume groub name, the rest would be a part of the volume name, which should be excluded.
This commit is contained in:
@@ -373,7 +373,7 @@ def install_to_disk(imgpath):
|
||||
if fs['device'].startswith('/dev/mapper'):
|
||||
oldvgname = fs['device'].rsplit('/', 1)[-1]
|
||||
# if node has - then /dev/mapper will double up the hypen
|
||||
if '_' in oldvgname and '-' in oldvgname.split('_')[-1]:
|
||||
if '_' in oldvgname and '-' in oldvgname.split('_', 1)[-1]:
|
||||
oldvgname = oldvgname.rsplit('-', 1)[0].replace('--', '-')
|
||||
osname = oldvgname.split('_')[0]
|
||||
nodename = socket.gethostname().split('.')[0]
|
||||
|
Reference in New Issue
Block a user