Bug 809393 - pid directory needs to be created
Summary: pid directory needs to be created
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openstack-swift
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alan Pevec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-03 09:09 UTC by Derek Higgins
Modified: 2012-07-27 23:18 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-27 23:18:01 UTC
Type: Bug


Attachments (Terms of Use)

Description Derek Higgins 2012-04-03 09:09:46 UTC
[root@f16 ~]# setenforce 0
[root@f16 ~]# rpm -qa | grep -i openstack-swift
openstack-swift-container-1.4.6-2.fc16.noarch
openstack-swift-account-1.4.6-2.fc16.noarch
openstack-swift-object-1.4.6-2.fc16.noarch
openstack-swift-1.4.6-2.fc16.noarch

Starting the swift services results in a failure, 


[root@f16 ~]# /etc/init.d/openstack-swift-account start
Starting openstack-swift-account (via systemctl):  Job failed. See system logs and 'systemctl status' for details.
                                                           [FAILED]


The reason seems to be that their pid directory isn't present, 

[root@f16 ~]# ls -l /var/run/swift/
ls: cannot access /var/run/swift/: No such file or directory


Apr  3 08:55:39 f16 openstack-swift-account[1119]: Starting swift-account-server: /bin/bash: /var/run/swift/account-server.pid: No such file or directory
Apr  3 08:55:39 f16 openstack-swift-account[1119]: [FAILED]
Apr  3 08:55:39 f16 systemd[1]: openstack-swift-account.service: control process exited, code=exited status=1
Apr  3 08:55:39 f16 systemd[1]: Unit openstack-swift-account.service entered failed state.

Comment 1 Alan Pevec 2012-04-03 09:51:21 UTC
That was a bad merge from master where /var/run/ is handled by systemd.
Fixing this now in 1.4.8 rebase, workaround with 1.4.6-2.fc16 is:
# mkdir -p /var/run/swift
# chown swift /var/run/swift

Comment 2 Alan Pevec 2012-04-03 10:43:02 UTC
Ignore above, on f16 tmpfiles.d should also work, but looks like they're created only on boot!
So proper workaround is to run:
# systemd-tmpfiles --create

Packaging guidelines[1] do not mention to run this in %post, so I'm not sure how does this work for other packages!

[1] https://fedoraproject.org/wiki/Packaging:Tmpfiles.d

Comment 3 Alan Pevec 2012-04-03 11:28:39 UTC
Should read guideline more carefully, RPM still needs to include and own it:
%dir %{_localstatedir}/run/%{name}/

Comment 4 Derek Higgins 2012-04-03 11:44:12 UTC
Also these will also be needed for SAIO

/var/run/swift/{account,container,object,proxy}-server

Comment 5 Alan Pevec 2012-04-03 11:50:31 UTC
That's a bug since "Update to 1.1.0" commit
40ee63bccb8713c702b392352e69ed68f13d7c4a so needs to be fixed in all branches.

Comment 6 Derek Higgins 2012-04-03 12:00:18 UTC
I think el6 branch is ok

this commit ec12f23d55029527407cb0625fbe8f8d3fad629f seems to have fixed it for el6

Comment 8 Alan Pevec 2012-04-03 12:12:40 UTC
(In reply to comment #6)
> I think el6 branch is ok

Correct, el6 doesn't have tmpfiles.d thingy.
All other active branches (f16 and f17) will get above patch.


Note You need to log in before you can comment on or make changes to this bug.