Revert "split templates to work around configparser bug"

This reverts commit 3e151d97ad.

Reason for revert: Upstream bug has been fixed

Change-Id: I5498030487677523ae71ae2f9a13074ab4552204
Related-Bug: #1872553
Closes-Bug: #1921354
This commit is contained in:
Dmitriy Rabotyagov 2021-03-25 10:08:57 +00:00
parent 44fa8898b1
commit 24bbb72ac9
11 changed files with 14 additions and 213 deletions

View File

@ -357,7 +357,7 @@ swift_services:
swift-account-server:
group: swift_acc
service_name: "swift-account-server"
execstarts: "{{ swift_bin }}/swift-account-server /etc/swift/account-server/account-server-2.conf"
execstarts: "{{ swift_bin }}/swift-account-server /etc/swift/account-server/account-server.conf"
init_config_overrides: "{{ swift_account_server_init_overrides }}"
start_order: 2
swift-account-replicator-server:
@ -370,7 +370,7 @@ swift_services:
swift-container-server:
group: swift_cont
service_name: swift-container-server
execstarts: "{{ swift_bin }}/swift-container-server /etc/swift/container-server/container-server-2.conf"
execstarts: "{{ swift_bin }}/swift-container-server /etc/swift/container-server/container-server.conf"
init_config_overrides: "{{ swift_container_server_init_overrides }}"
start_order: 4
swift-container-replicator-server:
@ -383,7 +383,7 @@ swift_services:
swift-object-server:
group: swift_obj
service_name: swift-object-server
execstarts: "{{ swift_bin }}/swift-object-server /etc/swift/object-server/object-server-2.conf"
execstarts: "{{ swift_bin }}/swift-object-server /etc/swift/object-server/object-server.conf"
init_config_overrides: "{{ swift_object_server_init_overrides }}"
start_order: 6
swift-object-replicator-server:
@ -428,13 +428,13 @@ swift_services:
swift-container-replicator:
group: swift_cont
service_name: "swift-container-replicator"
execstarts: "{{ swift_bin }}/swift-container-replicator {{ swift_dedicated_replication | ternary('/etc/swift/container-server/container-server-replicator.conf', '/etc/swift/container-server/container-server-2.conf') }}"
execstarts: "{{ swift_bin }}/swift-container-replicator {{ swift_dedicated_replication | ternary('/etc/swift/container-server/container-server-replicator.conf', '/etc/swift/container-server/container-server.conf') }}"
init_config_overrides: "{{ swift_container_replicator_init_overrides }}"
start_order: 13
swift-container-sync:
group: swift_cont
service_name: "swift-container-sync"
execstarts: "{{ swift_bin }}/swift-container-sync /etc/swift/container-server/container-server-2.conf"
execstarts: "{{ swift_bin }}/swift-container-sync /etc/swift/container-server/container-server.conf"
init_config_overrides: "{{ swift_container_sync_init_overrides }}"
start_order: 14
swift-container-updater:
@ -447,7 +447,7 @@ swift_services:
swift-object-auditor:
group: swift_obj
service_name: "swift-object-auditor"
execstarts: "{{ swift_bin }}/swift-object-auditor {{ swift_dedicated_replication | ternary('/etc/swift/object-server/object-server-replicator.conf', '/etc/swift/object-server/object-server-2.conf') }}"
execstarts: "{{ swift_bin }}/swift-object-auditor {{ swift_dedicated_replication | ternary('/etc/swift/object-server/object-server-replicator.conf', '/etc/swift/object-server/object-server.conf') }}"
init_config_overrides: "{{ swift_object_auditor_init_overrides }}"
start_order: 16
swift-object-expirer:
@ -459,19 +459,19 @@ swift_services:
swift-object-reconstructor:
group: swift_obj
service_name: "swift-object-reconstructor"
execstarts: "{{ swift_bin }}/swift-object-reconstructor {{ swift_dedicated_replication | ternary('/etc/swift/object-server/object-server-replicator.conf', '/etc/swift/object-server/object-server-2.conf') }}"
execstarts: "{{ swift_bin }}/swift-object-reconstructor {{ swift_dedicated_replication | ternary('/etc/swift/object-server/object-server-replicator.conf', '/etc/swift/object-server/object-server.conf') }}"
init_config_overrides: "{{ swift_object_reconstructor_init_overrides }}"
start_order: 18
swift-object-replicator:
group: swift_obj
service_name: "swift-object-replicator"
execstarts: "{{ swift_bin }}/swift-object-replicator {{ swift_dedicated_replication | ternary('/etc/swift/object-server/object-server-replicator.conf', '/etc/swift/object-server/object-server-2.conf') }}"
execstarts: "{{ swift_bin }}/swift-object-replicator {{ swift_dedicated_replication | ternary('/etc/swift/object-server/object-server-replicator.conf', '/etc/swift/object-server/object-server.conf') }}"
init_config_overrides: "{{ swift_object_replicator_init_overrides }}"
start_order: 19
swift-object-updater:
group: swift_obj
service_name: "swift-object-updater"
execstarts: "{{ swift_bin }}/swift-object-updater /etc/swift/object-server/object-server-2.conf"
execstarts: "{{ swift_bin }}/swift-object-updater /etc/swift/object-server/object-server.conf"
init_config_overrides: "{{ swift_object_updater_init_overrides }}"
start_order: 20

View File

@ -15,18 +15,13 @@
- name: "Swift account server configuration"
config_template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
src: "account-server.conf.j2"
dest: "/etc/swift/account-server/account-server.conf"
owner: "{{ swift_system_user_name }}"
group: "{{ swift_system_group_name }}"
mode: "0644"
config_overrides: "{{ swift_account_server_conf_overrides }}"
config_type: "ini"
with_items:
- src: "account-server-2.conf.j2"
dest: "/etc/swift/account-server/account-server-2.conf"
- src: "account-server.conf.j2"
dest: "/etc/swift/account-server/account-server.conf"
notify: Restart swift services
# We only create the dedicated replicator configuration when using a dedicated replication_network

View File

@ -27,10 +27,6 @@
dest: "/etc/swift/container-server/container-server.conf"
config_overrides: "{{ swift_container_server_conf_overrides }}"
config_type: "ini"
- src: "container-server-2.conf.j2"
dest: "/etc/swift/container-server/container-server-2.conf"
config_overrides: "{{ swift_container_server_conf_overrides }}"
config_type: "ini"
- src: "container-reconciler.conf.j2"
dest: "/etc/swift/container-server/container-reconciler.conf"
config_overrides: "{{ swift_container_reconciler_conf_overrides }}"

View File

@ -27,10 +27,6 @@
dest: "/etc/swift/object-server/object-server.conf"
config_overrides: "{{ swift_object_server_conf_overrides }}"
config_type: "ini"
- src: "object-server-2.conf.j2"
dest: "/etc/swift/object-server/object-server-2.conf"
config_overrides: "{{ swift_object_server_conf_overrides }}"
config_type: "ini"
- src: "object-expirer.conf.j2"
dest: "/etc/swift/object-server/object-expirer.conf"
config_overrides: "{{ swift_object_expirer_conf_overrides }}"

View File

@ -1,54 +0,0 @@
# {{ ansible_managed }}
{% set _api_threads = ansible_facts['processor_vcpus']|default(2) // 2 %}
{% set api_threads = _api_threads if _api_threads > 0 else 1 %}
[DEFAULT]
# Disable stderr logging
use_stderr = False
bind_ip = {{ swift_storage_address }}
bind_port = {{ swift_account_port }}
workers = {{ swift_account_server_workers | default(api_threads) }}
user = {{ swift_system_user_name }}
devices = {{ swift_vars.mount_point | default(swift.mount_point) }}
{% set _statsd_host = swift_vars.statsd_host | default(swift.statsd_host | default(statsd_host | default(False))) %}
{% if _statsd_host | bool %}
log_statsd_host = {{ _statsd_host }}
log_statsd_port = {{ swift_vars.statsd_port | default(swift.statsd_port | default(statsd_port)) }}
log_statsd_default_sample_rate = {{ swift_vars.statsd_default_sample_rate | default(swift.statsd_default_sample_rate | default(statsd_default_sample_rate)) }}
log_statsd_sample_rate_factor = {{ swift_vars.statsd_sample_rate_factor | default(swift.statsd_sample_rate_factor | default(statsd_sample_rate_factor))}}
log_statsd_metric_prefix = {{ swift_vars.statsd_metric_prefix | default(swift.statsd_metric_prefix | default(inventory_hostname)) }}
{% endif %}
disable_fallocate = {{ swift_account_disable_fallocate }}
fallocate_reserve = {{ swift_account_fallocate_reserve }}
[pipeline:main]
pipeline = healthcheck recon account-server
[app:account-server]
use = egg:swift#account
[filter:healthcheck]
use = egg:swift#healthcheck
[filter:recon]
use = egg:swift#recon
recon_cache_path = /var/cache/swift
recon_lock_path = /var/lock
{% if not swift_dedicated_replication %}
[account-replicator]
per_diff = 10000
reclaim_age = {{ reclaim_age | default(604800) }}
{% endif %}
[account-reaper]
delay_reaping = 604800
[filter:xprofile]
use = egg:swift#xprofile
[account-auditor]

View File

@ -23,7 +23,7 @@ log_statsd_metric_prefix = {{ swift_vars.statsd_metric_prefix | default(swift.st
{% endif %}
disable_fallocate = {{ swift_account_disable_fallocate }}
fallocate_reserve = {{ swift_account_fallocate_reserve }}%
fallocate_reserve = {{ swift_account_fallocate_reserve }}
[pipeline:main]
pipeline = healthcheck recon account-server
@ -53,5 +53,3 @@ delay_reaping = 604800
[filter:xprofile]
use = egg:swift#xprofile
[account-auditor]

View File

@ -1,58 +0,0 @@
# {{ ansible_managed }}
{% set _api_threads = ansible_facts['processor_vcpus']|default(2) // 2 %}
{% set api_threads = _api_threads if _api_threads > 0 else 1 %}
[DEFAULT]
# Disable stderr logging
use_stderr = False
bind_ip = {{ swift_storage_address }}
bind_port = {{ swift_container_port }}
workers = {{ swift_container_server_workers | default(api_threads) }}
user = {{ swift_system_user_name }}
devices = {{ swift_vars.mount_point | default(swift.mount_point) }}
{% set _statsd_host = swift_vars.statsd_host | default(swift.statsd_host | default(statsd_host | default(False))) %}
{% if _statsd_host | bool %}
log_statsd_host = {{ _statsd_host }}
log_statsd_port = {{ swift_vars.statsd_port | default(swift.statsd_port | default(statsd_port)) }}
log_statsd_default_sample_rate = {{ swift_vars.statsd_default_sample_rate | default(swift.statsd_default_sample_rate | default(statsd_default_sample_rate)) }}
log_statsd_sample_rate_factor = {{ swift_vars.statsd_sample_rate_factor | default(swift.statsd_sample_rate_factor | default(statsd_sample_rate_factor))}}
log_statsd_metric_prefix = {{ swift_vars.statsd_metric_prefix | default(swift.statsd_metric_prefix | default(inventory_hostname)) }}
{% endif %}
disable_fallocate = {{ swift_container_disable_fallocate }}
fallocate_reserve = {{ swift_container_fallocate_reserve }}
[pipeline:main]
pipeline = healthcheck recon container-server
[app:container-server]
use = egg:swift#container
allow_versions = {{ swift_allow_versions }}
[filter:healthcheck]
use = egg:swift#healthcheck
[filter:recon]
use = egg:swift#recon
recon_cache_path = /var/cache/swift
recon_lock_path = /var/lock
{% if not swift_dedicated_replication %}
[container-replicator]
reclaim_age = {{ reclaim_age | default(604800) }}
{% endif %}
[container-updater]
node_timeout = 15
conn_timeout = 5
[container-sync]
internal_client_conf_path = /etc/swift/container-server/internal-client.conf
[filter:xprofile]
use = egg:swift#xprofile
[container-auditor]

View File

@ -23,7 +23,7 @@ log_statsd_metric_prefix = {{ swift_vars.statsd_metric_prefix | default(swift.st
{% endif %}
disable_fallocate = {{ swift_container_disable_fallocate }}
fallocate_reserve = {{ swift_container_fallocate_reserve }}%
fallocate_reserve = {{ swift_container_fallocate_reserve }}
[pipeline:main]
pipeline = healthcheck recon container-server
@ -57,5 +57,3 @@ internal_client_conf_path = /etc/swift/container-server/internal-client.conf
[filter:xprofile]
use = egg:swift#xprofile
[container-auditor]

View File

@ -1,66 +0,0 @@
# {{ ansible_managed }}
{% set _api_threads = ansible_facts['processor_vcpus']|default(2) // 2 %}
{% set api_threads = _api_threads if _api_threads > 0 else 1 %}
[DEFAULT]
# Disable stderr logging
use_stderr = False
bind_ip = {{ swift_storage_address }}
bind_port = {{ swift_object_port }}
workers = {{ swift_object_server_workers | default(api_threads) }}
user = {{ swift_system_user_name }}
swift_dir = /etc/swift
devices = {{ swift_vars.mount_point | default(swift.mount_point) }}
{% set _statsd_host = swift_vars.statsd_host | default(swift.statsd_host | default(statsd_host | default(False))) %}
{% if _statsd_host | bool %}
log_statsd_host = {{ _statsd_host }}
log_statsd_port = {{ swift_vars.statsd_port | default(swift.statsd_port | default(statsd_port)) }}
log_statsd_default_sample_rate = {{ swift_vars.statsd_default_sample_rate | default(swift.statsd_default_sample_rate | default(statsd_default_sample_rate)) }}
log_statsd_sample_rate_factor = {{ swift_vars.statsd_sample_rate_factor | default(swift.statsd_sample_rate_factor | default(statsd_sample_rate_factor))}}
log_statsd_metric_prefix = {{ swift_vars.statsd_metric_prefix | default(swift.statsd_metric_prefix | default(inventory_hostname)) }}
{% endif %}
disable_fallocate = {{ swift_object_disable_fallocate }}
fallocate_reserve = {{ swift_object_fallocate_reserve }}
[pipeline:main]
pipeline = healthcheck recon object-server
[app:object-server]
use = egg:swift#object
mb_per_sync = 64
[filter:healthcheck]
use = egg:swift#healthcheck
[filter:recon]
use = egg:swift#recon
recon_cache_path = /var/cache/swift
recon_lock_path = /var/lock
{% if not swift_dedicated_replication %}
[object-replicator]
concurrency = 6
reclaim_age = {{ reclaim_age | default(604800) }}
{% if swift_rsync_module_per_drive %}
rsync_module = {replication_ip}::object_{device}
{% endif %}
[object-reconstructor]
concurrency = 6
reclaim_age = {{ reclaim_age | default(604800) }}
{% endif %}
[object-updater]
concurrency = 3
concurrency = 3
node_timeout = 60
conn_timeout = 5
[filter:xprofile]
use = egg:swift#xprofile
[object-auditor]

View File

@ -40,5 +40,3 @@ rsync_module = {replication_ip}::object_{device}
[object-reconstructor]
concurrency = 6
reclaim_age = {{ reclaim_age | default(604800) }}
[object-auditor]

View File

@ -24,7 +24,7 @@ log_statsd_metric_prefix = {{ swift_vars.statsd_metric_prefix | default(swift.st
{% endif %}
disable_fallocate = {{ swift_object_disable_fallocate }}
fallocate_reserve = {{ swift_object_fallocate_reserve }}%
fallocate_reserve = {{ swift_object_fallocate_reserve }}
[pipeline:main]
pipeline = healthcheck recon object-server
@ -65,5 +65,3 @@ conn_timeout = 5
[filter:xprofile]
use = egg:swift#xprofile
[object-auditor]