Point auditor service at the replicator config

When running dedicated replication network we need the auditor service
to point at the configuration file with the replicator.

Without this we will get errors in the various servers indicating the
replicator service can not be found by the auditor service:

object-auditor: STDOUT: Unable to find object-replicator config section
in /etc/swift/object-server/object-server.conf

Change-Id: Idd5e6ddab66a7855959e93139d2c7934762c6ba9
This commit is contained in:
Andy McCrae 2016-08-31 13:13:57 +01:00 committed by Andy McCrae
parent e31bec0e04
commit 599232af30
9 changed files with 87 additions and 27 deletions

View File

@ -35,9 +35,9 @@
system_user: "{{ swift_system_user_name }}" system_user: "{{ swift_system_user_name }}"
system_group: "{{ swift_system_group_name }}" system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}" service_home: "{{ swift_system_home_folder }}"
when: > when:
swift.replication_network is defined and - swift.replication_network is defined
swift.replication_network != swift.storage_network - swift.replication_network != swift.storage_network
# When using a replication network use a second server for dedicated replicator configuration # When using a replication network use a second server for dedicated replicator configuration
# This will be a blank file if not using dedicated replication network to prevent errors # This will be a blank file if not using dedicated replication network to prevent errors
@ -61,6 +61,8 @@
system_group: "{{ swift_system_group_name }}" system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}" service_home: "{{ swift_system_home_folder }}"
# The auditor needs to point at the replicator configuration.
# When using a dedicated replication network that means the dedicated conf file.
- include: swift_init_common.yml - include: swift_init_common.yml
vars: vars:
program_name: "swift-account-auditor" program_name: "swift-account-auditor"
@ -69,6 +71,21 @@
system_user: "{{ swift_system_user_name }}" system_user: "{{ swift_system_user_name }}"
system_group: "{{ swift_system_group_name }}" system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}" service_home: "{{ swift_system_home_folder }}"
when: >
swift.replication_network is not defined or
swift.replication_network == swift.storage_network
- include: swift_init_common.yml
vars:
program_name: "swift-account-auditor"
program_config_options: "{{ swift_account_replicator_program_config_options }}"
service_name: "{{ swift_service_name }}"
system_user: "{{ swift_system_user_name }}"
system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}"
when:
- swift.replication_network is defined
- swift.replication_network != swift.storage_network
- include: swift_init_common.yml - include: swift_init_common.yml
vars: vars:
@ -100,9 +117,9 @@
mode: "0644" mode: "0644"
config_overrides: "{{ swift_account_server_replicator_conf_overrides }}" config_overrides: "{{ swift_account_server_replicator_conf_overrides }}"
config_type: "ini" config_type: "ini"
when: > when:
swift.replication_network is defined and - swift.replication_network is defined
swift.replication_network != swift.storage_network - swift.replication_network != swift.storage_network
notify: Restart swift account services notify: Restart swift account services
# Remove the dedicated replicator configuration when no dedicated replication network in use # Remove the dedicated replicator configuration when no dedicated replication network in use

View File

@ -35,9 +35,9 @@
system_user: "{{ swift_system_user_name }}" system_user: "{{ swift_system_user_name }}"
system_group: "{{ swift_system_group_name }}" system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}" service_home: "{{ swift_system_home_folder }}"
when: > when:
swift.replication_network is defined and - swift.replication_network is defined
swift.replication_network != swift.storage_network - swift.replication_network != swift.storage_network
# When using a replication network create a second server for dedicated replicator configuration # When using a replication network create a second server for dedicated replicator configuration
# This will be a blank file if not using dedicated replication network to prevent errors # This will be a blank file if not using dedicated replication network to prevent errors
@ -61,6 +61,8 @@
system_group: "{{ swift_system_group_name }}" system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}" service_home: "{{ swift_system_home_folder }}"
# The auditor needs to point at the replicator configuration.
# # When using a dedicated replication network that means the dedicated conf file.
- include: swift_init_common.yml - include: swift_init_common.yml
vars: vars:
program_name: "swift-container-auditor" program_name: "swift-container-auditor"
@ -69,6 +71,21 @@
system_user: "{{ swift_system_user_name }}" system_user: "{{ swift_system_user_name }}"
system_group: "{{ swift_system_group_name }}" system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}" service_home: "{{ swift_system_home_folder }}"
when: >
swift.replication_network is not defined or
swift.replication_network == swift.storage_network
- include: swift_init_common.yml
vars:
program_name: "swift-container-auditor"
program_config_options: "{{ swift_container_replicator_program_config_options }}"
service_name: "{{ swift_service_name }}"
system_user: "{{ swift_system_user_name }}"
system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}"
when:
- swift.replication_network is defined
- swift.replication_network != swift.storage_network
- include: swift_init_common.yml - include: swift_init_common.yml
vars: vars:
@ -127,8 +144,8 @@
mode: "0644" mode: "0644"
config_overrides: "{{ swift_container_sync_realms_conf_overrides }}" config_overrides: "{{ swift_container_sync_realms_conf_overrides }}"
config_type: "ini" config_type: "ini"
when: > when:
swift_container_sync_realms is defined - swift_container_sync_realms is defined
notify: Restart swift container services notify: Restart swift container services
# We only create the dedicated replicator configuration when using a dedicated replication_network # We only create the dedicated replicator configuration when using a dedicated replication_network
@ -141,9 +158,9 @@
mode: "0644" mode: "0644"
config_overrides: "{{ swift_container_server_replicator_conf_overrides }}" config_overrides: "{{ swift_container_server_replicator_conf_overrides }}"
config_type: "ini" config_type: "ini"
when: > when:
swift.replication_network is defined and - swift.replication_network is defined
swift.replication_network != swift.storage_network - swift.replication_network != swift.storage_network
notify: Restart swift container services notify: Restart swift container services
# Remove the dedicated replicator configuration when no dedicated replication network in use # Remove the dedicated replicator configuration when no dedicated replication network in use

View File

@ -35,9 +35,9 @@
system_user: "{{ swift_system_user_name }}" system_user: "{{ swift_system_user_name }}"
system_group: "{{ swift_system_group_name }}" system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}" service_home: "{{ swift_system_home_folder }}"
when: > when:
swift.replication_network is defined and - swift.replication_network is defined
swift.replication_network != swift.storage_network - swift.replication_network != swift.storage_network
# When using a replication network use a second server for dedicated replicator configuration # When using a replication network use a second server for dedicated replicator configuration
# This will be a blank file if not using dedicated replication network to prevent errors # This will be a blank file if not using dedicated replication network to prevent errors
@ -61,6 +61,8 @@
system_group: "{{ swift_system_group_name }}" system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}" service_home: "{{ swift_system_home_folder }}"
# The auditor needs to point at the replicator configuration.
# # When using a dedicated replication network that means the dedicated conf file.
- include: swift_init_common.yml - include: swift_init_common.yml
vars: vars:
program_name: "swift-object-auditor" program_name: "swift-object-auditor"
@ -69,6 +71,21 @@
system_user: "{{ swift_system_user_name }}" system_user: "{{ swift_system_user_name }}"
system_group: "{{ swift_system_group_name }}" system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}" service_home: "{{ swift_system_home_folder }}"
when: >
swift.replication_network is not defined or
swift.replication_network == swift.storage_network
- include: swift_init_common.yml
vars:
program_name: "swift-object-auditor"
program_config_options: "{{ swift_object_replicator_program_config_options }}"
service_name: "{{ swift_service_name }}"
system_user: "{{ swift_system_user_name }}"
system_group: "{{ swift_system_group_name }}"
service_home: "{{ swift_system_home_folder }}"
when:
- swift.replication_network is defined
- swift.replication_network != swift.storage_network
- include: swift_init_common.yml - include: swift_init_common.yml
vars: vars:
@ -118,9 +135,9 @@
mode: "0644" mode: "0644"
config_overrides: "{{ swift_object_server_replicator_conf_overrides }}" config_overrides: "{{ swift_object_server_replicator_conf_overrides }}"
config_type: "ini" config_type: "ini"
when: > when:
swift.replication_network is defined and - swift.replication_network is defined
swift.replication_network != swift.storage_network - swift.replication_network != swift.storage_network
notify: Restart swift object services notify: Restart swift object services
# Remove the dedicated replicator configuration when no dedicated replication network in use # Remove the dedicated replicator configuration when no dedicated replication network in use

View File

@ -25,3 +25,6 @@ replication_server = True
log_facility = LOG_LOCAL2 log_facility = LOG_LOCAL2
per_diff = 10000 per_diff = 10000
reclaim_age = {{ reclaim_age | default(604800) }} reclaim_age = {{ reclaim_age | default(604800) }}
[account-auditor]
log_facility = LOG_LOCAL2

View File

@ -39,10 +39,10 @@ recon_lock_path = /var/lock
log_facility = LOG_LOCAL2 log_facility = LOG_LOCAL2
per_diff = 10000 per_diff = 10000
reclaim_age = {{ reclaim_age | default(604800) }} reclaim_age = {{ reclaim_age | default(604800) }}
{% endif %}
[account-auditor] [account-auditor]
log_facility = LOG_LOCAL2 log_facility = LOG_LOCAL2
{% endif %}
[account-reaper] [account-reaper]
log_facility = LOG_LOCAL2 log_facility = LOG_LOCAL2

View File

@ -24,3 +24,6 @@ replication_server = True
[container-replicator] [container-replicator]
log_facility = LOG_LOCAL3 log_facility = LOG_LOCAL3
reclaim_age = {{ reclaim_age | default(604800) }} reclaim_age = {{ reclaim_age | default(604800) }}
[container-auditor]
log_facility = LOG_LOCAL3

View File

@ -39,6 +39,9 @@ recon_lock_path = /var/lock
[container-replicator] [container-replicator]
log_facility = LOG_LOCAL3 log_facility = LOG_LOCAL3
reclaim_age = {{ reclaim_age | default(604800) }} reclaim_age = {{ reclaim_age | default(604800) }}
[container-auditor]
log_facility = LOG_LOCAL3
{% endif %} {% endif %}
[container-updater] [container-updater]
@ -46,9 +49,6 @@ log_facility = LOG_LOCAL3
node_timeout = 15 node_timeout = 15
conn_timeout = 5 conn_timeout = 5
[container-auditor]
log_facility = LOG_LOCAL3
[container-sync] [container-sync]
[filter:xprofile] [filter:xprofile]

View File

@ -28,3 +28,6 @@ reclaim_age = {{ reclaim_age | default(604800) }}
{% if swift_rsync_module_per_drive %} {% if swift_rsync_module_per_drive %}
rsync_module = {replication_ip}::object_{device} rsync_module = {replication_ip}::object_{device}
{% endif %} {% endif %}
[object-auditor]
log_facility = LOG_LOCAL4

View File

@ -44,6 +44,9 @@ reclaim_age = {{ reclaim_age | default(604800) }}
{% if swift_rsync_module_per_drive %} {% if swift_rsync_module_per_drive %}
rsync_module = {replication_ip}::object_{device} rsync_module = {replication_ip}::object_{device}
{% endif %} {% endif %}
[object-auditor]
log_facility = LOG_LOCAL4
{% endif %} {% endif %}
[object-updater] [object-updater]
@ -53,8 +56,5 @@ concurrency = 3
node_timeout = 60 node_timeout = 60
conn_timeout = 5 conn_timeout = 5
[object-auditor]
log_facility = LOG_LOCAL4
[filter:xprofile] [filter:xprofile]
use = egg:swift#xprofile use = egg:swift#xprofile