Skip to content

Commit

Permalink
Merge pull request #7176: ceph-disk prepare fails if device is a symlink
Browse files Browse the repository at this point in the history
Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Jan 11, 2016
2 parents 830c69f + b2f1e76 commit 472dce6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ceph-disk
Expand Up @@ -996,9 +996,9 @@ def get_free_partition_index(dev):
'BYT;' not in lines):
raise Error('parted output expected to contain one of ' +
'CHH; CYL; or BYT; : ' + lines)
if dev not in lines:
if os.path.realpath(dev) not in lines:
raise Error('parted output expected to contain ' + dev + ': ' + lines)
_, partitions = lines.split(dev)
_, partitions = lines.split(os.path.realpath(dev))
partition_numbers = extract_parted_partition_numbers(partitions)
if partition_numbers:
return max(partition_numbers) + 1
Expand Down

0 comments on commit 472dce6

Please sign in to comment.