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:
Christopher Glass 2015-08-07 12:15:24 +03:00
parent 93d11c9a66
commit c7449ad37a
1 changed files with 3 additions and 2 deletions

View File

@ -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