When ceph-disk has failed, collect more data
It is possible that a race condition can cause ceph-disk to fail when attempting to mount a device, as it has already tried mounting it. When that, or other unforseen events, happens, we want to collect more data. Partial-Bug: 1746118 Change-Id: I9c09951dbeb0329a8b0fcc57e9351492ef20c42d
This commit is contained in:
parent
23f0c12c47
commit
6238df8a36
|
@ -1513,10 +1513,19 @@ def osdize_dev(dev, osd_format, osd_journal, reformat_osd=False,
|
|||
log("osdize cmd: {}".format(cmd))
|
||||
subprocess.check_call(cmd)
|
||||
except subprocess.CalledProcessError:
|
||||
try:
|
||||
lsblk_output = subprocess.check_output(
|
||||
['lsblk', '-P']).decode('UTF-8')
|
||||
except subprocess.CalledProcessError as e:
|
||||
log("Couldn't get lsblk output: {}".format(e), ERROR)
|
||||
if ignore_errors:
|
||||
log('Unable to initialize device: {}'.format(dev), WARNING)
|
||||
if lsblk_output:
|
||||
log('lsblk output: {}'.format(lsblk_output), DEBUG)
|
||||
else:
|
||||
log('Unable to initialize device: {}'.format(dev), ERROR)
|
||||
if lsblk_output:
|
||||
log('lsblk output: {}'.format(lsblk_output), WARNING)
|
||||
raise
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue