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/85/702485/1
fpantano Francesco Pantano 6 months ago
parent
commit
d4ffc480cf
No known key found for this signature in database GPG Key ID: 799868C47301D458
3 changed files with 46 additions and 16 deletions
  1. +5
    -0
      ci/environments/scenario001-multinode-containers.yaml
  2. +2
    -0
      ci/environments/scenario004-multinode-containers.yaml
  3. +39
    -16
      docker/services/ceph-ansible/ceph-base.yaml

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

@@ -185,3 +185,8 @@ parameter_defaults:
- tty4
- tty5
- tty6
CephConfigOverrides:
global:
globalkey: globalvalue
osd:
osdkey: osdvalue

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

@@ -139,3 +139,5 @@ parameter_defaults:
# BgpvpnServiceProvider: 'BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default'
# L2gwServiceProvider: ['L2GW:l2gw:networking_l2gw.services.l2gateway.service_drivers.L2gwDriver:default']
NotificationDriver: 'noop'
CephConfigOverrides:
globalkey: globalvalue

+ 39
- 16
docker/services/ceph-ansible/ceph-base.yaml View File

@@ -208,6 +208,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'])

resources:
DockerImageUrlParts:
@@ -236,6 +240,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:
@@ -349,22 +376,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_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_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