Skip to content

Commit

Permalink
ceph-volume lvm.batch.filestore use new Device objects
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 369bb74)
  • Loading branch information
Alfredo Deza authored and andrewschoen committed Aug 29, 2018
1 parent 86ad9e2 commit 07a27f1
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -67,17 +67,17 @@ def compute(self):
osds = self.computed['osds']
vgs = self.computed['vgs']
for device in devices:
device_size = disk.Size(b=device['size'])
device_size = disk.Size(b=device.sys_api['size'])
journal_size = prepare.get_journal_size(lv_format=False)
data_size = device_size - journal_size
data_percentage = data_size * 100 / device_size
vgs.append({'devices': [device['path']], 'parts': 2})
vgs.append({'devices': [device.abspath], 'parts': 2})
osd = {'data': {}, 'journal': {}}
osd['data']['path'] = device['path']
osd['data']['path'] = device.abspath
osd['data']['size'] = data_size.b
osd['data']['percentage'] = int(data_percentage)
osd['data']['human_readable_size'] = str(data_size)
osd['journal']['path'] = device['path']
osd['journal']['path'] = device.abspath
osd['journal']['size'] = journal_size.b
osd['journal']['percentage'] = int(100 - data_percentage)
osd['journal']['human_readable_size'] = str(journal_size)
Expand Down

0 comments on commit 07a27f1

Please sign in to comment.