From 61b197aa4b25f6b4d7884806f9435d33002f1a61 Mon Sep 17 00:00:00 2001 From: Jim Gauld Date: Mon, 26 Nov 2018 15:23:27 -0500 Subject: [PATCH] Remove support for nova-local lvm backend for compute hosts This story tracks the removal of the nova-local lvm backend for compute hosts. The lvm backend is no longer required; nova-local storage will continue to support settings of "image" or "remote" backends. This story will remove custom code related to lvm nova-local storage: - the 'sysinv host-lvg-modify' command is modified: --instance_backing lvm parameter is removed ('image' and 'remote' remain) --instances_lv_size_gib option is removed - puppet instances_lv_size configuration is removed - local_lvm is removed from storage host-aggregates DocImpact Story: 2004427 Task: 28083 Change-Id: I5443a07f8922bcab7fa22e5ff8fc2d0ff3fb109d Signed-off-by: Jim Gauld --- api-ref/source/api-ref-sysinv-v1-config.rst | 5 +- .../src/modules/openstack/manifests/nova.pp | 14 +---- .../cgts-client/cgtsclient/v1/ilvg_shell.py | 33 +++------- .../cgtsclient/v1/iprofile_shell.py | 3 - .../sysinv/etc/sysinv/profileSchema.xsd | 2 - .../sysinv/etc/sysinv/sampleProfile.xml | 22 ++----- .../sysinv/sysinv/api/controllers/v1/host.py | 39 ++---------- .../sysinv/sysinv/api/controllers/v1/lvg.py | 59 +---------------- .../sysinv/api/controllers/v1/profile.py | 31 +-------- .../sysinv/sysinv/api/controllers/v1/pv.py | 63 ------------------- .../sysinv/sysinv/sysinv/common/constants.py | 8 --- .../sysinv/sysinv/conductor/openstack.py | 8 +-- sysinv/sysinv/sysinv/sysinv/puppet/nova.py | 5 -- 13 files changed, 24 insertions(+), 268 deletions(-) diff --git a/api-ref/source/api-ref-sysinv-v1-config.rst b/api-ref/source/api-ref-sysinv-v1-config.rst index 8aed95b8c9..0bc12d3b53 100644 --- a/api-ref/source/api-ref-sysinv-v1-config.rst +++ b/api-ref/source/api-ref-sysinv-v1-config.rst @@ -1551,7 +1551,7 @@ badMediaType (415) :widths: 20, 20, 20, 60 "volumegroup_id", "URI", "csapi:UUID", "The unique identifier of an existing LVM volume group." - "capabilites (Optional)", "plain", "xsd:string", "A dictionary of key-value pairs prepresenting volume group parameters and values. Valid nova-local parameters are: ``instances_lv_size_mib``, ``instance_backing``, and ``concurrent_disk_operations``. Valid cinder-volumes parameters are: ``lvm_type``" + "capabilities (Optional)", "plain", "xsd:string", "A dictionary of key-value pairs prepresenting volume group parameters and values. Valid nova-local parameters are: ``instance_backing``, and ``concurrent_disk_operations``. Valid cinder-volumes parameters are: ``lvm_type``" **Response parameters** @@ -1582,7 +1582,7 @@ badMediaType (415) [ { "path": "/capabilities", - "value": "{\\"instances_lv_size_mib\\": 10240}", + "value": "{}", "op": "replace" } ] @@ -1610,7 +1610,6 @@ badMediaType (415) "lvm_max_pv": 0, "updated_at": null, "capabilities": { - "instances_lv_size_mib": 10240 }, "vg_state": "adding", "ihost_uuid": "6b55a4c8-4194-4e3b-8d32-ca658473314e", diff --git a/puppet-manifests/src/modules/openstack/manifests/nova.pp b/puppet-manifests/src/modules/openstack/manifests/nova.pp index 8fe8236bb8..0ddc9ac8c0 100644 --- a/puppet-manifests/src/modules/openstack/manifests/nova.pp +++ b/puppet-manifests/src/modules/openstack/manifests/nova.pp @@ -385,7 +385,6 @@ class openstack::nova::storage ( $lvm_global_filter = '[]', $lvm_update_filter = '[]', $instance_backing = 'image', - $instances_lv_size = 0, $concurrent_disk_operations = 2, $images_rbd_pool = 'ephemeral', $images_rbd_ceph_conf = '/etc/ceph/ceph.conf' @@ -402,16 +401,6 @@ class openstack::nova::storage ( $images_volume_group = absent $round_to_extent = false $local_monitor_state = 'disabled' - $instances_lv_size_real = 'max' - $images_rbd_pool_real = absent - $images_rbd_ceph_conf_real = absent - } - 'lvm': { - $images_type = 'lvm' - $images_volume_group = 'nova-local' - $round_to_extent = true - $local_monitor_state = 'enabled' - $instances_lv_size_real = $instances_lv_size $images_rbd_pool_real = absent $images_rbd_ceph_conf_real = absent } @@ -420,7 +409,6 @@ class openstack::nova::storage ( $images_volume_group = absent $round_to_extent = false $local_monitor_state = 'disabled' - $instances_lv_size_real = 'max' $images_rbd_pool_real = $images_rbd_pool $images_rbd_ceph_conf_real = $images_rbd_ceph_conf } @@ -472,7 +460,7 @@ class openstack::nova::storage ( ensure => 'present', vg => 'nova-local', pv => $final_pvs, - size => $instances_lv_size_real, + size => 'max', round_to_extent => $round_to_extent, allow_reduce => true, nuke_fs_on_resize_failure => true, diff --git a/sysinv/cgts-client/cgts-client/cgtsclient/v1/ilvg_shell.py b/sysinv/cgts-client/cgts-client/cgtsclient/v1/ilvg_shell.py index ff69b1d8c2..dd39739f54 100644 --- a/sysinv/cgts-client/cgts-client/cgtsclient/v1/ilvg_shell.py +++ b/sysinv/cgts-client/cgts-client/cgtsclient/v1/ilvg_shell.py @@ -36,12 +36,6 @@ def _print_ilvg_show(ilvg): attr = getattr(ilvg, 'capabilities', '') - if attr: - lv_size_mib = attr.pop('instances_lv_size_mib', None) - if lv_size_mib: - lv_size_gib = float(lv_size_mib) / 1024 - attr.update({'instances_lv_size_gib': lv_size_gib}) - # rename capabilities for display purposes and add to display list data.append(('parameters', attr)) @@ -176,21 +170,14 @@ def do_host_lvg_delete(cc, args): help="Name or UUID of lvg [REQUIRED]") @utils.arg('-b', '--instance_backing', metavar='', - choices=['lvm', 'image', 'remote'], + choices=['image', 'remote'], help=("Type of instance backing. " - "Allowed values: lvm, image, remote. [nova-local]")) + "Allowed values: image, remote. [nova-local]")) @utils.arg('-c', '--concurrent_disk_operations', metavar='', help=("Set the number of concurrent I/O intensive disk operations " "such as glance image downloads, image format conversions, " "etc. [nova-local]")) -@utils.arg('-s', '--instances_lv_size_gib', - metavar='', - help=("Set the desired size (in GiB) of the instances LV that is " - "used for /var/lib/nova/instances. " - "Example: For a 50GB volume, use 50. " - "Required when instance backing is \"lvm\". " - "[nova-local]")) @utils.arg('-l', '--lvm_type', metavar='', choices=['thick', 'thin'], @@ -201,14 +188,13 @@ def do_host_lvg_modify(cc, args): # Get all the fields from the command arguments field_list = ['hostnameorid', 'lvgnameoruuid', - 'instance_backing', 'instances_lv_size_gib', - 'concurrent_disk_operations', 'lvm_type'] + 'instance_backing', 'concurrent_disk_operations', 'lvm_type'] fields = dict((k, v) for (k, v) in vars(args).items() if k in field_list and not (v is None)) - all_caps_list = ['instance_backing', 'instances_lv_size_gib', - 'concurrent_disk_operations', 'lvm_type'] - integer_fields = ['instances_lv_size_gib', 'concurrent_disk_operations'] + all_caps_list = ['instance_backing', 'concurrent_disk_operations', + 'lvm_type'] + integer_fields = ['concurrent_disk_operations'] requested_caps_dict = {} for cap in all_caps_list: @@ -218,12 +204,9 @@ def do_host_lvg_modify(cc, args): requested_caps_dict[cap] = int(fields[cap]) else: requested_caps_dict[cap] = fields[cap] - if cap == 'instances_lv_size_gib': - requested_caps_dict['instances_lv_size_mib'] = \ - requested_caps_dict.pop('instances_lv_size_gib') * 1024 except ValueError: - raise exc.CommandError('instances_lv size must be an integer ' - 'greater than 0: %s' % fields[cap]) + raise exc.CommandError( + '{0} value {1} is invalid'.format(cap, fields[cap])) # Get the ihost object ihost = ihost_utils._find_ihost(cc, args.hostnameorid) diff --git a/sysinv/cgts-client/cgts-client/cgtsclient/v1/iprofile_shell.py b/sysinv/cgts-client/cgts-client/cgtsclient/v1/iprofile_shell.py index 8e6f2135db..c759e8c569 100644 --- a/sysinv/cgts-client/cgts-client/cgtsclient/v1/iprofile_shell.py +++ b/sysinv/cgts-client/cgts-client/cgtsclient/v1/iprofile_shell.py @@ -355,9 +355,6 @@ def get_ilvg_config(iprofile): for k, v in ilvg.capabilities.iteritems(): if capabilities_str != '': capabilities_str += "; " - if k == "instances_lv_size_mib": - k = "instances_lv_size_gib" - v = v / 1024 capabilities_str += "%s: %s " % (k, v) str += "%s, %s" % (ilvg.lvm_vg_name, capabilities_str) diff --git a/sysinv/sysinv/sysinv/etc/sysinv/profileSchema.xsd b/sysinv/sysinv/sysinv/etc/sysinv/profileSchema.xsd index 5c86800421..e8fc5b3b30 100644 --- a/sysinv/sysinv/sysinv/etc/sysinv/profileSchema.xsd +++ b/sysinv/sysinv/sysinv/etc/sysinv/profileSchema.xsd @@ -321,7 +321,6 @@ - @@ -331,7 +330,6 @@ - diff --git a/sysinv/sysinv/sysinv/etc/sysinv/sampleProfile.xml b/sysinv/sysinv/sysinv/etc/sysinv/sampleProfile.xml index 8426e0e756..25e2d7dcc6 100644 --- a/sysinv/sysinv/sysinv/etc/sysinv/sampleProfile.xml +++ b/sysinv/sysinv/sysinv/etc/sysinv/sampleProfile.xml @@ -151,28 +151,14 @@ - - - - - - @@ -184,8 +170,8 @@ size: minimum size (in MB). The lvg tags below define the local volume group lvm_vg_name: local volume group name - instance_backing: lvm, image, or remote - concurrent_disk_operations: number of parallel I/O intensive disk operaions + instance_backing: image, or remote + concurrent_disk_operations: number of parallel I/O intensive disk operations --> diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py index 0b6f77ee7c..3e3af1a9b7 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py @@ -4048,8 +4048,9 @@ class HostController(rest.RestController): nova_local_storage_lvg = lvg break - # Prevent unlock if instances logical volume size is not - # provided or size needs to be adjusted + # Prevent unlock if nova-local volume group has: invalid state + # (e.g., removing), invalid instance_backing, no physical + # volumes allocated. if nova_local_storage_lvg: if nova_local_storage_lvg.vg_state == constants.LVG_DEL: raise wsme.exc.ClientSideError( @@ -4081,41 +4082,9 @@ class HostController(rest.RestController): instance_backing = lvg_capabilities.get( constants.LVG_NOVA_PARAM_BACKING) - if instance_backing in [ + if instance_backing not in [ constants.LVG_NOVA_BACKING_IMAGE, constants.LVG_NOVA_BACKING_REMOTE]: - return - elif instance_backing == constants.LVG_NOVA_BACKING_LVM: - if constants.LVG_NOVA_PARAM_INST_LV_SZ not in lvg_capabilities: - raise wsme.exc.ClientSideError( - _("A host with compute functionality and a " - "nova-local volume group requires that a valid " - "size be specifed for the instances logical " - "volume.")) - elif lvg_capabilities[constants.LVG_NOVA_PARAM_INST_LV_SZ] == 0: - raise wsme.exc.ClientSideError( - _("A host with compute functionality and a " - "nova-local volume group requires that a valid " - "size be specifed for the instances logical " - "volume. The current value is 0.")) - else: - # Sanity check the current VG size against the - # current instances logical volume size in case - # PV's have been deleted - size = pv_api._get_vg_size_from_pvs( - nova_local_storage_lvg) - if (lvg_capabilities[constants.LVG_NOVA_PARAM_INST_LV_SZ] > - size): - - raise wsme.exc.ClientSideError( - _("A host with compute functionality and a " - "nova-local volume group requires that a " - "valid size be specifed for the instances " - "logical volume. Current value: %d > %d.") % - (lvg_capabilities[ - constants.LVG_NOVA_PARAM_INST_LV_SZ], - size)) - else: raise wsme.exc.ClientSideError( _("A host with compute functionality and a " "nova-local volume group requires that a valid " diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/lvg.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/lvg.py index 4ae9681b34..fbef2909fb 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/lvg.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/lvg.py @@ -394,7 +394,6 @@ def _cinder_volumes_patch_semantic_checks(caps_dict): def _nova_local_patch_semantic_checks(caps_dict): # make sure that only valid capabilities are provided valid_caps = set([constants.LVG_NOVA_PARAM_BACKING, - constants.LVG_NOVA_PARAM_INST_LV_SZ, constants.LVG_NOVA_PARAM_DISK_OPS]) invalid_caps = set(caps_dict.keys()) - valid_caps @@ -438,29 +437,6 @@ def _lvg_pre_patch_checks(lvg_obj, patch_obj): set(patch_caps_dict.keys())): patch_caps_dict[k] = current_caps_dict[k] - # Make further adjustments to the patch based on the current - # value to account for switching storage modes - if (patch_caps_dict[constants.LVG_NOVA_PARAM_BACKING] == - constants.LVG_NOVA_BACKING_LVM): - if constants.LVG_NOVA_PARAM_INST_LV_SZ not in patch_caps_dict: - # Switched to LVM mode so set the minimum sized - # instances_lv_size_mib. This will populate it in - # horizon allowing for further configuration - vg_size_mib = pv_api._get_vg_size_from_pvs(lvg_dict) - allowed_min_mib = \ - pv_api._instances_lv_min_allowed_mib(vg_size_mib) - patch_caps_dict.update({constants.LVG_NOVA_PARAM_INST_LV_SZ: - allowed_min_mib}) - elif (patch_caps_dict[constants.LVG_NOVA_PARAM_BACKING] in [ - constants.LVG_NOVA_BACKING_IMAGE, - constants.LVG_NOVA_BACKING_REMOTE]): - if constants.LVG_NOVA_PARAM_INST_LV_SZ in patch_caps_dict: - # Switched to image backed or remote backed modes. - # Remove the instances_lv_size_mib. It is not - # configurable as we will use the entire nova-local - # VG - del patch_caps_dict[constants.LVG_NOVA_PARAM_INST_LV_SZ] - p['value'] = patch_caps_dict elif lvg_dict['lvm_vg_name'] == constants.LVG_CINDER_VOLUMES: for p in patch_obj: @@ -641,34 +617,6 @@ def _check(op, lvg): _('Internal Error: %s parameter missing for volume ' 'group.') % constants.LVG_NOVA_PARAM_BACKING) else: - # Check instances_lv_size_mib - if ((lvg_caps.get(constants.LVG_NOVA_PARAM_BACKING) == - constants.LVG_NOVA_BACKING_LVM) and - constants.LVG_NOVA_PARAM_INST_LV_SZ in lvg_caps): - - # Get the volume group size - vg_size_mib = pv_api._get_vg_size_from_pvs(lvg) - - # Apply a "usability" check on the value provided to make - # sure it operates within an acceptable range - - allowed_min_mib = pv_api._instances_lv_min_allowed_mib( - vg_size_mib) - allowed_max_mib = pv_api._instances_lv_max_allowed_mib( - vg_size_mib) - - lv_size_mib = lvg_caps[constants.LVG_NOVA_PARAM_INST_LV_SZ] - if ((lv_size_mib < allowed_min_mib) or - (lv_size_mib > allowed_max_mib)): - raise wsme.exc.ClientSideError( - _('Invalid size provided for ' - 'instances_lv_size_gib: %.2f. The valid range, ' - 'based on the volume group size is %.2f <= ' - 'instances_lv_size_gib <= %.2f.' % - (float(lvg_caps[constants.LVG_NOVA_PARAM_INST_LV_SZ]) / 1024, - float(allowed_min_mib) / 1024, - float(allowed_max_mib) / 1024))) - # Instances backed by remote ephemeral storage can only be # used on systems that have a Ceph (internal or external) # backend. @@ -785,11 +733,10 @@ def _create(lvg, iprofile=None, applyprofile=None): if lvg['lvm_vg_name'] == constants.LVG_NOVA_LOCAL and not iprofile: lvg_caps = lvg['capabilities'] - if (constants.LVG_NOVA_PARAM_INST_LV_SZ in lvg_caps) or applyprofile: + if applyprofile: # defined from create or inherit the capabilities - LOG.info("%s defined from create %s applyprofile=%s" % - (constants.LVG_NOVA_PARAM_INST_LV_SZ, lvg_caps, - applyprofile)) + LOG.info("LVG create %s applyprofile=%s" % + (lvg_caps, applyprofile)) else: lvg_caps_dict = { constants.LVG_NOVA_PARAM_BACKING: diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/profile.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/profile.py index 3e1ba44987..01582a0364 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/profile.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/profile.py @@ -1813,41 +1813,12 @@ def _create_localstorage_profile(profile_name, profile_node): ilvg = ilvgs_local[0] instance_backing = ilvg.get(constants.LVG_NOVA_PARAM_BACKING) concurrent_disk_operations = ilvg.get(constants.LVG_NOVA_PARAM_DISK_OPS) - if instance_backing == constants.LVG_NOVA_BACKING_LVM: - instances_lv_size_mib = \ - int(ilvg.get(constants.LVG_NOVA_PARAM_INST_LV_SZ_GIB)) * 1024 - if not instances_lv_size_mib: - return ("Error", _('error: importing Local Storage profile %s ' - 'failed.') % - profile_name, "instances_lv_size_mib required.") - capabilities_dict = {constants.LVG_NOVA_PARAM_BACKING: - constants.LVG_NOVA_BACKING_LVM, - constants.LVG_NOVA_PARAM_INST_LV_SZ: - int(instances_lv_size_mib), - constants.LVG_NOVA_PARAM_DISK_OPS: - int(concurrent_disk_operations)} - elif instance_backing == constants.LVG_NOVA_BACKING_IMAGE: - if ilvg.get(constants.LVG_NOVA_PARAM_INST_LV_SZ_GIB): - return ("Error", - _('error: Local Storage profile %s is invalid') - % profile_name, - _('instances_lv_size_gib (%s) must not be set for ' - 'image backed instance') - % ilvg.get(constants.LVG_NOVA_PARAM_INST_LV_SZ_GIB)) - + if instance_backing == constants.LVG_NOVA_BACKING_IMAGE: capabilities_dict = {constants.LVG_NOVA_PARAM_BACKING: constants.LVG_NOVA_BACKING_IMAGE, constants.LVG_NOVA_PARAM_DISK_OPS: int(concurrent_disk_operations)} elif instance_backing == constants.LVG_NOVA_BACKING_REMOTE: - if ilvg.get(constants.LVG_NOVA_PARAM_INST_LV_SZ_GIB): - return ("Error", - _('error: Local Storage profile %s is invalid') - % profile_name, - _('instances_lv_size_gib (%s) must not be set for ' - 'remote backed instance') - % ilvg.get(constants.LVG_NOVA_PARAM_INST_LV_SZ_GIB)) - capabilities_dict = {constants.LVG_NOVA_PARAM_BACKING: constants.LVG_NOVA_BACKING_REMOTE, constants.LVG_NOVA_PARAM_DISK_OPS: diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pv.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pv.py index 46dddf8adb..ba020595da 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pv.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pv.py @@ -564,52 +564,6 @@ def _get_vg_size_from_pvs(lvg, filter_pv=None): return size -def _instances_lv_min_allowed_mib(vg_size_mib): - # 80GB is the cutoff in the kickstart files for a virtualbox disk vs. a - # normal disk. Use a similar cutoff here for the volume group size. If the - # volume group is large enough then bump the min_mib value. The min_mib - # value is set to provide a reasonable minimum amount of space for - # /var/lib/nova/instances - - # Note: A range based on this calculation is displayed in horizon to help - # provide guidance to the end user. Any changes here should be reflected - # in dashboards/admin/inventory/storages/lvg_params/views.py as well - if (vg_size_mib < (80 * 1024)): - min_mib = 2 * 1024 - else: - min_mib = 5 * 1024 - return min_mib - - -def _instances_lv_max_allowed_mib(vg_size_mib): - return vg_size_mib >> 1 - - -def _check_instances_lv_if_deleted(lvg, ignore_pv): - # get the volume group capabilities - lvg_caps = lvg['capabilities'] - - # get the new volume group size assuming that the physical volume is - # removed - vg_size_mib = _get_vg_size_from_pvs(lvg, filter_pv=ignore_pv) - - # Get the valid range of the instances_lv - allowed_min_mib = _instances_lv_min_allowed_mib(vg_size_mib) - allowed_max_mib = _instances_lv_max_allowed_mib(vg_size_mib) - - if (constants.LVG_NOVA_PARAM_INST_LV_SZ in lvg_caps and - ((lvg_caps[constants.LVG_NOVA_PARAM_INST_LV_SZ] < allowed_min_mib) or - (lvg_caps[constants.LVG_NOVA_PARAM_INST_LV_SZ] > allowed_max_mib))): - raise wsme.exc.ClientSideError( - _("Cannot delete physical volume: %s from %s. The resulting " - "volume group size would leave an invalid " - "instances_lv_size_mib: %d. The valid range, based on the new " - "volume group size is %d <= instances_lv_size_mib <= %d." % - (ignore_pv['uuid'], lvg.lvm_vg_name, - lvg_caps[constants.LVG_NOVA_PARAM_INST_LV_SZ], - allowed_min_mib, allowed_max_mib))) - - def _check_lvg(op, pv): # semantic check whether idisk is associated ilvgid = pv.get('forilvgid') or pv.get('ilvg_uuid') @@ -645,23 +599,6 @@ def _check_lvg(op, pv): raise wsme.exc.ClientSideError(msg) elif op == "delete": - if (constants.LVG_NOVA_PARAM_BACKING in ilvg.capabilities and - (ilvg.capabilities[constants.LVG_NOVA_PARAM_BACKING] == - constants.LVG_NOVA_BACKING_LVM)): - - # Semantic Check: nova-local: Make sure that VG does not contain - # any instance volumes - if ((ilvg.lvm_vg_name == constants.LVG_NOVA_LOCAL) and - (ilvg.lvm_cur_lv > 1)): - raise wsme.exc.ClientSideError( - _("Can't delete physical volume: %s from %s. Instance " - "logical volumes are present in the volume group. Total " - "= %d. To remove physical volumes you must " - "terminate/migrate all instances associated with this " - "node." % - (pv['uuid'], ilvg.lvm_vg_name, ilvg.lvm_cur_lv - 1))) - - _check_instances_lv_if_deleted(ilvg, pv) # Possible Kubernetes issue, do we want to allow this on compute nodes? if (ilvg.lvm_vg_name == constants.LVG_CGTS_VG): raise wsme.exc.ClientSideError( diff --git a/sysinv/sysinv/sysinv/sysinv/common/constants.py b/sysinv/sysinv/sysinv/sysinv/common/constants.py index 2b9fac847f..d9939c4868 100644 --- a/sysinv/sysinv/sysinv/sysinv/common/constants.py +++ b/sysinv/sysinv/sysinv/sysinv/common/constants.py @@ -549,13 +549,10 @@ PV_NAME_UNKNOWN = 'unknown' # Storage: Volume Group Parameter Types LVG_NOVA_PARAM_BACKING = 'instance_backing' -LVG_NOVA_PARAM_INST_LV_SZ = 'instances_lv_size_mib' -LVG_NOVA_PARAM_INST_LV_SZ_GIB = 'instances_lv_size_gib' LVG_NOVA_PARAM_DISK_OPS = 'concurrent_disk_operations' LVG_CINDER_PARAM_LVM_TYPE = 'lvm_type' # Storage: Volume Group Parameter: Nova: Backing types -LVG_NOVA_BACKING_LVM = 'lvm' LVG_NOVA_BACKING_IMAGE = 'image' LVG_NOVA_BACKING_REMOTE = 'remote' @@ -563,9 +560,6 @@ LVG_NOVA_BACKING_REMOTE = 'remote' LVG_CINDER_LVM_TYPE_THIN = 'thin' LVG_CINDER_LVM_TYPE_THICK = 'thick' -# Storage: Volume Group Parameter: Nova: Instances LV -LVG_NOVA_PARAM_INST_LV_SZ_DEFAULT = 0 - # Storage: Volume Group Parameter: Nova: Concurrent Disk Ops LVG_NOVA_PARAM_DISK_OPS_DEFAULT = 2 @@ -582,8 +576,6 @@ CONTROLLER_AUDIT_REQUESTS = [DISK_AUDIT_REQUEST, # Storage: Host Aggregates Groups HOST_AGG_NAME_REMOTE = 'remote_storage_hosts' HOST_AGG_META_REMOTE = 'remote' -HOST_AGG_NAME_LOCAL_LVM = 'local_storage_lvm_hosts' -HOST_AGG_META_LOCAL_LVM = 'local_lvm' HOST_AGG_NAME_LOCAL_IMAGE = 'local_storage_image_hosts' HOST_AGG_META_LOCAL_IMAGE = 'local_image' diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/openstack.py b/sysinv/sysinv/sysinv/sysinv/conductor/openstack.py index 3fc4eefc30..fa09bf457b 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/openstack.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/openstack.py @@ -324,7 +324,6 @@ class OpenStackOperator(object): nova_aggset_provider.add(aggregate.name) aggset_storage = set([ - constants.HOST_AGG_NAME_LOCAL_LVM, constants.HOST_AGG_NAME_LOCAL_IMAGE, constants.HOST_AGG_NAME_REMOTE]) agglist_missing = list(aggset_storage - nova_aggset_provider) @@ -345,9 +344,7 @@ class OpenStackOperator(object): # Add the metadata try: - if agg_name == constants.HOST_AGG_NAME_LOCAL_LVM: - metadata = {'storage': constants.HOST_AGG_META_LOCAL_LVM} - elif agg_name == constants.HOST_AGG_NAME_LOCAL_IMAGE: + if agg_name == constants.HOST_AGG_NAME_LOCAL_IMAGE: metadata = {'storage': constants.HOST_AGG_META_LOCAL_IMAGE} else: metadata = {'storage': constants.HOST_AGG_META_REMOTE} @@ -405,8 +402,6 @@ class OpenStackOperator(object): agg_add_to = { constants.LVG_NOVA_BACKING_IMAGE: constants.HOST_AGG_NAME_LOCAL_IMAGE, - constants.LVG_NOVA_BACKING_LVM: - constants.HOST_AGG_NAME_LOCAL_LVM, constants.LVG_NOVA_BACKING_REMOTE: constants.HOST_AGG_NAME_REMOTE }.get(lvg_backing) @@ -656,7 +651,6 @@ class OpenStackOperator(object): # setup the valid set of storage aggregates for host removal aggset_storage = set([ - constants.HOST_AGG_NAME_LOCAL_LVM, constants.HOST_AGG_NAME_LOCAL_IMAGE, constants.HOST_AGG_NAME_REMOTE]) diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/nova.py b/sysinv/sysinv/sysinv/sysinv/puppet/nova.py index 7de4972792..ca1e04f6c5 100644 --- a/sysinv/sysinv/sysinv/sysinv/puppet/nova.py +++ b/sysinv/sysinv/sysinv/sysinv/puppet/nova.py @@ -445,7 +445,6 @@ class NovaPuppet(openstack.OpenstackBasePuppet): pvs = self.dbapi.ipv_get_by_ihost(host.id) instance_backing = constants.LVG_NOVA_BACKING_IMAGE - instances_lv_size = constants.LVG_NOVA_PARAM_INST_LV_SZ_DEFAULT concurrent_disk_operations = constants.LVG_NOVA_PARAM_DISK_OPS_DEFAULT final_pvs = [] @@ -480,8 +479,6 @@ class NovaPuppet(openstack.OpenstackBasePuppet): constants.LVG_NOVA_PARAM_BACKING) concurrent_disk_operations = lvg.capabilities.get( constants.LVG_NOVA_PARAM_DISK_OPS) - instances_lv_size = lvg.capabilities.get( - constants.LVG_NOVA_PARAM_INST_LV_SZ) global_filter, update_filter = self._get_lvm_global_filter(host) @@ -492,8 +489,6 @@ class NovaPuppet(openstack.OpenstackBasePuppet): 'openstack::nova::storage::lvm_global_filter': global_filter, 'openstack::nova::storage::lvm_update_filter': update_filter, 'openstack::nova::storage::instance_backing': instance_backing, - 'openstack::nova::storage::instances_lv_size': - "%sm" % instances_lv_size, 'openstack::nova::storage::concurrent_disk_operations': concurrent_disk_operations, }