Fix os vg allocation on ubuntu

Ubuntu cant allocate more than one disk for os vg

In order not to introduce a lot of low quality fixes to volume manager,
revert os allocation on controller nodes to min size

This patch reopens: https://bugs.launchpad.net/fuel/+bug/1295717

Change-Id: I81ac8150d07fcf11c745159c42c6c2fa57d64b33
Closes-Bug: #1306625
This commit is contained in:
Dima Shulyak 2014-04-14 17:48:44 +03:00
parent 0c10dcd945
commit 26589df694
3 changed files with 4 additions and 34 deletions

View File

@ -415,8 +415,6 @@
- {allocate_size: "min", id: "os"}
- {allocate_size: "min", id: "cephjournal"}
- {allocate_size: "full-disk", id: "ceph"}
controller-ceph-image:
- {allocate_size: 'all', id: 'os'}
mongo:
- {allocate_size: "min", id: "os"}
- {allocate_size: "all", id: "mongo"}

View File

@ -82,30 +82,6 @@ class TestVolumeManagerGlancePartition(base.BaseIntegrationTest):
image_volume = next((v for v in volumes if v['id'] == 'image'), None)
self.assertIsNone(image_volume)
def test_all_space_allocated(self):
"""Verifies that all space allocated for single volume
"""
cluster = self.env.create(
nodes_kwargs=[
{'roles': ['controller']},
{'roles': ['ceph-osd']}])
self.app.patch(
reverse(
'ClusterAttributesHandler',
kwargs={'cluster_id': cluster['id']}),
params=json.dumps({
'editable': {'storage': {'images_ceph': {'value': True}}}}),
headers=self.default_headers)
controller_manager = self.env.nodes[0].volume_manager
volumes = controller_manager.gen_volumes_info()
os_volume = next(volume for volume in volumes if volume['id'] == 'os')
os_volume_size = sum(volume['size'] for volume in os_volume['volumes'])
total_size = sum(disk.size for disk in controller_manager.disks)
self.assertEqual(manager.byte_to_megabyte(os_volume_size),
manager.byte_to_megabyte(total_size))
def test_glance_partition_without_ceph_osd(self):
self.env.create(
cluster_kwargs={

View File

@ -88,14 +88,10 @@ def exclude_glance_partition(role_mapping, node):
images_ceph = (node.cluster.attributes['editable']['storage']
['images_ceph']['value'])
if images_ceph:
if node.all_roles == set(['controller']):
role_mapping['controller'] = \
role_mapping['controller-ceph-image']
else:
# just filter out image volume
role_mapping['controller'] = \
filter(lambda space: space['id'] != 'image',
role_mapping['controller'])
# just filter out image volume
role_mapping['controller'] = \
filter(lambda space: space['id'] != 'image',
role_mapping['controller'])
return