(re)starting of a daemon after package update

Reindl Harald h.reindl at thelounge.net
Wed Jun 20 16:50:01 UTC 2012

Am 20.06.2012 18:26, schrieb Panu Matilainen:
>> i was there, i saw was happened on dist-upgrades, i fixed them
>> i saw a dist-upgrade on the fist-testmachine restart httpd
>> which failed for some reason and AFTER some time you could
>> start httpd again
>> * i rebuilt the httpd package
>> * i removed the dumb restart from the SPEC file
>> * i rolled out the dist-upgrade on 20 production machines
>> * no second downtime of httpd except the usual reboot
>> don't get me wrong, but i am not interested in theory
>> i am intersted in stable update-processes whch were painless
>> years ago and now can only be achievd be rebuilt a lot of pakcages
> "Some reason" can't be analyzed... but like said, there certainly are all sorts of gaps and holes where things can
> be temporarily broken while a transaction is running, including file-renames, old files from previous version still
> being around, dependencies (such as service inter-dependencies) which rpm does not know about, dlopen()'ed
> libraries etc. Most of the time things work well enough that nobody notices, but an assumption that the system
> stays in a fully consistent state throughout an online update is simply bogus, service restarts or not

i know that

a dist-upgrade takes usually 5 minutes on a virtual server
there is nearly zero chance httpd would crash in this time
there is much more chance it goes down by the restart

services like mysql as example MUST NEVER get automatically
restarted because the package-maintainer can not know
what implicatons this have as for postfix having configuration
mysql based rejecting incoming messages

so in the case of a mysqld upgrade on our mailsevrer i MUST
use the follwoing steps and i MUST prevent mysqld package
from restarting and that is why automatic restart of services
without a GLOBAL option to DISABLE THIS bogus and naive

and es the order of this stop/start is VERY IMPORTANT

[root at mail:~]$ cat /scripts/dbmail-stop-all.sh
/sbin/service crond stop
/sbin/service postfix stop
/sbin/service dovecot stop
/sbin/service dbmail-imapd stop
/sbin/service dbmail-lmtpd stop
/sbin/service dbmail-pop3d stop
/sbin/service dbmail-timsieved stop
/sbin/service mysqld stop

[root at mail:~]$ cat /scripts/dbmail-start-all.sh
/sbin/service mysqld start
/sbin/service dbmail-lmtpd start
/sbin/service dovecot start
/sbin/service postfix start
/sbin/service dbmail-imapd start
/sbin/service dbmail-pop3d start
/sbin/service dbmail-timsieved start
/sbin/service crond start

i restart services by hand
i know what i am doing
i do not need any helping hand restarting anything magically
i do not want it because it is not consistent

since it is not consistent it is wrong to do it

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20120620/1e844315/attachment.sig>

More information about the devel mailing list