From c0d0a0360c88c1787d5139a8dd4b2e6205a1a7e9 Mon Sep 17 00:00:00 2001 From: Kristine Bujold Date: Fri, 2 Aug 2019 13:12:25 -0400 Subject: [PATCH] Collapse glance into platform in ControllerFS API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing "platform" filesystem is now resizable and added to the ControllerFS API. The “glance” filesystem is merged into "platform" and therefore removed from the ControllerFS API. The "--force" flag is removed from the controllerfs-modify API as it was only used for glance fs resizing. The folder /opt/cgcs is removed and the “helm_charts” and “keystone” folders now resides under /opt/platform. ls /opt/platform/ armada config helm nfv puppet sysinv ls /opt/cgcs/ helm_charts keystone Resources related to drbd-cgcs and /opt/cgcs are removed from puppet or updated to use drbd-platform and /opt/platform. SM is no longer monitoring resources related to drbd-cgcs. Tested in AIO-SX, AIO-DX and Standard hardware labs. Partial-Bug: 1830142 Change-Id: I0a80c95a057e9d6d2acec5f33cc4da31cd20955e Signed-off-by: Kristine Bujold --- api-ref/source/api-ref-sysinv-v1-config.rst | 8 +- .../controllerconfig/common/constants.py | 10 +-- .../controllerconfig/upgrades/controller.py | 6 +- .../controllerconfig/upgrades/management.py | 10 +-- .../controllerconfig/utils.py | 5 +- .../modules/openstack/manifests/keystone.pp | 16 ++-- .../src/modules/platform/manifests/drbd.pp | 37 ++------ .../src/modules/platform/manifests/helm.pp | 2 +- .../src/modules/platform/manifests/network.pp | 1 - .../src/modules/platform/manifests/sm.pp | 37 +------- .../src/modules/platform/manifests/sysinv.pp | 4 +- sysinv/cgts-client/centos/build_srpm.data | 2 +- .../cgtsclient/v1/controller_fs_shell.py | 11 +-- .../api/controllers/v1/controller_fs.py | 85 +++++------------- .../sysinv/api/controllers/v1/network.py | 1 - .../sysinv/sysinv/sysinv/common/constants.py | 22 ++--- sysinv/sysinv/sysinv/sysinv/common/utils.py | 6 +- .../sysinv/sysinv/sysinv/conductor/manager.py | 89 +++++++++---------- .../sysinv/sysinv/sysinv/puppet/networking.py | 8 -- .../sysinv/sysinv/sysinv/puppet/platform.py | 4 - sysinv/sysinv/sysinv/sysinv/puppet/storage.py | 4 +- 21 files changed, 109 insertions(+), 259 deletions(-) diff --git a/api-ref/source/api-ref-sysinv-v1-config.rst b/api-ref/source/api-ref-sysinv-v1-config.rst index 34d0bf3fb8..0ba295bc0b 100644 --- a/api-ref/source/api-ref-sysinv-v1-config.rst +++ b/api-ref/source/api-ref-sysinv-v1-config.rst @@ -10278,12 +10278,12 @@ itemNotFound (404) "replicated": false, "size": 92 }, { - "logical_volume": "cgcs-lv", + "logical_volume": "platform-lv", "uuid": "d30cc018-9218-403e-a1c2-9a5691a8bffb", "links": [{"href": "http://127.168.204.2:6385/v1/controller_fs/d30cc018-9218-403e-a1c2-9a5691a8bffb", "rel": "self"}, {"href": "http://127.168.204.2:6385/controller_fs/d30cc018-9218-403e-a1c2-9a5691a8bffb", "rel": "bookmark"}], "created_at": "2017-09-14T17:54:15.896408+00:00", "updated_at": "2017-09-14T20:59:53.114344+00:00", - "name": "glance", + "name": "platform", "state": "available", "isystem_uuid": "a5b7f26c-423f-41ed-a660-cd8cff4627eb", "replicated": true, @@ -10501,12 +10501,12 @@ itemNotFound (404) "controller_fs": [ { - "logical_volume": "cgcs-lv", + "logical_volume": "platform-lv", "uuid": "d30cc018-9218-403e-a1c2-9a5691a8bffb", "links": [{"href": "http://127.168.204.2:6385/v1/controller_fs/d30cc018-9218-403e-a1c2-9a5691a8bffb", "rel": "self"}, {"href": "http://127.168.204.2:6385/controller_fs/d30cc018-9218-403e-a1c2-9a5691a8bffb", "rel": "bookmark"}], "created_at": "2017-09-14T17:54:15.896408+00:00", "updated_at": "2017-09-14T20:59:53.114344+00:00", - "name": "glance", + "name": "platform", "state": "available", "isystem_uuid": "a5b7f26c-423f-41ed-a660-cd8cff4627eb", "replicated": true, diff --git a/controllerconfig/controllerconfig/controllerconfig/common/constants.py b/controllerconfig/controllerconfig/controllerconfig/common/constants.py index e2864933aa..48a6f2318b 100644 --- a/controllerconfig/controllerconfig/controllerconfig/common/constants.py +++ b/controllerconfig/controllerconfig/controllerconfig/common/constants.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2018 Wind River Systems, Inc. +# Copyright (c) 2016-2019 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -16,7 +16,7 @@ HIERADATA_WORKDIR = '/tmp/hieradata' HIERADATA_PERMDIR = tsconfig.PUPPET_PATH + 'hieradata' ARMADA_PERMDIR = tsconfig.ARMADA_PATH -HELM_CHARTS_PERMDIR = tsconfig.CGCS_PATH + '/helm_charts' +HELM_CHARTS_PERMDIR = tsconfig.PLATFORM_PATH + '/helm_charts' HELM_OVERRIDES_PERMDIR = tsconfig.HELM_OVERRIDES_PATH KEYRING_WORKDIR = '/tmp/python_keyring' @@ -39,12 +39,8 @@ LINK_MTU_DEFAULT = "1500" CINDER_LVM_THIN = "thin" CINDER_LVM_THICK = "thick" -DEFAULT_CGCS_STOR_SIZE = \ - sysinv_constants.DEFAULT_CGCS_STOR_SIZE DEFAULT_DATABASE_STOR_SIZE = \ sysinv_constants.DEFAULT_DATABASE_STOR_SIZE -DEFAULT_SMALL_CGCS_STOR_SIZE = \ - sysinv_constants.DEFAULT_SMALL_CGCS_STOR_SIZE DEFAULT_SMALL_DATABASE_STOR_SIZE = \ sysinv_constants.DEFAULT_SMALL_DATABASE_STOR_SIZE DEFAULT_SMALL_BACKUP_STOR_SIZE = \ @@ -55,6 +51,8 @@ DEFAULT_VIRTUAL_BACKUP_STOR_SIZE = \ sysinv_constants.DEFAULT_VIRTUAL_BACKUP_STOR_SIZE DEFAULT_EXTENSION_STOR_SIZE = \ sysinv_constants.DEFAULT_EXTENSION_STOR_SIZE +DEFAULT_PLATFORM_STOR_SIZE = \ + sysinv_constants.DEFAULT_PLATFORM_STOR_SIZE SYSTEM_CONFIG_TIMEOUT = 420 SERVICE_ENABLE_TIMEOUT = 180 diff --git a/controllerconfig/controllerconfig/controllerconfig/upgrades/controller.py b/controllerconfig/controllerconfig/controllerconfig/upgrades/controller.py index 632ebc163a..919960663d 100644 --- a/controllerconfig/controllerconfig/controllerconfig/upgrades/controller.py +++ b/controllerconfig/controllerconfig/controllerconfig/upgrades/controller.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2018 Wind River Systems, Inc. +# Copyright (c) 2016-2019 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -34,7 +34,6 @@ from tsconfig.tsconfig import SW_VERSION from tsconfig.tsconfig import PLATFORM_PATH from tsconfig.tsconfig import KEYRING_PATH from tsconfig.tsconfig import PLATFORM_CONF_FILE -from tsconfig.tsconfig import CGCS_PATH from tsconfig.tsconfig import CONFIG_PATH from tsconfig.tsconfig import CONTROLLER_UPGRADE_FLAG from tsconfig.tsconfig import CONTROLLER_UPGRADE_COMPLETE_FLAG @@ -725,8 +724,6 @@ def upgrade_controller(from_release, to_release): # Mount required filesystems from mate controller LOG.info("Mounting filesystems") nfs_mount_filesystem(PLATFORM_PATH) - os.mkdir(CGCS_PATH) - nfs_mount_filesystem(CGCS_PATH) nfs_mount_filesystem(utils.RABBIT_PATH) os.mkdir(POSTGRES_MOUNT_PATH) nfs_mount_filesystem(utils.POSTGRES_PATH, POSTGRES_MOUNT_PATH) @@ -885,7 +882,6 @@ def upgrade_controller(from_release, to_release): # Remove mounts LOG.info("Removing mounts") unmount_filesystem(PLATFORM_PATH) - unmount_filesystem(CGCS_PATH) unmount_filesystem(utils.RABBIT_PATH) unmount_filesystem(POSTGRES_MOUNT_PATH) os.rmdir(POSTGRES_MOUNT_PATH) diff --git a/controllerconfig/controllerconfig/controllerconfig/upgrades/management.py b/controllerconfig/controllerconfig/controllerconfig/upgrades/management.py index 20053d0933..2a73d1ef78 100644 --- a/controllerconfig/controllerconfig/controllerconfig/upgrades/management.py +++ b/controllerconfig/controllerconfig/controllerconfig/upgrades/management.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2015-2016 Wind River Systems, Inc. +# Copyright (c) 2015-2019 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -256,12 +256,12 @@ def abort_upgrade(from_load, to_load, upgrade): os.path.join(utils.POSTGRES_PATH, "upgrade"), os.path.join(utils.POSTGRES_PATH, to_load), os.path.join(utils.RABBIT_PATH, to_load), - os.path.join(tsc.CGCS_PATH, "ironic", to_load), + os.path.join(tsc.PLATFORM_PATH, "ironic", to_load), os.path.join(tsc.PLATFORM_PATH, "nfv/vim", to_load), os.path.join(tsc.PLATFORM_PATH, ".keyring", to_load), os.path.join(tsc.PLATFORM_PATH, "puppet", to_load), os.path.join(tsc.PLATFORM_PATH, "sysinv", to_load), - os.path.join(tsc.CGCS_PATH, "ceilometer", to_load), + os.path.join(tsc.PLATFORM_PATH, "ceilometer", to_load), os.path.join(tsc.CONFIG_PATH, 'upgrades') ] @@ -327,7 +327,7 @@ def complete_upgrade(from_load, to_load): os.path.join(utils.POSTGRES_PATH, "upgrade"), os.path.join(utils.POSTGRES_PATH, from_load), os.path.join(utils.RABBIT_PATH, from_load), - os.path.join(tsc.CGCS_PATH, "ironic", from_load), + os.path.join(tsc.PLATFORM_PATH, "ironic", from_load), os.path.join(tsc.PLATFORM_PATH, "nfv/vim", from_load), os.path.join(tsc.PLATFORM_PATH, ".keyring", from_load), os.path.join(tsc.PLATFORM_PATH, "puppet", from_load), @@ -335,7 +335,7 @@ def complete_upgrade(from_load, to_load): ] upgrade_dirs.append( - os.path.join(tsc.CGCS_PATH, "ceilometer", from_load)) + os.path.join(tsc.PLATFORM_PATH, "ceilometer", from_load)) for directory in upgrade_dirs: try: diff --git a/controllerconfig/controllerconfig/controllerconfig/utils.py b/controllerconfig/controllerconfig/controllerconfig/utils.py index f58e63b3f7..ad82dbcb4a 100644 --- a/controllerconfig/controllerconfig/controllerconfig/utils.py +++ b/controllerconfig/controllerconfig/controllerconfig/utils.py @@ -698,13 +698,10 @@ def shutdown_file_systems(): umount("/var/lib/postgresql") drbd_stop("drbd-pgsql") + stop_service("www-pages-helm_charts.mount") umount("/opt/platform") drbd_stop("drbd-platform") - stop_service("www-pages-helm_charts.mount") - umount("/opt/cgcs") - drbd_stop("drbd-cgcs") - umount("/opt/extension") drbd_stop("drbd-extension") diff --git a/puppet-manifests/src/modules/openstack/manifests/keystone.pp b/puppet-manifests/src/modules/openstack/manifests/keystone.pp index ccccc5da9a..83266e2a76 100644 --- a/puppet-manifests/src/modules/openstack/manifests/keystone.pp +++ b/puppet-manifests/src/modules/openstack/manifests/keystone.pp @@ -34,9 +34,9 @@ class openstack::keystone ( $::platform::params::distributed_cloud_role == 'subcloud') { include ::platform::amqp::params include ::platform::network::mgmt::params - include ::platform::drbd::cgcs::params + include ::platform::drbd::platform::params - $keystone_key_repo_path = "${::platform::drbd::cgcs::params::mountpoint}/keystone" + $keystone_key_repo_path = "${::platform::drbd::platform::params::mountpoint}/keystone" $eng_workers = $::platform::params::eng_workers # FIXME(mpeters): binding to wildcard address to allow bootstrap transition @@ -196,9 +196,9 @@ class openstack::keystone::bootstrap( ) { include ::platform::params include ::platform::amqp::params - include ::platform::drbd::cgcs::params + include ::platform::drbd::platform::params - $keystone_key_repo_path = "${::platform::drbd::cgcs::params::mountpoint}/keystone" + $keystone_key_repo_path = "${::platform::drbd::platform::params::mountpoint}/keystone" $eng_workers = $::platform::params::eng_workers $bind_host = '[::]' @@ -223,7 +223,7 @@ class openstack::keystone::bootstrap( owner => 'root', group => 'root', mode => '0755', - require => Class['::platform::drbd::cgcs'], + require => Class['::platform::drbd::platform'], } -> file { '/etc/keystone/keystone-extra.conf': ensure => present, @@ -407,18 +407,18 @@ class openstack::keystone::upgrade ( include ::platform::params include ::platform::amqp::params include ::platform::network::mgmt::params - include ::platform::drbd::cgcs::params + include ::platform::drbd::platform::params # the unit address is actually the configured default of the loopback address. $bind_host = $::platform::network::mgmt::params::controller0_address $eng_workers = $::platform::params::eng_workers - $keystone_key_repo = "${::platform::drbd::cgcs::params::mountpoint}/keystone" + $keystone_key_repo = "${::platform::drbd::platform::params::mountpoint}/keystone" # TODO(aning): For R5->R6 upgrade, a local keystone fernet keys repository may # need to be setup for the local keystone instance on standby controller to # service specific upgrade operations, since we need to keep the keys repository - # in /opt/cgcs/keystone/fernet-keys intact so that service won't fail on active + # in /opt/platform/keystone/fernet-keys intact so that service won't fail on active # controller during upgrade. Once the upgade finishes, the temparary local # fernet keys repository will be deleted. diff --git a/puppet-manifests/src/modules/platform/manifests/drbd.pp b/puppet-manifests/src/modules/platform/manifests/drbd.pp index 15c3fe32a5..2420e09812 100644 --- a/puppet-manifests/src/modules/platform/manifests/drbd.pp +++ b/puppet-manifests/src/modules/platform/manifests/drbd.pp @@ -170,7 +170,7 @@ class platform::drbd::rabbit () class platform::drbd::platform::params ( $device = '/dev/drbd2', $lv_name = 'platform-lv', - $lv_size = '2', + $lv_size = '10', $mountpoint = '/opt/platform', $port = '7790', $vg_name = 'cgts-vg', @@ -192,31 +192,6 @@ class platform::drbd::platform () } -class platform::drbd::cgcs::params ( - $device = '/dev/drbd3', - $lv_name = 'cgcs-lv', - $lv_size = '2', - $mountpoint = '/opt/cgcs', - $port = '7791', - $resource_name = 'drbd-cgcs', - $vg_name = 'cgts-vg', -) {} - -class platform::drbd::cgcs () - inherits ::platform::drbd::cgcs::params { - - platform::drbd::filesystem { $resource_name: - vg_name => $vg_name, - lv_name => $lv_name, - lv_size => $lv_size, - port => $port, - device => $device, - mountpoint => $mountpoint, - resync_after => 'drbd-platform', - } -} - - class platform::drbd::extension::params ( $device = '/dev/drbd5', $lv_name = 'extension-lv', @@ -231,10 +206,10 @@ class platform::drbd::extension ( ) inherits ::platform::drbd::extension::params { include ::platform::params - include ::platform::drbd::cgcs::params + include ::platform::drbd::platform::params if str2bool($::is_primary_disk_rotational) { - $resync_after = $::platform::drbd::cgcs::params::resource_name + $resync_after = $::platform::drbd::platform::params::resource_name } else { $resync_after = undef } @@ -499,7 +474,6 @@ class platform::drbd( include ::platform::drbd::pgsql include ::platform::drbd::rabbit include ::platform::drbd::platform - include ::platform::drbd::cgcs include ::platform::drbd::extension include ::platform::drbd::patch_vault include ::platform::drbd::etcd @@ -530,7 +504,6 @@ class platform::drbd::bootstrap { include ::platform::drbd::pgsql include ::platform::drbd::rabbit include ::platform::drbd::platform - include ::platform::drbd::cgcs include ::platform::drbd::extension } @@ -558,10 +531,10 @@ class platform::drbd::pgsql::runtime { } -class platform::drbd::cgcs::runtime { +class platform::drbd::platform::runtime { include ::platform::drbd::params include ::platform::drbd::runtime_service_enable - include ::platform::drbd::cgcs + include ::platform::drbd::platform } diff --git a/puppet-manifests/src/modules/platform/manifests/helm.pp b/puppet-manifests/src/modules/platform/manifests/helm.pp index ab44c1aa59..cf39b4aa85 100644 --- a/puppet-manifests/src/modules/platform/manifests/helm.pp +++ b/puppet-manifests/src/modules/platform/manifests/helm.pp @@ -1,5 +1,5 @@ class platform::helm::repositories::params( - $source_helm_repos_base_dir = '/opt/cgcs/helm_charts', + $source_helm_repos_base_dir = '/opt/platform/helm_charts', $target_helm_repos_base_dir = '/www/pages/helm_charts', $helm_repositories = [ 'stx-platform', 'starlingx' ], ) {} diff --git a/puppet-manifests/src/modules/platform/manifests/network.pp b/puppet-manifests/src/modules/platform/manifests/network.pp index e67e24e1f0..5b945216ab 100644 --- a/puppet-manifests/src/modules/platform/manifests/network.pp +++ b/puppet-manifests/src/modules/platform/manifests/network.pp @@ -39,7 +39,6 @@ class platform::network::mgmt::params( $mtu = 1500, # network type specific parameters $platform_nfs_address = undef, - $cgcs_nfs_address = undef, ) { } class platform::network::oam::params( diff --git a/puppet-manifests/src/modules/platform/manifests/sm.pp b/puppet-manifests/src/modules/platform/manifests/sm.pp index 3cfbfe46bd..ee5db3ab15 100644 --- a/puppet-manifests/src/modules/platform/manifests/sm.pp +++ b/puppet-manifests/src/modules/platform/manifests/sm.pp @@ -46,11 +46,6 @@ class platform::sm $ironic_ip_param_ip = $::platform::network::ironic::params::controller_address $ironic_ip_param_mask = $::platform::network::ironic::params::subnet_prefixlen - include ::platform::drbd::cgcs::params - $cgcs_drbd_resource = $::platform::drbd::cgcs::params::resource_name - $cgcs_fs_device = $::platform::drbd::cgcs::params::device - $cgcs_fs_directory = $::platform::drbd::cgcs::params::mountpoint - include ::platform::drbd::pgsql::params $pg_drbd_resource = $::platform::drbd::pgsql::params::resource_name $pg_fs_device = $::platform::drbd::pgsql::params::device @@ -130,18 +125,12 @@ class platform::sm $platform_nfs_ip_param_mask = $::platform::network::mgmt::params::subnet_prefixlen $platform_nfs_ip_network_url = $::platform::network::mgmt::params::subnet_network_url - # CGCS NFS network is over the management network - $cgcs_nfs_ip_interface = $::platform::network::mgmt::params::interface_name - $cgcs_nfs_ip_param_ip = $::platform::network::mgmt::params::cgcs_nfs_address - $cgcs_nfs_ip_network_url = $::platform::network::mgmt::params::subnet_network_url - $cgcs_nfs_ip_param_mask = $::platform::network::mgmt::params::subnet_prefixlen $platform_nfs_subnet_url = "${platform_nfs_ip_network_url}/${platform_nfs_ip_param_mask}" - $cgcs_nfs_subnet_url = "${cgcs_nfs_ip_network_url}/${cgcs_nfs_ip_param_mask}" # lint:ignore:140chars - $nfs_server_mgmt_exports = "${cgcs_nfs_subnet_url}:${cgcs_fs_directory},${platform_nfs_subnet_url}:${platform_fs_directory},${platform_nfs_subnet_url}:${extension_fs_directory}" - $nfs_server_mgmt_mounts = "${cgcs_fs_device}:${cgcs_fs_directory},${platform_fs_device}:${platform_fs_directory},${extension_fs_device}:${extension_fs_directory}" + $nfs_server_mgmt_exports = "${platform_nfs_subnet_url}:${platform_fs_directory},${platform_nfs_subnet_url}:${extension_fs_directory}" + $nfs_server_mgmt_mounts = "${platform_fs_device}:${platform_fs_directory},${extension_fs_device}:${extension_fs_directory}" # lint:endignore:140chars ################## Openstack Parameters ###################### @@ -367,18 +356,6 @@ class platform::sm command => "sm-configure service_instance dockerdistribution-fs dockerdistribution-fs \"device=${dockerdistribution_fs_device},directory=${dockerdistribution_fs_directory},options=noatime,nodiratime,fstype=ext4,check_level=20\"", } - exec { 'Configure CGCS DRBD': - command => "sm-configure service_instance drbd-cgcs drbd-cgcs:${hostunit} drbd_resource=${cgcs_drbd_resource}", - } - - exec { 'Configure CGCS FileSystem': - command => "sm-configure service_instance cgcs-fs cgcs-fs \"device=${cgcs_fs_device},directory=${cgcs_fs_directory},options=noatime,nodiratime,fstype=ext4,check_level=20\"", - } - - exec { 'Configure CGCS Export FileSystem': - command => "sm-configure service_instance cgcs-export-fs cgcs-export-fs \"fsid=1,directory=${cgcs_fs_directory},options=rw,sync,no_root_squash,no_subtree_check,clientspec=${cgcs_nfs_subnet_url},unlock_on_stop=true\"", - } - exec { 'Configure Extension DRBD': command => "sm-configure service_instance drbd-extension drbd-extension:${hostunit} \"drbd_resource=${extension_drbd_resource}\"", } @@ -420,16 +397,6 @@ class platform::sm command => "sm-configure service_instance etcd-fs etcd-fs \"device=${etcd_fs_device},directory=${etcd_fs_directory},options=noatime,nodiratime,fstype=ext4,check_level=20\"", } - if $system_mode == 'duplex-direct' or $system_mode == 'simplex' { - exec { 'Configure CGCS NFS': - command => "sm-configure service_instance cgcs-nfs-ip cgcs-nfs-ip \"ip=${cgcs_nfs_ip_param_ip},cidr_netmask=${cgcs_nfs_ip_param_mask},nic=${cgcs_nfs_ip_interface},arp_count=7,dc=yes\"", - } - } else { - exec { 'Configure CGCS NFS': - command => "sm-configure service_instance cgcs-nfs-ip cgcs-nfs-ip \"ip=${cgcs_nfs_ip_param_ip},cidr_netmask=${cgcs_nfs_ip_param_mask},nic=${cgcs_nfs_ip_interface},arp_count=7\"", - } - } - # TODO: region code needs to be revisited if $region_config { # In a default Multi-Region configuration, Keystone is running as a diff --git a/puppet-manifests/src/modules/platform/manifests/sysinv.pp b/puppet-manifests/src/modules/platform/manifests/sysinv.pp index c2c1178add..be6b34d04d 100644 --- a/puppet-manifests/src/modules/platform/manifests/sysinv.pp +++ b/puppet-manifests/src/modules/platform/manifests/sysinv.pp @@ -12,12 +12,12 @@ class platform::sysinv include ::platform::params include ::platform::amqp::params - include ::platform::drbd::cgcs::params + include ::platform::drbd::platform::params # sysinv-agent is started on all hosts include ::sysinv::agent - $keystone_key_repo_path = "${::platform::drbd::cgcs::params::mountpoint}/keystone" + $keystone_key_repo_path = "${::platform::drbd::platform::params::mountpoint}/keystone" group { 'sysinv': ensure => 'present', diff --git a/sysinv/cgts-client/centos/build_srpm.data b/sysinv/cgts-client/centos/build_srpm.data index 6c18c584d7..ea8903d452 100644 --- a/sysinv/cgts-client/centos/build_srpm.data +++ b/sysinv/cgts-client/centos/build_srpm.data @@ -1,2 +1,2 @@ SRC_DIR="cgts-client" -TIS_PATCH_VER=69 +TIS_PATCH_VER=70 diff --git a/sysinv/cgts-client/cgts-client/cgtsclient/v1/controller_fs_shell.py b/sysinv/cgts-client/cgts-client/cgtsclient/v1/controller_fs_shell.py index 5c33518e7d..6c693892fe 100644 --- a/sysinv/cgts-client/cgts-client/cgtsclient/v1/controller_fs_shell.py +++ b/sysinv/cgts-client/cgts-client/cgtsclient/v1/controller_fs_shell.py @@ -40,10 +40,6 @@ def _print_controller_fs_show(controller_fs): action='append', default=[], help="Modify controller filesystem sizes") -@utils.arg('-f', '--force', - action='store_true', - default=False, - help="Force the resize operation ") def do_controllerfs_modify(cc, args): """Modify controller filesystem sizes.""" @@ -58,14 +54,9 @@ def do_controllerfs_modify(cc, args): except ValueError: raise exc.CommandError('Attributes must be a list of ' 'FS_NAME=SIZE not "%s"' % attr) - if args.force is True: - patch_list.append([{'op': 'replace', - 'path': '/action', - 'value': 'force_action'}]) try: - controller_fs = cc.controller_fs.update_many(cc.isystem.list()[0].uuid, - patch_list) + cc.controller_fs.update_many(cc.isystem.list()[0].uuid, patch_list) except exc.HTTPNotFound: raise exc.CommandError('Failed to modify controller filesystems') diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py index 42993bfee1..ef1e080732 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py @@ -41,8 +41,6 @@ from sysinv import objects from sysinv.openstack.common import log from sysinv.openstack.common.gettextutils import _ -from sysinv.common.storage_backend_conf import StorageBackendConfig - LOG = log.getLogger(__name__) @@ -59,12 +57,6 @@ class ControllerFs(base.APIBase): between the internal object model and the API representation of a ControllerFs. - The database GiB of controller_fs - maps to - /var/lib/postgresql (pgsql-lv) - The image GiB of controller_fs - maps to - /opt/cgcs (cgcs-lv) - The extension GiB of controller_fs - maps to - /opt/extension (extension-lv) """ uuid = types.uuid @@ -122,10 +114,6 @@ class ControllerFs(base.APIBase): # never expose the isystem_id attribute controller_fs.isystem_id = wtypes.Unset - # we display the cgcs file system as glance to the customer - if controller_fs.name == constants.FILESYSTEM_NAME_CGCS: - controller_fs.name = constants.FILESYSTEM_DISPLAY_NAME_CGCS - # never expose the isystem_id attribute, allow exposure for now # controller_fs.forisystemid = wtypes.Unset controller_fs.links = [ @@ -200,14 +188,14 @@ def _check_relative_controller_multi_fs(controller_fs_new_list): :return: None. Raise Client exception on failure. """ - backup_gib_min = constants.BACKUP_OVERHEAD - chosts = pecan.request.dbapi.ihost_get_by_personality(constants.CONTROLLER) for chost in chosts: # Get the current backup size for the controller host backup_gib = 0 + backup_gib_min = constants.BACKUP_OVERHEAD + hostfs_list = pecan.request.dbapi.host_fs_get_by_ihost(chost.uuid) for host_fs in hostfs_list: if host_fs['name'] == constants.FILESYSTEM_NAME_BACKUP: @@ -218,8 +206,8 @@ def _check_relative_controller_multi_fs(controller_fs_new_list): if fs.name == constants.FILESYSTEM_NAME_DATABASE: database_gib = fs.size backup_gib_min += fs.size - elif fs.name == constants.FILESYSTEM_NAME_CGCS: - cgcs_gib = fs.size + elif fs.name == constants.FILESYSTEM_NAME_PLATFORM: + platform_gib = fs.size backup_gib_min += fs.size LOG.info( @@ -229,14 +217,14 @@ def _check_relative_controller_multi_fs(controller_fs_new_list): raise wsme.exc.ClientSideError(_("backup size of %d is " "insufficient for host %s. " "Minimum backup size of %d is " - "required based upon glance size %d " + "required based upon platform size %d " "and database size %d. " "Rejecting modification " "request." % (backup_gib, chost.hostname, backup_gib_min, - cgcs_gib, + platform_gib, database_gib ))) @@ -274,7 +262,7 @@ def _check_controller_multi_fs(controller_fs_new_list, if ceph_mon_gib_new: msg = _( "Total target growth size %s GiB for database " - "(doubled for upgrades), glance, " + "(doubled for upgrades), platform, " "scratch, backup, extension and ceph-mon exceeds " "growth limit of %s GiB." % (cgtsvg_growth_gib, cgtsvg_max_free_GiB) @@ -282,7 +270,7 @@ def _check_controller_multi_fs(controller_fs_new_list, else: msg = _( "Total target growth size %s GiB for database " - "(doubled for upgrades), glance, scratch, " + "(doubled for upgrades), platform, scratch, " "backup and extension exceeds growth limit of %s GiB." % (cgtsvg_growth_gib, cgtsvg_max_free_GiB) ) @@ -298,7 +286,7 @@ def _check_relative_controller_fs(controller_fs_new, controller_fs_list): """ database_gib = 0 - cgcs_gib = 0 + platform_gib = 0 chosts = pecan.request.dbapi.ihost_get_by_personality( constants.CONTROLLER) @@ -316,8 +304,8 @@ def _check_relative_controller_fs(controller_fs_new, controller_fs_list): if controller_fs_new and fs['name'] == controller_fs_new['name']: fs['size'] = controller_fs_new['size'] - if fs['name'] == constants.DRBD_CGCS: - cgcs_gib = fs['size'] + if fs['name'] == constants.FILESYSTEM_NAME_PLATFORM: + platform_gib = fs['size'] elif fs['name'] == constants.FILESYSTEM_NAME_DATABASE: database_gib = fs['size'] @@ -327,21 +315,21 @@ def _check_relative_controller_fs(controller_fs_new, controller_fs_list): return # Required mininum backup filesystem size - backup_gib_min = cgcs_gib + database_gib + constants.BACKUP_OVERHEAD + backup_gib_min = platform_gib + database_gib + constants.BACKUP_OVERHEAD if backup_gib < backup_gib_min: raise wsme.exc.ClientSideError(_("backup size of %d is " "insufficient for host %s. " "Minimum backup size of %d is " "required based on upon " - "glance=%d and database=%d and " + "platform=%d and database=%d and " "backup overhead of %d. " "Rejecting modification " "request." % (backup_gib, chost.hostname, backup_gib_min, - cgcs_gib, + platform_gib, database_gib, constants.BACKUP_OVERHEAD ))) @@ -459,7 +447,7 @@ def _check_controller_multi_fs_data(context, controller_fs_list_new): cgtsvg_growth_gib = 0 lvdisplay_keys = [constants.FILESYSTEM_LV_DICT[constants.FILESYSTEM_NAME_DATABASE], - constants.FILESYSTEM_LV_DICT[constants.FILESYSTEM_NAME_CGCS]] + constants.FILESYSTEM_LV_DICT[constants.FILESYSTEM_NAME_PLATFORM]] lvdisplay_dict = pecan.request.rpcapi.get_controllerfs_lv_sizes(context) @@ -601,57 +589,28 @@ class ControllerFsController(rest.RestController): reinstall_required = False reboot_required = False - force_resize = False modified_fs = [] - for p_list in patch: - p_obj_list = jsonpatch.JsonPatch(p_list) - - for p_obj in p_obj_list: - if p_obj['path'] == '/action': - value = p_obj['value'] - patch.remove(p_list) - if value == constants.FORCE_ACTION: - force_resize = True - LOG.info("Force action resize selected") - break - for p_list in patch: p_obj_list = jsonpatch.JsonPatch(p_list) for p_obj in p_obj_list: if p_obj['path'] == '/name': - fs_display_name = p_obj['value'] - if fs_display_name == constants.FILESYSTEM_DISPLAY_NAME_CGCS: - fs_name = constants.FILESYSTEM_NAME_CGCS - else: - fs_name = fs_display_name + fs_name = p_obj['value'] elif p_obj['path'] == '/size': size = p_obj['value'] - if fs_name not in valid_fs_list.keys() or fs_display_name == constants.FILESYSTEM_NAME_CGCS: + if fs_name not in valid_fs_list.keys(): msg = _("ControllerFs update failed: invalid filesystem " - "'%s' " % fs_display_name) + "'%s' " % fs_name) raise wsme.exc.ClientSideError(msg) elif not cutils.is_int_like(size): msg = _("ControllerFs update failed: filesystem '%s' " - "size must be an integer " % fs_display_name) + "size must be an integer " % fs_name) raise wsme.exc.ClientSideError(msg) elif int(size) <= int(valid_fs_list[fs_name]): msg = _("ControllerFs update failed: size for filesystem '%s' " - "should be bigger than %s " % ( - fs_display_name, valid_fs_list[fs_name])) + "should be bigger than %s " % (fs_name, valid_fs_list[fs_name])) raise wsme.exc.ClientSideError(msg) - elif (fs_name == constants.FILESYSTEM_NAME_CGCS and - StorageBackendConfig.get_backend(pecan.request.dbapi, - constants.CINDER_BACKEND_CEPH)): - if force_resize: - LOG.warn("Force resize ControllerFs: %s, though Ceph " - "storage backend is configured" % fs_display_name) - else: - raise wsme.exc.ClientSideError( - _("ControllerFs %s size is not modifiable as Ceph is " - "configured. Update size via Ceph Storage Pools." % - fs_display_name)) if fs_name in constants.SUPPORTED_REPLICATED_FILEYSTEM_LIST: if utils.is_drbd_fs_resizing(): @@ -668,10 +627,6 @@ class ControllerFsController(rest.RestController): for p_list in patch: p_obj_list = jsonpatch.JsonPatch(p_list) for p_obj in p_obj_list: - if p_obj['path'] == '/name': - if p_obj['value'] == constants.FILESYSTEM_DISPLAY_NAME_CGCS: - p_obj['value'] = constants.FILESYSTEM_NAME_CGCS - if p_obj['value'] == fs['name']: try: controller_fs_list_new += [ControllerFs( diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/network.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/network.py index 5fc3518219..f3da57f263 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/network.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/network.py @@ -197,7 +197,6 @@ class NetworkController(rest.RestController): addresses[constants.CONTROLLER_0_HOSTNAME] = None addresses[constants.CONTROLLER_1_HOSTNAME] = None addresses[constants.CONTROLLER_PLATFORM_NFS] = None - addresses[constants.CONTROLLER_CGCS_NFS] = None if pool.gateway_address is not None: if utils.get_distributed_cloud_role() == \ diff --git a/sysinv/sysinv/sysinv/sysinv/common/constants.py b/sysinv/sysinv/sysinv/sysinv/common/constants.py index 547974b59c..7536863f8e 100644 --- a/sysinv/sysinv/sysinv/sysinv/common/constants.py +++ b/sysinv/sysinv/sysinv/sysinv/common/constants.py @@ -154,7 +154,6 @@ CONTROLLER_0_HOSTNAME = '%s-0' % CONTROLLER_HOSTNAME CONTROLLER_1_HOSTNAME = '%s-1' % CONTROLLER_HOSTNAME CONTROLLER_GATEWAY = '%s-gateway' % CONTROLLER_HOSTNAME CONTROLLER_PLATFORM_NFS = '%s-platform-nfs' % CONTROLLER_HOSTNAME -CONTROLLER_CGCS_NFS = '%s-nfs' % CONTROLLER_HOSTNAME CONTROLLER_CINDER = '%s-cinder' % CONTROLLER_HOSTNAME CONTROLLER_0_MGMT = '%s-mgmt' % CONTROLLER_0_HOSTNAME @@ -283,11 +282,10 @@ VSWITCH_TYPE_NUAGE_VRS = "nuage_vrs" VSWITCH_TYPE_NONE = "none" # Partition default sizes -DEFAULT_CGCS_STOR_SIZE = 20 +DEFAULT_PLATFORM_STOR_SIZE = 10 DEFAULT_DOCKER_STOR_SIZE = 1 DEFAULT_DOCKER_DISTRIBUTION_STOR_SIZE = 1 DEFAULT_DATABASE_STOR_SIZE = 20 -DEFAULT_SMALL_CGCS_STOR_SIZE = 10 DEFAULT_SMALL_DATABASE_STOR_SIZE = 10 DEFAULT_SMALL_BACKUP_STOR_SIZE = 40 DEFAULT_VIRTUAL_DATABASE_STOR_SIZE = 5 @@ -300,13 +298,12 @@ DEFAULT_ETCD_STORE_SIZE = 1 DEFAULT_SMALL_DISK_SIZE = 240 # The minimum disk size needed to create all partitions # Value based on the following calculation: -# DEFAULT_SMALL_CGCS_STOR_SIZE 10 # 2*DEFAULT_SMALL_DATABASE_STOR_SIZE 20 (2*10) # DEFAULT_SMALL_BACKUP_STOR_SIZE 40 # LOG_VOL_SIZE (reserved in kickstarts) 8 # SCRATCH_VOL_SIZE (reserved in kickstarts) 8 # RABBIT_LV 2 -# PLATFORM_LV 2 +# PLATFORM_LV 10 # ANCHOR_LV 1 # DEFAULT_EXTENSION_STOR_SIZE 1 # KUBERNETES_DOCKER_STOR_SIZE (--kubernetes) 30 @@ -318,8 +315,8 @@ DEFAULT_SMALL_DISK_SIZE = 240 # boot partition (created in kickstarts) 1 # buffer for partition creation 1 # ------------------------------------------------------- -# 186 -MINIMUM_DISK_SIZE = 186 +# 184 +MINIMUM_DISK_SIZE = 184 KUBERNETES_DOCKER_STOR_SIZE = 30 DOCKER_DISTRIBUTION_STOR_SIZE = 16 @@ -431,7 +428,7 @@ SB_TIER_STATUS_IN_USE = 'in-use' SB_TYPE_CEPH_CONF_FILENAME = "ceph.conf" # Glance images path when it is file backended -GLANCE_IMAGE_PATH = tsc.CGCS_PATH + "/" + SB_SVC_GLANCE + "/images" +GLANCE_IMAGE_PATH = tsc.PLATFORM_PATH + "/" + SB_SVC_GLANCE + "/images" # Path for Ceph (internal and external) config files CEPH_CONF_PATH = "/etc/ceph/" @@ -490,8 +487,8 @@ CONTROLLER_FS_RESIZING_IN_PROGRESS = 'drbd_fs_resizing_in_progress' CONTROLLER_FS_AVAILABLE = 'available' # DRBD File Systems +DRBD_PLATFORM = 'platform' DRBD_PGSQL = 'pgsql' -DRBD_CGCS = 'cgcs' DRBD_EXTENSION = 'extension' DRBD_PATCH_VAULT = 'patch-vault' DRBD_ETCD = 'etcd' @@ -499,8 +496,7 @@ DRBD_DOCKER_DISTRIBUTION = 'docker-distribution' # File system names FILESYSTEM_NAME_BACKUP = 'backup' -FILESYSTEM_NAME_CGCS = 'cgcs' -FILESYSTEM_DISPLAY_NAME_CGCS = 'glance' +FILESYSTEM_NAME_PLATFORM = 'platform' FILESYSTEM_NAME_CINDER = 'cinder' FILESYSTEM_NAME_DATABASE = 'database' FILESYSTEM_NAME_SCRATCH = 'scratch' @@ -512,7 +508,7 @@ FILESYSTEM_NAME_PATCH_VAULT = 'patch-vault' FILESYSTEM_NAME_KUBELET = 'kubelet' FILESYSTEM_LV_DICT = { - FILESYSTEM_NAME_CGCS: 'cgcs-lv', + FILESYSTEM_NAME_PLATFORM: 'platform-lv', FILESYSTEM_NAME_BACKUP: 'backup-lv', FILESYSTEM_NAME_SCRATCH: 'scratch-lv', FILESYSTEM_NAME_DOCKER: 'docker-lv', @@ -552,7 +548,7 @@ FILESYSTEM_HOSTS_SUPPORTED_LIST_DICT = { SUPPORTED_LOGICAL_VOLUME_LIST = FILESYSTEM_LV_DICT.values() SUPPORTED_REPLICATED_FILEYSTEM_LIST = [ - FILESYSTEM_NAME_CGCS, + FILESYSTEM_NAME_PLATFORM, FILESYSTEM_NAME_DATABASE, FILESYSTEM_NAME_EXTENSION, FILESYSTEM_NAME_PATCH_VAULT, diff --git a/sysinv/sysinv/sysinv/sysinv/common/utils.py b/sysinv/sysinv/sysinv/sysinv/common/utils.py index 8756cfc7cf..45b2713c03 100644 --- a/sysinv/sysinv/sysinv/sysinv/common/utils.py +++ b/sysinv/sysinv/sysinv/sysinv/common/utils.py @@ -1660,8 +1660,8 @@ def get_default_controller_fs_backup_size(rootfs_device): database_storage = constants.DEFAULT_DATABASE_STOR_SIZE - cgcs_lv_size = constants.DEFAULT_CGCS_STOR_SIZE - backup_lv_size = database_storage + cgcs_lv_size + \ + platform_lv_size = constants.DEFAULT_PLATFORM_STOR_SIZE + backup_lv_size = database_storage + platform_lv_size + \ constants.BACKUP_OVERHEAD elif disk_size >= constants.MINIMUM_DISK_SIZE: @@ -1670,7 +1670,7 @@ def get_default_controller_fs_backup_size(rootfs_device): (rootfs_device, disk_size)) # Due to the small size of the disk we can't provide the - # proper amount of backup space which is (database + cgcs_lv + # proper amount of backup space which is (database + platform_lv # + BACKUP_OVERHEAD) so we are using a smaller default. backup_lv_size = constants.DEFAULT_SMALL_BACKUP_STOR_SIZE diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py index 771916f9a1..45d868ee25 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py @@ -5463,8 +5463,8 @@ class ConductorManager(service.PeriodicService): 'platform::drbd::dockerdistribution::runtime', constants.FILESYSTEM_NAME_DATABASE: 'platform::drbd::pgsql::runtime', - constants.FILESYSTEM_NAME_CGCS: - 'platform::drbd::cgcs::runtime', + constants.FILESYSTEM_NAME_PLATFORM: + 'platform::drbd::platform::runtime', constants.FILESYSTEM_NAME_EXTENSION: 'platform::drbd::extension::runtime', constants.FILESYSTEM_NAME_PATCH_VAULT: @@ -6739,7 +6739,6 @@ class ConductorManager(service.PeriodicService): :param rootfs_device: the root disk device """ database_storage = 0 - cgcs_lv_size = 0 # Add the extension storage extension_lv_size = constants.DEFAULT_EXTENSION_STOR_SIZE @@ -6761,25 +6760,23 @@ class ConductorManager(service.PeriodicService): # Min size of the cgts-vg PV is: # 202.0 G - PV for cgts-vg (specified in the kickstart) # or - # 210.0 G - (for DCSC non-AIO) + # 198.0 G - (for DCSC non-AIO) # 8 G - /var/log (reserved in kickstart) # 8 G - /scratch (reserved in kickstart) - # 2 G - cgcs_lv (DRBD bootstrap manifest) # 2 G - pgsql_lv (DRBD bootstrap manifest) # 2 G - rabbit_lv (DRBD bootstrap manifest) - # 2 G - platform_lv (DRBD bootstrap manifest) + # 10 G - platform_lv (DRBD bootstrap manifest) # 1 G - extension_lv (DRBD bootstrap manifest) # ----- - # 25 G - cgts-vg contents when we get to these checks + # 31 G - cgts-vg contents when we get to these checks # # # Final defaults view after controller manifests # 8 G - /var/log (reserved in kickstart) # 8 G - /scratch (reserved in kickstart) - # 20 G - /opt/cgcs # 40 G - /var/lib/postgresql # 2 G - /var/lib/rabbitmq - # 2 G - /opt/platform + # 10 G - /opt/platform # 1 G - /opt/extension # 50 G - /opt/backup # 30 G - /var/lib/docker (--kubernetes) @@ -6789,17 +6786,17 @@ class ConductorManager(service.PeriodicService): # 8 G - /opt/patch-vault (DRBD ctlr manifest for # Distributed Cloud System Controller non-AIO only) # ----- - # 210 G (for DCSC non-AIO) or 202 + # 198 G (for DCSC non-AIO) or 202 # # The absolute minimum disk size for these default settings: # 0.5 G - /boot # 20.0 G - / # 202.0 G - cgts-vg PV - # or 210.0 G - (DCSC non-AIO) + # or 198.0 G - (DCSC non-AIO) # ------- # 222.5 G => ~223G min size disk # or - # 230.5 G => ~231G min size disk + # 218.5 G => ~219G min size disk # # If required disk is size 500G: # 1) Standard controller - will use all free space for the PV @@ -6815,8 +6812,6 @@ class ConductorManager(service.PeriodicService): # database_storage = constants.DEFAULT_DATABASE_STOR_SIZE - cgcs_lv_size = constants.DEFAULT_CGCS_STOR_SIZE - elif disk_size >= constants.MINIMUM_DISK_SIZE: LOG.info("Disk size : %s ... small disk defaults" % disk_size) @@ -6826,25 +6821,23 @@ class ConductorManager(service.PeriodicService): # Min size of the cgts-vg PV is: # 170.0 G - PV for cgts-vg (specified in the kickstart) # or - # 162.0 G - (for DCSC non-AIO) + # 168.0 G - (for DCSC non-AIO) # 8 G - /var/log (reserved in kickstart) # 8 G - /scratch (reserved in kickstart) - # 2 G - cgcs_lv (DRBD bootstrap manifest) # 2 G - pgsql_lv (DRBD bootstrap manifest) # 2 G - rabbit_lv (DRBD bootstrap manifest) - # 2 G - platform_lv (DRBD bootstrap manifest) + # 10 G - platform_lv (DRBD bootstrap manifest) # 1 G - extension_lv (DRBD bootstrap manifest) # ----- - # 25 G - cgts-vg contents when we get to these checks + # 31 G - cgts-vg contents when we get to these checks # # # Final defaults view after controller manifests # 8 G - /var/log (reserved in kickstart) # 8 G - /scratch (reserved in kickstart) - # 10 G - /opt/cgcs # 20 G - /var/lib/postgresql # 2 G - /var/lib/rabbitmq - # 2 G - /opt/platform + # 10 G - /opt/platform # 1 G - /opt/extension # 40 G - /opt/backup # 30 G - /var/lib/docker (--kubernetes) @@ -6853,18 +6846,18 @@ class ConductorManager(service.PeriodicService): # 5 G - /opt/etcd (--kubernetes) # 8 G - /opt/patch-vault (DRBD ctlr manifest for DCSC non-AIO only) # ----- - # 170 G (for DCSC non-AIO) or 162 G + # 168 G (for DCSC non-AIO) or 170 G # # The absolute minimum disk size for these default settings: # 0.5 G - /boot # 20.0 G - / # 162.0 G - cgts-vg PV # or - # 170.0 G - (for DCSC non-AIO) + # 168.0 G - (for DCSC non-AIO) # ------- # 182.5 G => ~183G min size disk # or - # 190.5 G => ~191G min size disk + # 188.5 G => ~189G min size disk # # If required disk is size 240G: # 1) Standard controller - will use all free space for the PV @@ -6880,17 +6873,15 @@ class ConductorManager(service.PeriodicService): database_storage = \ constants.DEFAULT_SMALL_DATABASE_STOR_SIZE - cgcs_lv_size = constants.DEFAULT_SMALL_CGCS_STOR_SIZE - else: LOG.info("Disk size : %s ... disk too small" % disk_size) raise exception.SysinvException("Disk size requirements not met.") data = { - 'name': constants.FILESYSTEM_NAME_CGCS, - 'size': cgcs_lv_size, + 'name': constants.FILESYSTEM_NAME_PLATFORM, + 'size': constants.DEFAULT_PLATFORM_STOR_SIZE, 'logical_volume': constants.FILESYSTEM_LV_DICT[ - constants.FILESYSTEM_NAME_CGCS], + constants.FILESYSTEM_NAME_PLATFORM], 'replicated': True, } LOG.info("Creating FS:%s:%s %d" % ( @@ -6919,7 +6910,7 @@ class ConductorManager(service.PeriodicService): data['name'], data['logical_volume'], data['size'])) self.dbapi.controller_fs_create(data) - # ETCD fs added to cgts-lv + # ETCD fs added to etcd-lv etcd_lv_size = constants.ETCD_STOR_SIZE data_etcd = { @@ -7237,8 +7228,8 @@ class ConductorManager(service.PeriodicService): # Check PausedSyncS as well as drbd sync is changed to serial if "drbd-pgsql" in row and ("SyncSource" in row or "PausedSyncS" in row): fs.append(constants.DRBD_PGSQL) - if "drbd-cgcs" in row and ("SyncSource" in row or "PausedSyncS" in row): - fs.append(constants.DRBD_CGCS) + if "drbd-platform" in row and ("SyncSource" in row or "PausedSyncS" in row): + fs.append(constants.DRBD_PLATFORM) if "drbd-extension" in row and ("SyncSource" in row or "PausedSyncS" in row): fs.append(constants.DRBD_EXTENSION) if "drbd-patch-vault" in row and ("SyncSource" in row or "PausedSyncS" in row): @@ -7279,8 +7270,8 @@ class ConductorManager(service.PeriodicService): if 'drbd-pgsql' in row: drbd_pgsql_size = size - if 'drbd-cgcs' in row: - drbd_cgcs_size = size + if 'drbd-platform' in row: + drbd_platform_size = size if 'drbd-extension' in row: drbd_extension_size = size if 'drbd-patch-vault' in row: @@ -7293,8 +7284,8 @@ class ConductorManager(service.PeriodicService): lvdisplay_dict = self.get_controllerfs_lv_sizes(context) if lvdisplay_dict.get('pgsql-lv', None): pgsql_lv_size = float(lvdisplay_dict['pgsql-lv']) - if lvdisplay_dict.get('cgcs-lv', None): - cgcs_lv_size = float(lvdisplay_dict['cgcs-lv']) + if lvdisplay_dict.get('platform-lv', None): + platform_lv_size = float(lvdisplay_dict['platform-lv']) if lvdisplay_dict.get('extension-lv', None): extension_lv_size = float(lvdisplay_dict['extension-lv']) if lvdisplay_dict.get('patch-vault-lv', None): @@ -7304,14 +7295,14 @@ class ConductorManager(service.PeriodicService): if lvdisplay_dict.get('dockerdistribution-lv', None): dockerdistribution_lv_size = float(lvdisplay_dict['dockerdistribution-lv']) - LOG.info("drbd-overview: pgsql-%s, cgcs-%s, extension-%s, patch-vault-%s, etcd-%s, dockerdistribution-%s", drbd_pgsql_size, drbd_cgcs_size, drbd_extension_size, drbd_patch_size, drbd_etcd_size, dockerdistribution_size) - LOG.info("lvdisplay: pgsql-%s, cgcs-%s, extension-%s, patch-vault-%s, etcd-%s, dockerdistribution-%s", pgsql_lv_size, cgcs_lv_size, extension_lv_size, patch_lv_size, etcd_lv_size, dockerdistribution_lv_size) + LOG.info("drbd-overview: pgsql-%s, platform-%s, extension-%s, patch-vault-%s, etcd-%s, dockerdistribution-%s", drbd_pgsql_size, drbd_platform_size, drbd_extension_size, drbd_patch_size, drbd_etcd_size, dockerdistribution_size) + LOG.info("lvdisplay: pgsql-%s, platform-%s, extension-%s, patch-vault-%s, etcd-%s, dockerdistribution-%s", pgsql_lv_size, platform_lv_size, extension_lv_size, patch_lv_size, etcd_lv_size, dockerdistribution_lv_size) drbd_fs_updated = [] if math.ceil(drbd_pgsql_size) < math.ceil(pgsql_lv_size): drbd_fs_updated.append(constants.DRBD_PGSQL) - if math.ceil(drbd_cgcs_size) < math.ceil(cgcs_lv_size): - drbd_fs_updated.append(constants.DRBD_CGCS) + if math.ceil(drbd_platform_size) < math.ceil(platform_lv_size): + drbd_fs_updated.append(constants.DRBD_PLATFORM) if math.ceil(drbd_extension_size) < math.ceil(extension_lv_size): drbd_fs_updated.append(constants.DRBD_EXTENSION) if math.ceil(drbd_patch_size) < math.ceil(patch_lv_size): @@ -7347,7 +7338,7 @@ class ConductorManager(service.PeriodicService): cutils.touch(CFS_DRBDADM_RECONFIGURED) pgsql_resized = False - cgcs_resized = False + platform_resized = False extension_resized = False patch_resized = False etcd_resized = False @@ -7369,16 +7360,16 @@ class ConductorManager(service.PeriodicService): LOG.info("Performed %s" % progress) pgsql_resized = True - if constants.DRBD_CGCS in drbd_fs_updated: - if (not cgcs_resized and + if constants.DRBD_PLATFORM in drbd_fs_updated: + if (not platform_resized and (not standby_host or (standby_host and - constants.DRBD_CGCS in self._drbd_fs_sync()))): - # cgcs_gib /opt/cgcs - progress = "resize2fs drbd3" - cmd = ["resize2fs", "/dev/drbd3"] + constants.DRBD_PLATFORM in self._drbd_fs_sync()))): + # platform_gib /opt/platform + progress = "resize2fs drbd2" + cmd = ["resize2fs", "/dev/drbd2"] stdout, __ = cutils.execute(*cmd, attempts=retry_attempts, run_as_root=True) LOG.info("Performed %s" % progress) - cgcs_resized = True + platform_resized = True if constants.DRBD_EXTENSION in drbd_fs_updated: if (not extension_resized and @@ -7432,7 +7423,7 @@ class ConductorManager(service.PeriodicService): for drbd in drbd_fs_updated: if drbd == constants.DRBD_PGSQL and not pgsql_resized: all_resized = False - elif drbd == constants.DRBD_CGCS and not cgcs_resized: + elif drbd == constants.DRBD_PLATFORM and not platform_resized: all_resized = False elif drbd == constants.DRBD_EXTENSION and not extension_resized: all_resized = False @@ -9025,7 +9016,7 @@ class ConductorManager(service.PeriodicService): lvdisplay_command = 'lvdisplay --columns --options lv_size,lv_name ' \ '--units g --noheading --nosuffix ' \ '/dev/cgts-vg/pgsql-lv /dev/cgts-vg/backup-lv ' \ - '/dev/cgts-vg/cgcs-lv ' \ + '/dev/cgts-vg/platform-lv ' \ '/dev/cgts-vg/scratch-lv ' \ '/dev/cgts-vg/extension-lv ' \ '/dev/cgts-vg/docker-lv ' \ diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/networking.py b/sysinv/sysinv/sysinv/sysinv/puppet/networking.py index 7a4132338c..95ecfaf5c0 100644 --- a/sysinv/sysinv/sysinv/sysinv/puppet/networking.py +++ b/sysinv/sysinv/sysinv/sysinv/puppet/networking.py @@ -52,19 +52,11 @@ class NetworkingPuppet(base.BasePuppet): except exception.AddressNotFoundByName: gateway_address = None - try: - cgcs_nfs_address = self._get_address_by_name( - constants.CONTROLLER_CGCS_NFS, networktype).address - except exception.AddressNotFoundByName: - cgcs_nfs_address = None - config.update({ 'platform::network::%s::params::gateway_address' % networktype: gateway_address, 'platform::network::%s::params::platform_nfs_address' % networktype: platform_nfs_address, - 'platform::network::%s::params::cgcs_nfs_address' % networktype: - cgcs_nfs_address, }) return config diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/platform.py b/sysinv/sysinv/sysinv/sysinv/puppet/platform.py index 756933756e..d0288b6b18 100644 --- a/sysinv/sysinv/sysinv/sysinv/puppet/platform.py +++ b/sysinv/sysinv/sysinv/sysinv/puppet/platform.py @@ -119,10 +119,6 @@ class PlatformPuppet(base.BasePuppet): constants.CONTROLLER_PLATFORM_NFS, constants.NETWORK_TYPE_MGMT), - (constants.CONTROLLER_CGCS_NFS, - constants.CONTROLLER_CGCS_NFS, - constants.NETWORK_TYPE_MGMT), - # pxeboot network hosts (constants.PXECONTROLLER_HOSTNAME, constants.CONTROLLER_HOSTNAME, diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/storage.py b/sysinv/sysinv/sysinv/sysinv/puppet/storage.py index 6d45cda9cc..0453eca99b 100644 --- a/sysinv/sysinv/sysinv/sysinv/puppet/storage.py +++ b/sysinv/sysinv/sysinv/sysinv/puppet/storage.py @@ -37,9 +37,9 @@ class StoragePuppet(base.BasePuppet): config.update({ 'platform::drbd::pgsql::params::lv_size': pgsql_gib }) - elif controller_fs.name == constants.FILESYSTEM_NAME_CGCS: + elif controller_fs.name == constants.FILESYSTEM_NAME_PLATFORM: config.update({ - 'platform::drbd::cgcs::params::lv_size': controller_fs.size + 'platform::drbd::platform::params::lv_size': controller_fs.size }) elif controller_fs.name == constants.FILESYSTEM_NAME_EXTENSION: config.update({