Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions file_root/_modules/parted_free_disks.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ def find_free_spaces(min_disk_size=10, max_disk_size=None):
'start': _int_to_sector(start_sector_int),
'end': _int_to_sector(end_sector_int)}
else:
LOG.error('space {0} less than minimum {0}'.format(
LOG.error('space {0} less than minimum {1}'.format(
disk_size_G, min_disk_size))
LOG.error('No free space found')

def _last_allocated_sector(part_data):
last_allocated_sector = 2048
for partition_id, partition_data in part_data.iteritems():
LOG.debug('checking partition {0} {0}'.format(
LOG.debug('checking partition {0} {1}'.format(
partition_id, str(partition_data)))
sector_end_in_int = _sector_to_int(partition_data['end'])
if sector_end_in_int > last_allocated_sector:
Expand All @@ -140,4 +140,4 @@ def _G_to_sector(giga_bytes, sector_size):
return (giga_bytes*1073741824)/sector_size

def _sector_to_G(sector_length, sector_size):
return (sector_length*sector_size)/1073741824
return (sector_length*sector_size)/1073741824
2 changes: 1 addition & 1 deletion file_root/_states/lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def vg_present(name, devices=None, **kwargs):
else:
ret['comment'] = '{0}\n{1}'.format(
ret['comment'],
'{0} is part of {0}'.format(
'{0} is part of {1}'.format(
device, pvs[device]['Volume Group Name']))
ret['result'] = False
else:
Expand Down