Allow option to disable Swift ring management

There are quite a few cases where it is useful to disable ring building on the
nodes. For example:

- using different weights, regions, and zones
- replacing a node in an existing Swift cluster
- adding a new node to an existing cluster
- using storage policies and therefore multiple rings
- using different nodes and disks for account, container and object servers

This patch allows it to disable ring building. Rings need to be maintained
manually then, and copied to all storage and proxy nodes within a cluster.

This patch is similar to I01311ec3ca265b151f8740bf7dc57cdf0cf0df6f, except that
it uses the current templates.

Change-Id: I56978b15823dd6eaf4b6fd3440df2f895e89611a
This commit is contained in:
Christian Schwede 2016-03-05 14:49:00 +01:00 committed by Dougal Matthews
parent 53e2f2dea7
commit 83b8bb7bfa
2 changed files with 12 additions and 8 deletions

View File

@ -656,6 +656,10 @@ parameters:
default: 10 default: 10
description: Partition Power to use when building Swift rings description: Partition Power to use when building Swift rings
type: number type: number
SwiftRingBuild:
default: true
description: Whether to manage Swift rings or not
type: boolean
SwiftPassword: SwiftPassword:
description: The password for the swift service account, used by the swift proxy description: The password for the swift service account, used by the swift proxy
services. services.
@ -1204,6 +1208,7 @@ resources:
swift_hash_suffix: {get_param: SwiftHashSuffix} swift_hash_suffix: {get_param: SwiftHashSuffix}
swift_password: {get_param: SwiftPassword} swift_password: {get_param: SwiftPassword}
swift_part_power: {get_param: SwiftPartPower} swift_part_power: {get_param: SwiftPartPower}
swift_ring_build: {get_param: SwiftRingBuild}
swift_replicas: {get_param: SwiftReplicas} swift_replicas: {get_param: SwiftReplicas}
swift_min_part_hours: {get_param: SwiftMinPartHours} swift_min_part_hours: {get_param: SwiftMinPartHours}
swift_mount_check: {get_param: SwiftMountCheck} swift_mount_check: {get_param: SwiftMountCheck}
@ -1318,15 +1323,12 @@ resources:
swift::swift_hash_suffix: {get_input: swift_hash_suffix} swift::swift_hash_suffix: {get_input: swift_hash_suffix}
swift::proxy::authtoken::admin_password: {get_input: swift_password} swift::proxy::authtoken::admin_password: {get_input: swift_password}
swift::proxy::workers: {get_input: swift_workers} swift::proxy::workers: {get_input: swift_workers}
tripleo::ringbuilder::build_ring: { get_input: swift_ring_build }
tripleo::ringbuilder::part_power: {get_input: swift_part_power} tripleo::ringbuilder::part_power: {get_input: swift_part_power}
tripleo::ringbuilder::replicas: {get_input: swift_replicas} tripleo::ringbuilder::replicas: {get_input: swift_replicas}
tripleo::ringbuilder::min_part_hours: {get_input: swift_min_part_hours} tripleo::ringbuilder::min_part_hours: {get_input: swift_min_part_hours}
swift_mount_check: {get_input: swift_mount_check} swift_mount_check: {get_input: swift_mount_check}
# NOTE(dprince): build_ring support is currently not wired in.
# See: https://review.openstack.org/#/c/109225/
tripleo::ringbuilder::build_ring: True
# Cinder # Cinder
cinder_enable_db_purge: {get_input: cinder_enable_db_purge} cinder_enable_db_purge: {get_input: cinder_enable_db_purge}
cinder_enable_nfs_backend: {get_input: cinder_enable_nfs_backend} cinder_enable_nfs_backend: {get_input: cinder_enable_nfs_backend}

View File

@ -30,6 +30,10 @@ parameters:
default: 10 default: 10
description: Partition Power to use when building Swift rings description: Partition Power to use when building Swift rings
type: number type: number
RingBuild:
default: true
description: Whether to manage Swift rings or not
type: boolean
Replicas: Replicas:
type: number type: number
default: 3 default: 3
@ -263,17 +267,14 @@ resources:
raw_data: {get_file: hieradata/object.yaml} raw_data: {get_file: hieradata/object.yaml}
mapped_data: # data supplied directly to this deployment configuration, etc mapped_data: # data supplied directly to this deployment configuration, etc
swift::swift_hash_suffix: { get_input: swift_hash_suffix } swift::swift_hash_suffix: { get_input: swift_hash_suffix }
tripleo::ringbuilder::build_ring: { get_input: swift_ring_build }
tripleo::ringbuilder::part_power: { get_input: swift_part_power } tripleo::ringbuilder::part_power: { get_input: swift_part_power }
tripleo::ringbuilder::replicas: {get_input: swift_replicas } tripleo::ringbuilder::replicas: {get_input: swift_replicas }
# Swift
swift::storage::all::storage_local_net_ip: {get_input: swift_management_network} swift::storage::all::storage_local_net_ip: {get_input: swift_management_network}
swift_mount_check: {get_input: swift_mount_check } swift_mount_check: {get_input: swift_mount_check }
tripleo::ringbuilder::min_part_hours: { get_input: swift_min_part_hours } tripleo::ringbuilder::min_part_hours: { get_input: swift_min_part_hours }
ntp::servers: {get_input: ntp_servers} ntp::servers: {get_input: ntp_servers}
timezone::timezone: {get_input: timezone} timezone::timezone: {get_input: timezone}
# NOTE(dprince): build_ring support is currently not wired in.
# See: https://review.openstack.org/#/c/109225/
tripleo::ringbuilder::build_ring: True
snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name} snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
tripleo::packages::enable_install: {get_input: enable_package_install} tripleo::packages::enable_install: {get_input: enable_package_install}
@ -294,6 +295,7 @@ resources:
swift_hash_suffix: {get_param: HashSuffix} swift_hash_suffix: {get_param: HashSuffix}
swift_mount_check: {get_param: MountCheck} swift_mount_check: {get_param: MountCheck}
swift_min_part_hours: {get_param: MinPartHours} swift_min_part_hours: {get_param: MinPartHours}
swift_ring_build: {get_param: RingBuild}
swift_part_power: {get_param: PartPower} swift_part_power: {get_param: PartPower}
swift_replicas: { get_param: Replicas} swift_replicas: { get_param: Replicas}
ntp_servers: {get_param: NtpServer} ntp_servers: {get_param: NtpServer}