Browse Source

Merge "Allow overrides in non global ceph.conf sections" into stable/queens

changes/59/696059/2
Zuul Gerrit Code Review 1 month ago
parent
commit
2b778bdd04
3 changed files with 44 additions and 15 deletions
  1. +5
    -0
      ci/environments/scenario001-multinode-containers.yaml
  2. +2
    -0
      ci/environments/scenario004-multinode-containers.yaml
  3. +37
    -15
      docker/services/ceph-ansible/ceph-base.yaml

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

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

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

@@ -130,3 +130,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

+ 37
- 15
docker/services/ceph-ansible/ceph-base.yaml View File

@@ -183,6 +183,10 @@ conditions:
expression: $.data.split('/')[0].matches('(\.|:)')
perform_upgrade:
equals: [{get_param: StackUpdateType}, 'UPGRADE']
ceph_config_overrides_with_sections:
yaql:
data: {get_param: CephConfigOverrides}
expression: $.data.keys().any(predicate => $ in ['global', 'mon', 'mgr', 'osd', 'mds', 'client'])

resources:
DockerImageUrlParts:
@@ -211,6 +215,27 @@ 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'

outputs:
role_data:
description: Role data for the Ceph base service.
@@ -347,21 +372,18 @@ outputs:
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, 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'
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