systemd questions

Tomasz Torcz tomek at pipebreaker.pl
Thu May 19 17:37:45 UTC 2011


On Wed, May 18, 2011 at 11:04:33PM +0200, Lennart Poettering wrote:
> On Mon, 16.05.11 14:30, Simo Sorce (ssorce at redhat.com) wrote:
> 
> > 
> > On Mon, 2011-05-16 at 18:59 +0200, Lennart Poettering wrote:
> > > On Mon, 16.05.11 14:32, Michal Hlavinka (mhlavink at redhat.com) wrote:
> > 
> > > > when ups recieves command for shutdown, it does not shutdown power 
> > > > immediately, but after 30 seconds. Given that this command should be executed 
> > > > after umount, synced disks,... when everything is ready for power off...
> > > > 30 seconds proved to be enough time for this.
> > > 
> > > This is not the case and never has been the case. The root disks
> > > traditionally could not be unmounted and hence MD/DM/MP and so on could
> > > not be disassembled before going down.
> > > 
> > > Delaying shutdown by 30s is hack, not a fix for a race.
> > 
> > What race are we talking about exactly ?
> 
> Host requests power down from UPS in 30s. Host then continues shut
> down. If the host now ends up taking more time then expected for
> shutting down it might still be busy at the time of the power going
> away. It's a race between "UPS powering off" and "system finishing
> shutdown". It's a bet that your system is faster than 30s when
> unmounting the remaining file systems, syncing the MD/DM metadata to
> disk, syncing ATA and so on (i.e. all the stuff the kernel does when you
> invoke the reboot() syscall).

  reboot() do not seem to be wise choice.  After 30s pass, computer
may be in the middle of boot are even be fully restarted.  UPS terminating
power then would made mess it should prevent.

-- 
Tomasz Torcz                        To co nierealne -- tutaj jest normalne.
xmpp: zdzichubg at chrome.pl          Ziomale na życie mają tu patenty specjalne.



More information about the devel mailing list