~gnuoy/charms/trusty/keystone/restart-horror

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/storage/linux/utils.py

  • Committer: Corey Bryant
  • Date: 2015-08-18 17:34:34 UTC
  • Revision ID: corey.bryant@canonical.com-20150818173434-hp6flkiy622hjrsy
[corey.bryant,r=trivial] Sync charm-helpers to pick up Liberty support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
    :param block_device: str: Full path of block device to clean.
45
45
    '''
 
46
    # https://github.com/ceph/ceph/commit/fdd7f8d83afa25c4e09aaedd90ab93f3b64a677b
46
47
    # sometimes sgdisk exits non-zero; this is OK, dd will clean up
47
 
    call(['sgdisk', '--zap-all', '--mbrtogpt',
48
 
          '--clear', block_device])
 
48
    call(['sgdisk', '--zap-all', '--', block_device])
 
49
    call(['sgdisk', '--clear', '--mbrtogpt', '--', block_device])
49
50
    dev_end = check_output(['blockdev', '--getsz',
50
51
                            block_device]).decode('UTF-8')
51
52
    gpt_end = int(dev_end.split()[0]) - 100