fix services polling and make it more robust
Change-Id: I70c9d8708a20faef9fd76c00d9b6ca1f8db664ae
This commit is contained in:
parent
89dba0a8fa
commit
f5273d6369
@ -37,11 +37,12 @@ cloud-init.service|loaded|active|exited|Initialcloud-initjob(metadataservicecr)
|
|||||||
|
|
||||||
ssh_client = overcloud.overcloud_ssh_client(hostname)
|
ssh_client = overcloud.overcloud_ssh_client(hostname)
|
||||||
output = sh.execute(
|
output = sh.execute(
|
||||||
"systemctl -a --no-pager --plain --no-legend|"
|
"systemctl -a --no-pager --plain --no-legend|grep -v not-found|"
|
||||||
"sed \'s/\\s\\s/|/g\'|sed \'s/||*/|/g\'|sed \'s@ @@g\'",
|
"sed \'s/\\s\\s/|/g\'|sed \'s/||*/DELIM/g\'|sed \'s@ @@g\'|"
|
||||||
|
"sed \'s/DELIM$//g\'",
|
||||||
ssh_client=ssh_client).stdout
|
ssh_client=ssh_client).stdout
|
||||||
stream = six.StringIO(output)
|
stream = six.StringIO(output)
|
||||||
table = pandas.read_csv(stream, sep='|', header=None, skiprows=0)
|
table = pandas.read_csv(stream, sep='DELIM', header=None, skiprows=0)
|
||||||
table.replace(to_replace=' ', value="", regex=True, inplace=True)
|
table.replace(to_replace=' ', value="", regex=True, inplace=True)
|
||||||
table.columns = ['UNIT', 'loaded_state', 'active_state',
|
table.columns = ['UNIT', 'loaded_state', 'active_state',
|
||||||
'low_level_state', 'UNIT_DESCRIPTION']
|
'low_level_state', 'UNIT_DESCRIPTION']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user