Ensure replication_network is not required for swift
* Adjust config location variables for account, container, object variables, to name them more clearly. * Adjust config placement order, to happen after init scripts are created so that the service restart handler will work appropriately. * Ensure the init scripts for the replicator service are created appropriately whether a dedicated replication_network is or isn't used. * Ensure the dedicated replication network configuration is only created when replication_network is specified and different to storage_network. * Ensure the appropriate configuration section in the server.conf is only added when the replication_network is specified and different to the storage_network. Change-Id: I4b204a974bb0a217f5222b6aa0fa36aa8c23b999 Closes-Bug: #1427599
This commit is contained in:
parent
96256b93f4
commit
8cf39b11ff
@ -67,13 +67,13 @@ swift_service_admin_tenant_name: "service"
|
||||
swift_service_admin_username: "swift"
|
||||
|
||||
swift_account_server_program_config_options: /etc/swift/account-server/account-server.conf
|
||||
swift_account_server_replicator_program_config_options: /etc/swift/account-server/account-server-replicator.conf
|
||||
swift_account_replicator_program_config_options: /etc/swift/account-server/account-server-replicator.conf
|
||||
|
||||
swift_container_server_program_config_options: /etc/swift/container-server/container-server.conf
|
||||
swift_container_server_replicator_program_config_options: /etc/swift/container-server/container-server-replicator.conf
|
||||
swift_container_replicator_program_config_options: /etc/swift/container-server/container-server-replicator.conf
|
||||
|
||||
swift_object_server_program_config_options: /etc/swift/object-server/object-server.conf
|
||||
swift_object_server_replicator_program_config_options: /etc/swift/object-server/object-server-replicator.conf
|
||||
swift_object_replicator_program_config_options: /etc/swift/object-server/object-server-replicator.conf
|
||||
|
||||
swift_proxy_server_program_config_options: /etc/swift/proxy-server/proxy-server.conf
|
||||
|
||||
|
@ -13,14 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: swift proxy server configuration
|
||||
template:
|
||||
src: "proxy-server.conf.j2"
|
||||
dest: "/etc/swift/proxy-server/proxy-server.conf"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
mode: "0644"
|
||||
notify: Restart swift services
|
||||
|
||||
- include: swift_upstart_common_init.yml
|
||||
vars:
|
||||
program_name: "swift-proxy-server"
|
||||
@ -29,3 +21,11 @@
|
||||
system_user: "{{ swift_system_user_name }}"
|
||||
system_group: "{{ swift_system_group_name }}"
|
||||
service_home: "{{ swift_system_home_folder }}"
|
||||
|
||||
- name: swift proxy server configuration
|
||||
template:
|
||||
src: "proxy-server.conf.j2"
|
||||
dest: "/etc/swift/proxy-server/proxy-server.conf"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
mode: "0644"
|
||||
notify: Restart swift services
|
||||
|
@ -13,34 +13,24 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: "Swift account server config with replication"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- { src: "account-server.conf.j2", dest: "/etc/swift/account-server/account-server.conf" }
|
||||
- { src: "account-server-replicator.conf.j2", dest: "/etc/swift/account-server/account-server-replicator.conf" }
|
||||
notify: Restart swift services
|
||||
|
||||
# When not using a replication network use the default configuration
|
||||
- include: swift_upstart_common_init.yml
|
||||
vars:
|
||||
program_name: "swift-account-server-replicator"
|
||||
program_config_options: "{{ swift_account_server_replicator_program_config_options }}"
|
||||
program_name: "swift-account-replicator"
|
||||
program_config_options: "{{ swift_account_server_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 and
|
||||
swift.replication_network != swift.storage_network
|
||||
swift.replication_network is not defined or
|
||||
swift.replication_network == swift.storage_network
|
||||
|
||||
# When using a replication network use the specific replicator configuration
|
||||
- include: swift_upstart_common_init.yml
|
||||
vars:
|
||||
program_name: "swift-account-replicator"
|
||||
program_config_options: "{{ swift_account_server_replicator_program_config_options }}"
|
||||
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 }}"
|
||||
@ -75,3 +65,29 @@
|
||||
system_user: "{{ swift_system_user_name }}"
|
||||
system_group: "{{ swift_system_group_name }}"
|
||||
service_home: "{{ swift_system_home_folder }}"
|
||||
|
||||
- name: "Swift account server configuration"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- { 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
|
||||
- name: "Swift account server replicator configuration"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- { src: "account-server-replicator.conf.j2", dest: "/etc/swift/account-server/account-server-replicator.conf" }
|
||||
when: >
|
||||
swift.replication_network is defined and
|
||||
swift.replication_network != swift.storage_network
|
||||
notify: Restart swift services
|
||||
|
@ -13,34 +13,24 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: "Swift container server configuration"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- { src: "container-server.conf.j2", dest: "/etc/swift/container-server/container-server.conf" }
|
||||
- { src: "container-server-replicator.conf.j2", dest: "/etc/swift/container-server/container-server-replicator.conf" }
|
||||
notify: Restart swift services
|
||||
|
||||
# When not using a replication network use the default configuration
|
||||
- include: swift_upstart_common_init.yml
|
||||
vars:
|
||||
program_name: "swift-container-server-replicator"
|
||||
program_config_options: "{{ swift_container_server_replicator_program_config_options }}"
|
||||
program_name: "swift-container-replicator"
|
||||
program_config_options: "{{ swift_container_server_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 and
|
||||
swift.replication_network != swift.storage_network
|
||||
swift.replication_network is not defined or
|
||||
swift.replication_network == swift.storage_network
|
||||
|
||||
# When using a replication network use the specific replicator configuration
|
||||
- include: swift_upstart_common_init.yml
|
||||
vars:
|
||||
program_name: "swift-container-replicator"
|
||||
program_config_options: "{{ swift_container_server_replicator_program_config_options }}"
|
||||
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 }}"
|
||||
@ -84,3 +74,29 @@
|
||||
system_user: "{{ swift_system_user_name }}"
|
||||
system_group: "{{ swift_system_group_name }}"
|
||||
service_home: "{{ swift_system_home_folder }}"
|
||||
|
||||
- name: "Swift container server configuration"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- { src: "container-server.conf.j2", dest: "/etc/swift/container-server/container-server.conf" }
|
||||
notify: Restart swift services
|
||||
|
||||
# We only create the dedicated replicator configuration when using a dedicated replication_network
|
||||
- name: "Swift container server configuration"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- { src: "container-server-replicator.conf.j2", dest: "/etc/swift/container-server/container-server-replicator.conf" }
|
||||
when: >
|
||||
swift.replication_network is defined and
|
||||
swift.replication_network != swift.storage_network
|
||||
notify: Restart swift services
|
||||
|
@ -13,34 +13,24 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: "Swift object server configuration"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- { src: "object-server.conf.j2", dest: "/etc/swift/object-server/object-server.conf" }
|
||||
- { src: "object-server-replicator.conf.j2", dest: "/etc/swift/object-server/object-server-replicator.conf" }
|
||||
notify: Restart swift services
|
||||
|
||||
# When not using a replication network use the default configuration
|
||||
- include: swift_upstart_common_init.yml
|
||||
vars:
|
||||
program_name: "swift-object-server-replicator"
|
||||
program_config_options: "{{ swift_object_server_replicator_program_config_options }}"
|
||||
program_name: "swift-object-replicator"
|
||||
program_config_options: "{{ swift_object_server_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 and
|
||||
swift.replication_network != swift.storage_network
|
||||
swift.replication_network is not defined or
|
||||
swift.replication_network == swift.storage_network
|
||||
|
||||
# When using a replication network use the specific replicator configuration
|
||||
- include: swift_upstart_common_init.yml
|
||||
vars:
|
||||
program_name: "swift-object-replicator"
|
||||
program_config_options: "{{ swift_object_server_replicator_program_config_options }}"
|
||||
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 }}"
|
||||
@ -75,3 +65,29 @@
|
||||
system_user: "{{ swift_system_user_name }}"
|
||||
system_group: "{{ swift_system_group_name }}"
|
||||
service_home: "{{ swift_system_home_folder }}"
|
||||
|
||||
- name: "Swift object server configuration"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- { src: "object-server.conf.j2", dest: "/etc/swift/object-server/object-server.conf" }
|
||||
notify: Restart swift services
|
||||
|
||||
# We only create the dedicated replicator configuration when using a dedicated replication_network
|
||||
- name: "Swift object server configuration"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- { src: "object-server-replicator.conf.j2", dest: "/etc/swift/object-server/object-server-replicator.conf" }
|
||||
when: >
|
||||
swift.replication_network is defined and
|
||||
swift.replication_network != swift.storage_network
|
||||
notify: Restart swift services
|
||||
|
@ -33,7 +33,7 @@ log_facility = LOG_LOCAL2
|
||||
recon_cache_path = /var/cache/swift
|
||||
recon_lock_path = /var/lock/swift
|
||||
|
||||
{% if swift.replication_network is not defined %}
|
||||
{% if swift.replication_network is not defined or swift.replication_network == swift.storage_network %}
|
||||
[account-replicator]
|
||||
log_facility = LOG_LOCAL2
|
||||
per_diff = 10000
|
||||
|
@ -33,7 +33,7 @@ log_facility = LOG_LOCAL3
|
||||
recon_cache_path = /var/cache/swift
|
||||
recon_lock_path = /var/lock/swift
|
||||
|
||||
{% if swift.replication_network is not defined %}
|
||||
{% if swift.replication_network is not defined or swift.replication_network == swift.storage_network %}
|
||||
[container-replicator]
|
||||
log_facility = LOG_LOCAL3
|
||||
{% endif %}
|
||||
|
@ -35,7 +35,7 @@ log_facility = LOG_LOCAL4
|
||||
recon_cache_path = /var/cache/swift
|
||||
recon_lock_path = /var/lock/swift
|
||||
|
||||
{% if swift.replication_network is not defined %}
|
||||
{% if swift.replication_network is not defined or swift.replication_network == swift.storage_network %}
|
||||
[object-replicator]
|
||||
log_facility = LOG_LOCAL4
|
||||
concurrency = 6
|
||||
|
Loading…
x
Reference in New Issue
Block a user