validate cephfs name for deployed ceph

During overcloud deploy, if the cephfs filestystem
name is explicitly configured via new parameter introduced
in [1], we fail the deployement with exception.

The parameter is intended only for external ceph cluster.

[1] https://review.opendev.org/c/openstack/tripleo-heat-templates/+/904034

Change-Id: I4a909402cc9a0af5bd8c934fd4679678c67338f7
This commit is contained in:
katarimanoj 2023-12-22 22:19:49 +05:30
parent 534fe49d29
commit 646a9c2187
2 changed files with 25 additions and 0 deletions

View File

@ -1140,6 +1140,29 @@ def check_ceph_fsid_matches_env_files(old_env, environment):
stack_ceph_fsid))
def validate_cephfs_name(environment):
""" Validate cephfs filessystem name for internal ceph
When ceph is deployed internally, it is deployed with single default
filesystem named 'cephfs' always, where as it is configurable
only for external ceph.
For this reason, we need to validate if deployed ceph is configured
with the parameter and raise the expection.
"""
cephfs_filesystem_name = environment.get(
'parameter_defaults', {}).get(
'ManilaCephFSFilesystemName')
if cephfs_filesystem_name and cephfs_filesystem_name != "cephfs":
ceph_deployed = environment.get(
'resource_registry', {}).get(
'OS::TripleO::Services::CephMon', 'OS::Heat::None')
if (ceph_deployed != "OS::Heat::None"):
raise exceptions.InvalidConfiguration('The cephfs filesystem '
'should not be configured '
'for internal ceph cluster')
def check_swift_and_rgw(old_env, env, stage):
"""Check that Swift and RGW aren't both enabled in the overcloud

View File

@ -325,6 +325,8 @@ class DeployOvercloud(command.Command):
# upgrades: check if swift is deployed
utils.check_swift_and_rgw(old_stack_env, env,
self.__class__.__name__)
# Validate cephfs filesystem name for internal ceph
utils.validate_cephfs_name(env)
# check migration to new nic config with ansible
utils.check_nic_config_with_ansible(env)
# check migration to service vips managed by servce