permission on swift log directories incorrect

Bug #1539207 reported by Alex
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Medium
Andy McCrae

Bug Description

On liberty branch, was not seeing any log files for swift. Turns out log dirs were owned by swift:swift, but all logging goes through syslog, so must be syslog:syslog.

Simple patch is below:

diff --git a/playbooks/roles/os_swift/tasks/swift_pre_install.yml b/playbooks/roles/os_swift/tasks/swift_pre_install.yml
index 5bb0c3f..e3a292e 100644
--- a/playbooks/roles/os_swift/tasks/swift_pre_install.yml
+++ b/playbooks/roles/os_swift/tasks/swift_pre_install.yml
@@ -87,8 +87,8 @@
 - name: Test for log directory or link
   shell: |
     if [ -h "/var/log/swift" ]; then
- chown -h {{ swift_system_user_name }}:{{ swift_system_group_name }} "/var/log/swift"
- chown -R {{ swift_system_user_name }}:{{ swift_system_group_name }} "$(readlink /var/log/swift)"
+ chown -h syslog:syslog "/var/log/swift"
+ chown -R syslog:syslog "$(readlink /var/log/swift)"
     else
       exit 1
     fi

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

Better to patch https://github.com/openstack/openstack-ansible/blob/master/playbooks/roles/os_swift/tasks/swift_pre_install.yml#L90-L91 to use the syslog user - this allows swift to write there and rsyslog to read there.

Changed in openstack-ansible:
status: New → Triaged
importance: Undecided → Medium
milestone: none → mitaka-3
assignee: nobody → Kevin Carter (kevin-carter)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (master)

Fix proposed to branch: master
Review: https://review.openstack.org/275311

Changed in openstack-ansible:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_swift (master)

Fix proposed to branch: master
Review: https://review.openstack.org/287926

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible (master)

Change abandoned by Kevin Carter (<email address hidden>) on branch: master
Review: https://review.openstack.org/275311

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible-os_swift (master)

Change abandoned by Kevin Carter (<email address hidden>) on branch: master
Review: https://review.openstack.org/287926
Reason: This patch is no longer needed as its being resolved here: https://review.openstack.org/#/c/287926/

Changed in openstack-ansible:
status: In Progress → Fix Released
assignee: Kevin Carter (kevin-carter) → Andy McCrae (andrew-mccrae)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.