Browse Source

Allow overrides in non global ceph.conf sections

In current ceph-base version there is a CephConfigOverride
parameter which allows to override ceph.conf params in global
section only.

This change will permit overrides to specify the ceph.conf
section into which they apply, while retaining backward
compatiblity.

Also adds in scenarios 001 and 004 some test cases.

Co-Authored-By: Giulio Fidente <gfidente@redhat.com>
Change-Id: Icaba7a58f458d853912d038f24c0cb4f853e0166
Implements: blueprint ceph-config-overrides
(cherry picked from commit 2501f4747c)
changes/83/702183/1
fpantano Francesco Pantano 8 months ago
parent
commit
cf467ead1b
No known key found for this signature in database GPG Key ID: 799868C47301D458
3 changed files with 46 additions and 18 deletions
  1. +5
    -0
      ci/environments/scenario001-standalone.yaml
  2. +2
    -0
      ci/environments/scenario004-standalone.yaml
  3. +39
    -18
      deployment/ceph-ansible/ceph-base.yaml

+ 5
- 0
ci/environments/scenario001-standalone.yaml View File

@@ -123,3 +123,8 @@ parameter_defaults:
- tty5
- tty6
ContainerCli: podman
CephConfigOverrides:
global:
globalkey: globalvalue
osd:
osdkey: osdvalue

+ 2
- 0
ci/environments/scenario004-standalone.yaml View File

@@ -99,3 +99,5 @@ parameter_defaults:
- tty6
# Remove ContainerCli once this scenario is tested on CentOS8
ContainerCli: docker
CephConfigOverrides:
globalkey: globalvalue

+ 39
- 18
deployment/ceph-ansible/ceph-base.yaml View File

@@ -235,6 +235,10 @@ conditions:
equals:
- {get_param: CephAnsibleSkipTags}
- ''
ceph_config_overrides_with_sections:
yaql:
data: {get_param: CephConfigOverrides}
expression: $.data.keys().any(predicate => $ in ['global', 'mon', 'mgr', 'osd', 'mds', 'client'])
ceph_authenticated_registry:
and:
- not:
@@ -283,6 +287,29 @@ resources:
expression: $.data.rightSplit(':', 1)[1]
data: {get_param: DockerCephDaemonImage}

DefaultCephConfigOverrides:
type: OS::Heat::Value
properties:
type: json
value:
global:
osd_pool_default_size: {get_param: CephPoolDefaultSize}
osd_pool_default_pg_num: {get_param: CephPoolDefaultPgNum}
osd_pool_default_pgp_num: {get_param: CephPoolDefaultPgNum}
rgw_keystone_api_version: 3
rgw_keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
rgw_keystone_accepted_roles: 'Member, admin'
rgw_keystone_accepted_admin_roles: ResellerAdmin
rgw_keystone_admin_domain: default
rgw_keystone_admin_project: service
rgw_keystone_admin_user: swift
rgw_keystone_admin_password: {get_param: SwiftPassword}
rgw_keystone_implicit_tenants: 'true'
rgw_keystone_revocation_interval: '0'
rgw_s3_auth_use_keystone: 'true'
rgw_swift_versioning_enabled: 'true'
rgw_swift_account_in_url: 'true'

CephBaseAnsibleVars:
type: OS::Heat::Value
properties:
@@ -422,24 +449,18 @@ resources:
keys: *openstack_keys
pools: []
ceph_conf_overrides:
global:
map_merge:
- osd_pool_default_size: {get_param: CephPoolDefaultSize}
osd_pool_default_pg_num: {get_param: CephPoolDefaultPgNum}
osd_pool_default_pgp_num: {get_param: CephPoolDefaultPgNum}
rgw_keystone_api_version: 3
rgw_keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
rgw_keystone_accepted_roles: 'member, Member, admin'
rgw_keystone_accepted_admin_roles: ResellerAdmin
rgw_keystone_admin_domain: default
rgw_keystone_admin_project: service
rgw_keystone_admin_user: swift
rgw_keystone_admin_password: {get_param: SwiftPassword}
rgw_keystone_implicit_tenants: 'true'
rgw_keystone_revocation_interval: '0'
rgw_s3_auth_use_keystone: 'true'
rgw_swift_versioning_enabled: 'true'
rgw_swift_account_in_url: 'true'
if:
- ceph_config_overrides_with_sections
- yaql:
data:
default:
map_merge:
- {get_attr: [DefaultCephConfigOverrides, value]}
overrides: {get_param: CephConfigOverrides}
expression: $.data.default.mergeWith($.data.overrides)
- global:
map_merge:
- {get_attr: [DefaultCephConfigOverrides, value, global]}
- {get_param: CephConfigOverrides}
ntp_service_enabled: false
generate_fsid: false


Loading…
Cancel
Save