Patching in changes form https://code.launchpad.net/~james-page/charm-helpers/lp-1475247/+merge/265125
The ceph disk zapping fails sometimes when issued in a single command, as described in fdd7f8d83a
This branche's purpose is to avoid a full charmhelpers sync before release.
This commit is contained in:
parent
df2ad05c07
commit
a75527fad4
@ -43,9 +43,10 @@ def zap_disk(block_device):
|
||||
|
||||
:param block_device: str: Full path of block device to clean.
|
||||
'''
|
||||
# https://github.com/ceph/ceph/commit/fdd7f8d83afa25c4e09aaedd90ab93f3b64a677b
|
||||
# sometimes sgdisk exits non-zero; this is OK, dd will clean up
|
||||
call(['sgdisk', '--zap-all', '--mbrtogpt',
|
||||
'--clear', block_device])
|
||||
call(['sgdisk', '--zap-all', '--', block_device])
|
||||
call(['sgdisk', '--clear', '--mbrtogpt', '--', block_device])
|
||||
dev_end = check_output(['blockdev', '--getsz',
|
||||
block_device]).decode('UTF-8')
|
||||
gpt_end = int(dev_end.split()[0]) - 100
|
||||
|
Loading…
Reference in New Issue
Block a user