Swift-init doesn't indicate permissions issues

Bug #1017494 reported by Coleman Corrigan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Darrell Bishop

Bug Description

Its an annoyance when running swift-init status all indicates that no services are running, when in actual fact you just haven't sudoed / su -ed to the swift account.

I'd like to propose Philipp Moelders' fix to the issue as follows:

diff --git a/swift/common/manager.py b/swift/common/manager.py
index 902d188..e5b4c4f 100644
--- a/swift/common/manager.py
+++ b/swift/common/manager.py
@@ -432,6 +432,8 @@ class Server():
                     if kwargs.get('verbose'):
                         print _("Removing stale pid file %s") % pid_file
                     remove_file(pid_file)
+ elif e.errno == errno.EPERM:
+ print "No permission to signal this process!
             else:
                 # process exists
                 pids[pid] = pid_file

Tom Fifield (fifieldt)
Changed in swift:
status: New → Confirmed
Changed in swift:
assignee: nobody → Darrell Bishop (darrellb)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

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

Changed in swift:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/13990
Committed: http://github.com/openstack/swift/commit/57ebd1791088418634cd2cb84d3f475887af25ba
Submitter: Jenkins
Branch: master

commit 57ebd1791088418634cd2cb84d3f475887af25ba
Author: Darrell Bishop <email address hidden>
Date: Wed Oct 3 08:28:36 2012 -0700

    Warn when killing fails with EPERM

    Have swift-init warn when the running user doesn't have permissions to
    signal processes. Fixes bug 1017494.

    Change-Id: Icb9048ab36f1ca73bb93b11c9c2aed882d99dfa7

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.7.5
status: Fix Committed → Fix Released
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.