diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml index 9373c6695c..983c131395 100644 --- a/nailgun/nailgun/fixtures/openstack.yaml +++ b/nailgun/nailgun/fixtures/openstack.yaml @@ -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"} diff --git a/nailgun/nailgun/test/integration/test_volume_manager.py b/nailgun/nailgun/test/integration/test_volume_manager.py index 42bfd73de6..3796d2386b 100644 --- a/nailgun/nailgun/test/integration/test_volume_manager.py +++ b/nailgun/nailgun/test/integration/test_volume_manager.py @@ -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={ diff --git a/nailgun/nailgun/volumes/manager.py b/nailgun/nailgun/volumes/manager.py index 05d96fcaba..80cea5d8fb 100644 --- a/nailgun/nailgun/volumes/manager.py +++ b/nailgun/nailgun/volumes/manager.py @@ -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