[Pkg-sysvinit-devel] Bug#717488: Bug#717488: Please always launch /etc/init.d/ups-monitor when halting the system

Henrique de Moraes Holschuh hmh at debian.org
Sat Jul 27 16:56:20 UTC 2013


On Fri, 26 Jul 2013, Fabien C. wrote:
> On 26/07/2013 03:06, Henrique de Moraes Holschuh wrote:
> > It is basically not a good idea at all to cut power instead of issuing a
> > hardware shutdown command.  Lots of stuff on server boxes get highly pissed
> > off if you just cut power.
> 
> Hmmm, "shutdown -hH" still shuts down the disks, and halts the CPU. I think the 
> *only* thing it does not is cut the power, but the system is already ready to
> lose it.  

No, you did not tell the baseboard management controller and friends that
you want to shutdown, and they will not only fail to do an ordered shutdown,
but also raise alarms that power was lost and an unclean shutdown happened.

And since this is x86, the only way to tell the platform that you want a
shutdown in the first place is to try to issue a platform "poweroff"
command.  There is no platform "halt" command.

> > I would have to put some effort to recall all the trouble we had in the past
> > to access whether we can support this proposed change, though.
>  
> You are probably referring to this discussion, which I read:
>  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358696  
> 
> Well, we could make it an option if you think it is not a good idea to have it
> as default. 

It is impossible to have it as a default.  So yes, if we do it, it would
_have_ to be an option.

> > What is important is that we must not break the sane scenario, where you
> > have the box properly configured to always power up on power restore, and
> > the UPS configured to always cycle the load once the load (i.e. us) signals
> > that it is past the point of no return (i.e. that it will require a power
> > cycle to restart -- in Debian, that pretty much means as soon as we switch
> > to runlevel 0).
> 
> I don't think "always power up on power restore" is a "properly configured" 
> box. If a box is off, that is very probably for a good reason, and I *don't*

Your use case is not the most common, nor the only use case.

> want it to power up based on some random event like power outage... What the 
> "normal" people want is to get back to the state the machines were before the
> power problem occured, no more, no less. That is restore last power state.

This is not possible to do sanely on an architecture that cannot
differentiate from administrative shutdown and operational shutdown, or that
doesn't even have a "halted-but-powered-on" state anyway.

> > Also, shutdown -H must NOT issue a UPS power off command [by default], it is
> > documented to not do it.
> 
> We make the documentation, don't we? 

You've got to be kidding me.  Who knows how many boxes and scripts out there
depend on the current, documented, shutdown -H behaviour?

Bugs we fix.  Functionality working as designed, we don't change like that.
You can request a NEW option for shutdown that does what you want, though.
Or you can have an optional, non-default way to change -H to do what you
want.  Those are your two choices.

> Also, I would add that /etc/init.d/ups-monitor does *not* cut the power off if 
> the UPS is not running on battery. 

Then, it is broken, unless something else is issuing the proper
synchronization commands to the UPS.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



More information about the Pkg-sysvinit-devel mailing list