On Thu, Oct 09, 2014 at 12:55:25PM +0300, Apollon Oikonomopoulos wrote: > On 11:44 Thu 09 Oct , Willy Tarreau wrote: > > OK, so I'm merging your patch if you think it's the best solution. > > Well, I think it's the most sane thing to do and is behaviour-compatible > with the current wrapper version.
It's already merged in both 1.5 and 1.6. > > > > I'm really amazed by the amount of breakage these new service managers > > > > are > > > > causing to a simple process management that has been working well for > > > > over > > > > 40 years of UNIX existence now, and the difficulty we have to work > > > > around > > > > this whole mess! > > > > > > I guess every new system has its difficulties and learning curve, > > > especially when it breaks implicit assumptions that hold for a long > > > time. > > > > Well, we're far away from the learning curve, we're writing a wrapper > > to help a stupid service manager handle daemons, because the people who > > wrote it did not know that in the unix world, there were some services > > running in background. "ps aux" could have educated them by discovering > > that there were other processes than "ps" and their shell :-/ > > Truth is, we're writing a wrapper to handle gracefully reloading HAProxy > by completely replacing the master process. Yes, which seems normal to me. Otherwise how do you upgrade a service without replacing the master process ? People are performing their seamless version upgrades everywhere thanks to this. > Other than that, systemd is > plain happy with just HAProxy running in the foreground using -Ds. I > even have a suspicion that we don't need the wrapper at all to do > graceful reloading. I have to do some experiments on that and I'll come > back to you. Quite frankly, I don't see how it makes sense to run a *daemon* in foreground, except to hide the flaws of the service manager. It also prevents running in multi-process mode. A daemon runs in background, with or without sub-processes, and may be replaced at any moment for various reasons ranging from config changes, upgrades and operations or mistakes from the admin. Anyway we're not there to discuss the benefits or defaults of systemd, some major distros have adopted it and now we have to work around its breakages so that users can continue to use their systems as if it was still a regular, manageable UNIX system. So thanks for your patch :-) Willy

