systemd questions

Lennart Poettering mzerqung at 0pointer.de
Thu May 19 12:59:57 UTC 2011


On Wed, 18.05.11 19:42, Simo Sorce (ssorce at redhat.com) wrote:

> > > > 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).
> 
> You do realize that it is a race to get it done before the UPS runs out
> of battery anyway ?

That is unfortunate, but shutting down even earlier than that makes the
problem worse, not better.

> It's not perfect, but sysadmins are capable of assessing how much time
> each of their server needs to shut down and make the UPS wait long
> enough (battery permitting of course).

Well, if everything goes well. But often things don't go well and since
power failures are the exception and not the rule (at least in .de)
relying that admins guess the right times is not realistic.

> > > You do realize that the *UPS* itself is programmed to shut down after
> > > 30 seconds ? there is no sleep(30) here ...
> > 
> > Yes, but that is irrelevant for the race.
> 
> Call it a race, call it a run, doesn't matter it is how things works in
> this world right now.
> 
> I guess you could try to convince UPS vendors to use better ways, but
> that's not how physical devices available to the public work right
> now.

Uh? This is a software problem, not a hardware problem!

> > > Oh this was *very* clear, no doubt you have never seen one. And given
> > > you haven't can you stop prescribing how things should work and instead
> > > discuss how we can make things work as things stand now ?
> > 
> > Well, I am not stupid. I can see a race when there is one. Are you claiming
> > the race above doesn't exist?
> 
> You are looking at the finger while people are pointing to the moon
> right now.

And you are sticking your head in the sand.

> > > You are the one pushing systemd, it is your duty to address the cases
> > > when it has to step out of the perfect world and actually meet the
> > > reality of how things actually work out there.
> > 
> > Right, and so I did. And I also pointed out that the current scheme is
> > borked.
> 
> I am sorry that reality bothers you so much, but it is the hard old real
> world ...

See, I am so young, I still have the idealism that we can fix what is
broken.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list