Description of problem: Attila noted that swift can be restarted gracefully. https://bugzilla.redhat.com/show_bug.cgi?id=885888#c4 It would be trivial to make swift's initscript 'reload' section call the correct swift-init commands to do a graceful restart.
I meant 'restart', not 'reload'.
The patch has merit. I think it makes sense to restart server instances this way to reduce the risk of inconsistencies. Alan pointed out that folding it into "reload" is misleading, since it's not actually. It's a soft shutdown, then restart. In this case it's the terminology that Swift itself uses, e.g. "swift-init reload object-server" is what the patch does. But in RHEL this may violate the principle of least surprise. If this is really objectionable, we may throw out the "reload" and keep the "shutdown" at least, that one is surely good. Just to make it more fun, Swift servers reload rings when they detect the timestamp change. So you only need this "reload" if configuration changes in material ways. Which is never.
Created attachment 740237 [details] Candidate 2 I talked to Greg Holt about the practices of shutdown, and he said that in RAX they do not do the shutdown as a part of a scripted restart. Instead, they do the HUP thing and leave the system alone for a day, then kill all the stuck processes, if any. So, I propose this: - do not implement the "reload". This way we stick with KISS principle and no user thinks that configurationg or ring is reloaded. - implement shutdown without waiting. Atilla needed it in order for reload to work. Hope this does the trick. Opinions? P.S. patch goes on top of the patch for Jaroslav's bug 917657, pay it no mind. It's trivial to adapt to 2.1 async if needed.
ACK on design from me. Attila?
It would be nice if it was more explicit what is a soft and what is hard shutdown. Maybe add some note about it in the help message? Also, I'm not getting a newline, so the output gets mangled up. This does not happen with the 'restart' command, for example. [root@server ~]# service openstack-swift-proxy shutdown [root@server ~]# ack-swift-proxy: [ OK ] Any ideas about how to test if something really does a hard/soft stop of the service?
As requested, I created another bug #971881 for the cosmetic issues.
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/RHEA-2013-0934.html
(In reply to Martina Kollarova from comment #11) > Any ideas about how to test if something really does a hard/soft stop of the > service? To test the condition one has to start a longish transfer and shut down services that are involved, such as proxy. The transfer should complete successfully. Sorry, this came too late, but in case.