Change recon_lock_path to /var/lock

The Swift configuration item [filter:recon]/recon_lock_path is set to
'/var/lock/swift' by openstack-ansible in the appropriate configuration
files. The playbooks also create the directory if it does not exist. If
the host is rebooted the directory '/var/lock/swift' is missing and must
be recreated.

/var/lock (/run/lock) is a tmpfs and so the directory /var/lock/swift
will not persist between reboots.

Swift attempts to create a directory in the directory specified by
recon_lock_path however it does not recursively create any missing
parent directories.

This commit changes the value of [filter:recon]/recon_lock_path to that
set by Swift, '/var/lock'. This allows it to create the directory
'/var/lock/swift-recon-object-cron'. The creation of '/var/lock/swift'
is also removed from the playbooks.

Change-Id: I714367b02c7cf961e9e0bdee4e41f9e4e105b088
Closes-bug: #1496117
This commit is contained in:
git-harry 2015-09-16 13:31:53 +01:00 committed by Jesse Pretorius
parent 88c948c455
commit 176107aa30
4 changed files with 3 additions and 4 deletions

View File

@ -67,7 +67,6 @@
- { path: "/etc/swift/ring_build_files" } - { path: "/etc/swift/ring_build_files" }
- { path: "/openstack/log/{{ inventory_hostname }}", owner: "syslog", group: "syslog" } - { path: "/openstack/log/{{ inventory_hostname }}", owner: "syslog", group: "syslog" }
- { path: "/var/cache/swift" } - { path: "/var/cache/swift" }
- { path: "/var/lock/swift" }
- { path: "{{ swift_system_home_folder }}" } - { path: "{{ swift_system_home_folder }}" }
tags: tags:
- swift-dirs - swift-dirs

View File

@ -31,7 +31,7 @@ use = egg:swift#healthcheck
use = egg:swift#recon use = egg:swift#recon
log_facility = LOG_LOCAL2 log_facility = LOG_LOCAL2
recon_cache_path = /var/cache/swift recon_cache_path = /var/cache/swift
recon_lock_path = /var/lock/swift recon_lock_path = /var/lock
{% if swift.replication_network is not defined or swift.replication_network == swift.storage_network %} {% if swift.replication_network is not defined or swift.replication_network == swift.storage_network %}
[account-replicator] [account-replicator]

View File

@ -32,7 +32,7 @@ use = egg:swift#healthcheck
use = egg:swift#recon use = egg:swift#recon
log_facility = LOG_LOCAL3 log_facility = LOG_LOCAL3
recon_cache_path = /var/cache/swift recon_cache_path = /var/cache/swift
recon_lock_path = /var/lock/swift recon_lock_path = /var/lock
{% if swift.replication_network is not defined or swift.replication_network == swift.storage_network %} {% if swift.replication_network is not defined or swift.replication_network == swift.storage_network %}
[container-replicator] [container-replicator]

View File

@ -33,7 +33,7 @@ use = egg:swift#healthcheck
use = egg:swift#recon use = egg:swift#recon
log_facility = LOG_LOCAL4 log_facility = LOG_LOCAL4
recon_cache_path = /var/cache/swift recon_cache_path = /var/cache/swift
recon_lock_path = /var/lock/swift recon_lock_path = /var/lock
{% if swift.replication_network is not defined or swift.replication_network == swift.storage_network %} {% if swift.replication_network is not defined or swift.replication_network == swift.storage_network %}
[object-replicator] [object-replicator]