Bug 877343
Summary: | access to not existent file /var/cache/swift/account.recon | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Jaroslav Henner <jhenner> | ||||||||||
Component: | openstack-swift | Assignee: | Pete Zaitcev <zaitcev> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | Martina Kollarova <mkollaro> | ||||||||||
Severity: | low | Docs Contact: | |||||||||||
Priority: | low | ||||||||||||
Version: | 2.0 (Folsom) | CC: | derekh, jhenner, markmc, mrunge, ncredi, zaitcev | ||||||||||
Target Milestone: | snapshot4 | Keywords: | Triaged | ||||||||||
Target Release: | 2.1 | ||||||||||||
Hardware: | x86_64 | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | openstack-swift-1.7.4-8.el6ost | Doc Type: | Bug Fix | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | 870409 | Environment: | |||||||||||
Last Closed: | 2013-03-21 19:03:15 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | 870409 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
Jaroslav Henner
2012-11-16 10:01:26 UTC
This is quite mysterious. I have an RHEL 6 box where something created /var/cache/swift, even set permissions right. I swear I did not create it. But I cannot find anything scripted in the distro that did. Obviously it needed root privilege. Although the symptom is harmless, it is extra noise and we should fix this. (In reply to comment #1) > This is quite mysterious. I have an RHEL 6 box where something created > /var/cache/swift, even set permissions right. I swear I did not create it. > But I cannot find anything scripted in the distro that did. Obviously > it needed root privilege. > > Although the symptom is harmless, it is extra noise and we should fix this. Did you use the puddles or did you use devstack? I think I pulled packages one by one out of releng tree instead of using puddles as such. Should be same packages. In any case, I was wrong. Apparently I created those myself and forgot: [root@kvm-ni zaitcev]# history | grep cache 788 mkdir /var/cache/swift 789 chown swift /var/cache/swift 923 yum install memcached 924 service memcached start 976 grep /var/cache /var/log/messages Created attachment 676014 [details]
Candidate fix 1
Created attachment 676015 [details]
Candidate fix 2
Oops, forgot to include the new files. This should do it.
Sorry, please disregard. It was the fix for the bug 885530. Created attachment 676543 [details]
Candidate fix 3
Third time is the charm, hopefuly.
This patch was tested by building locally and installing.
There is no need to set the group, in fact might be a bad idea.
Comment on attachment 676543 [details]
Candidate fix 3
Asking Alan to review real quick and then I'll put this into dist-git. Still training to follow the proper procedure.
Comment on attachment 676543 [details]
Candidate fix 3
Any reason %dir %attr(0755, swift, root) %{_localstatedir}/cache/swift is not in main openstack-swift package instead of multiple ownership in each subpackage?
Each subpackage would get it via dependency on the main openstack-swift package (Requires: %{name} = %{version}-%{release})
I mean, multiple directory ownership is permitted by packaging guidelines but I don't see the reason here, so adding Matthias for the second opinion.
I thought the extra directory unnecessary with a "naked" swift, e.g. if someone only wanted tools. It's a trivial cost, however. (In reply to comment #9) > Any reason %dir %attr(0755, swift, root) %{_localstatedir}/cache/swift is > not in main openstack-swift package instead of multiple ownership in each > subpackage? > Each subpackage would get it via dependency on the main openstack-swift > package (Requires: %{name} = %{version}-%{release}) > I think, that's exactly the way to go. > I mean, multiple directory ownership is permitted by packaging guidelines > but I don't see the reason here, so adding Matthias for the second opinion. Yes, you may have multiple packages requiring the same directory. In my experience, that make things unnecessarily complicated and will cause issues. if rpm gets stricter. If you don't like to have the main package owning that dir, you also might introduce a dir-owning package, which is required by all packages requiring access to that dir. Created attachment 700131 [details]
Candidate fix 4
This version addresses Mattias' review. Now the main package owns
/var/cache/swift.
modified in openstack-swift-1.7.4-8 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0672.html |