IBP Got rid of md for /boot
Centos does use legacy grub, and it is only able to boot from md with metadata 0.9. So, we are limited to have not more than 28 disks on a node because current version of volume manager assumes /boot is spread over all disks and 0.9 metadata does not support more than 28. To avoid this limitation we've got rid of using md for /boot completely. Change-Id: I08398453625a4e9136d67989c7ebea41cb9cb766 Closes-Bug: #1340414
This commit is contained in:
parent
18f4985aec
commit
524d6ff54b
@ -65,6 +65,11 @@ class Nailgun(object):
|
|||||||
# how it is given by nailgun
|
# how it is given by nailgun
|
||||||
self.data = data
|
self.data = data
|
||||||
|
|
||||||
|
# this var is used as a flag that /boot fs
|
||||||
|
# has already been added. we need this to
|
||||||
|
# get rid of md over all disks for /boot partition.
|
||||||
|
self._boot_done = False
|
||||||
|
|
||||||
def partition_data(self):
|
def partition_data(self):
|
||||||
return self.data['ks_meta']['pm_data']['ks_spaces']
|
return self.data['ks_meta']['pm_data']['ks_spaces']
|
||||||
|
|
||||||
@ -250,7 +255,8 @@ class Nailgun(object):
|
|||||||
metadatacopies=metadatacopies)
|
metadatacopies=metadatacopies)
|
||||||
|
|
||||||
if volume['type'] == 'raid':
|
if volume['type'] == 'raid':
|
||||||
if 'mount' in volume and volume['mount'] != 'none':
|
if 'mount' in volume and \
|
||||||
|
volume['mount'] not in ('none', '/boot'):
|
||||||
LOG.debug('Attaching partition to RAID '
|
LOG.debug('Attaching partition to RAID '
|
||||||
'by its mount point %s' % volume['mount'])
|
'by its mount point %s' % volume['mount'])
|
||||||
partition_scheme.md_attach_by_mount(
|
partition_scheme.md_attach_by_mount(
|
||||||
@ -258,6 +264,18 @@ class Nailgun(object):
|
|||||||
fs_type=volume.get('file_system', 'xfs'),
|
fs_type=volume.get('file_system', 'xfs'),
|
||||||
fs_label=self._getlabel(volume.get('disk_label')))
|
fs_label=self._getlabel(volume.get('disk_label')))
|
||||||
|
|
||||||
|
if 'mount' in volume and volume['mount'] == '/boot' and \
|
||||||
|
not self._boot_done:
|
||||||
|
LOG.debug('Adding file system on partition: '
|
||||||
|
'mount=%s type=%s' %
|
||||||
|
(volume['mount'],
|
||||||
|
volume.get('file_system', 'ext2')))
|
||||||
|
partition_scheme.add_fs(
|
||||||
|
device=prt.name, mount=volume['mount'],
|
||||||
|
fs_type=volume.get('file_system', 'ext2'),
|
||||||
|
fs_label=self._getlabel(volume.get('disk_label')))
|
||||||
|
self._boot_done = True
|
||||||
|
|
||||||
# this partition will be used to put there configdrive image
|
# this partition will be used to put there configdrive image
|
||||||
if partition_scheme.configdrive_device() is None:
|
if partition_scheme.configdrive_device() is None:
|
||||||
LOG.debug('Adding configdrive partition on disk %s: size=20' %
|
LOG.debug('Adding configdrive partition on disk %s: size=20' %
|
||||||
|
@ -114,11 +114,6 @@ class TestManager(test_base.BaseTestCase):
|
|||||||
self.assertEqual(mock_pu_sgt_expected_calls,
|
self.assertEqual(mock_pu_sgt_expected_calls,
|
||||||
mock_pu_sgt.call_args_list)
|
mock_pu_sgt.call_args_list)
|
||||||
|
|
||||||
mock_mu_m_expected_calls = [mock.call('/dev/md0', 'mirror',
|
|
||||||
'/dev/sda3', '/dev/sdb3',
|
|
||||||
'/dev/sdc3')]
|
|
||||||
self.assertEqual(mock_mu_m_expected_calls, mock_mu_m.call_args_list)
|
|
||||||
|
|
||||||
mock_lu_p_expected_calls = [
|
mock_lu_p_expected_calls = [
|
||||||
mock.call('/dev/sda5', metadatasize=28, metadatacopies=2),
|
mock.call('/dev/sda5', metadatasize=28, metadatacopies=2),
|
||||||
mock.call('/dev/sda6', metadatasize=28, metadatacopies=2),
|
mock.call('/dev/sda6', metadatasize=28, metadatacopies=2),
|
||||||
@ -137,7 +132,7 @@ class TestManager(test_base.BaseTestCase):
|
|||||||
self.assertEqual(mock_lu_l_expected_calls, mock_lu_l.call_args_list)
|
self.assertEqual(mock_lu_l_expected_calls, mock_lu_l.call_args_list)
|
||||||
|
|
||||||
mock_fu_mf_expected_calls = [
|
mock_fu_mf_expected_calls = [
|
||||||
mock.call('ext2', '', '', '/dev/md0'),
|
mock.call('ext2', '', '', '/dev/sda3'),
|
||||||
mock.call('ext2', '', '', '/dev/sda4'),
|
mock.call('ext2', '', '', '/dev/sda4'),
|
||||||
mock.call('swap', '', '', '/dev/mapper/os-swap'),
|
mock.call('swap', '', '', '/dev/mapper/os-swap'),
|
||||||
mock.call('xfs', '', '', '/dev/mapper/image-glance')]
|
mock.call('xfs', '', '', '/dev/mapper/image-glance')]
|
||||||
|
@ -576,7 +576,6 @@ class TestNailgun(test_base.BaseTestCase):
|
|||||||
self.assertEqual(4, len(p_scheme.pvs))
|
self.assertEqual(4, len(p_scheme.pvs))
|
||||||
self.assertEqual(3, len(p_scheme.lvs))
|
self.assertEqual(3, len(p_scheme.lvs))
|
||||||
self.assertEqual(2, len(p_scheme.vgs))
|
self.assertEqual(2, len(p_scheme.vgs))
|
||||||
self.assertEqual(1, len(p_scheme.mds))
|
|
||||||
self.assertEqual(3, len(p_scheme.parteds))
|
self.assertEqual(3, len(p_scheme.parteds))
|
||||||
|
|
||||||
@mock.patch('yaml.load')
|
@mock.patch('yaml.load')
|
||||||
@ -682,7 +681,6 @@ class TestNailgun(test_base.BaseTestCase):
|
|||||||
self.assertEqual(4, len(p_scheme.pvs))
|
self.assertEqual(4, len(p_scheme.pvs))
|
||||||
self.assertEqual(3, len(p_scheme.lvs))
|
self.assertEqual(3, len(p_scheme.lvs))
|
||||||
self.assertEqual(2, len(p_scheme.vgs))
|
self.assertEqual(2, len(p_scheme.vgs))
|
||||||
self.assertEqual(1, len(p_scheme.mds))
|
|
||||||
self.assertEqual(3, len(p_scheme.parteds))
|
self.assertEqual(3, len(p_scheme.parteds))
|
||||||
self.assertEqual(3, self.drv._get_partition_count('ceph'))
|
self.assertEqual(3, self.drv._get_partition_count('ceph'))
|
||||||
#NOTE(agordeev): (-2, -1, -1) is the list of ceph data partition counts
|
#NOTE(agordeev): (-2, -1, -1) is the list of ceph data partition counts
|
||||||
|
Loading…
Reference in New Issue
Block a user