swift-init restart may not start

Bug #1324620 reported by NMarcos
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
In Progress
Undecided
Lorcan Browne

Bug Description

If the proxy process take more than 15 seconds to stop we can get undesired results, with a restart:

$ swift-init proxy restart
Signal proxy-server pid: 22052 signal: 15
Waited 15 seconds for proxy-server to die; giving up
WARNING: Unable to modify max process limit. Running as non-root?
proxy-server running (22052 - /etc/swift/proxy-server.conf)
proxy-server already started...

$ ps -ef|grep proxy
swift 22093 22052 0 May18 ? 00:05:12 [swift-proxy-ser] <defunct>
swift 22094 22052 0 May18 ? 00:05:13 [swift-proxy-ser] <defunct>

After a few seconds:

$ps -ef|grep proxy
(no results)
$

1 - proxy-server is stopping and still exists, so the swift-init refuses to start a new process.
2 - However the "stop" command finishes after a few seconds.
3 - Since the start command thought the process was running, it does nothing.
4 - The final result is that the proxy-server is not running

Suggestion: the restart command should only execute "start" if the "stop" command finishes with success. Otherwise it should return a error message to the user.

NMarcos (nelsonmarcos)
summary: - swift-init restart may doesn't start
+ swift-init restart may not start
description: updated
Changed in swift:
assignee: nobody → Lorcan Browne (lorcan-browne)
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/116944

Changed in swift:
status: New → In Progress
Revision history for this message
Lorcan Browne (lorcan-browne) wrote :

Uploaded change for review: https://review.openstack.org/#/c/116944/

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.