Re: [Apcupsd-users] status not reset on return from hibernate
Brought to you by:
adk0212
|
From: Ted M. <te...@mi...> - 2013-12-01 19:24:03
|
There are so many things so very, very wrong with this - where to start? First thing first, definition of a server is a device that is up 24x7 so that it's resources can be available immediately, on demand, whenever needed. It is also supposed to be highly reliable with hardware redundancy when practical. If your power in your area is so bad that the server is regularly shutting down for long periods of time, then you need a generator and an automatic transfer switch. Or a larger UPS with extended length batteries. If you need the server so rarely that your deliberately throwing it into hibernation then you need to push all that to the cloud. Contact Rackspace. If you cannot restart items on the server without someone being physically present then your remote access to the server is inadequate, you should be using a KVM that allows you to remote into the KVM to get at the console - or using a HP Proliant with an ILO card or a Supermicro with a remote card, or Dell with Openmanage, etc. along with monitoring that tells key people if it goes down so that it can be checked into. In short, the problems your having are structural, environmental. A workstation could be expected to be shutdown into hibernation by a UPS because doing it that way is a terrible hack, but terrible hacks are acceptable in workstations because the expectation is that they are employed in an emergency, and the workstation will be restarted with someone there. That's why SATA fakeraid is acceptable for workstations, for example. A workstation ultimately is a non-critical device and a certain extent of brokenness is acceptable on it. What you have is a glorified workstation, pretending it's a server. Putting windows server on a workstation does not make it a server. A server is more than server-class hardware and software, it is the environment also, as well as the willingness to make it reliable and intolerance for unreliability on it. I have seen the most expensive HP Proliant Servers running enterprise operating systems but used in an environment and in a way that makes them nothing more than a workstation. I have seen clone workstation gear judiciously upgraded with the right parts and used in an environment and used in a way that makes it a server beyond question. You don't have a server and the most telling thing about it is that if you did, the moment you realized USB wasn't working for it, you would spend the money on the right hardware. But you don't have the willingness to spend what it takes to make your "server" reliable, so I'm sorry but you simply don't have a server, because of that reason. Thus, you will have to be content with hacked up, unreliable solutions, because that is what workstations embrace - the good and the hacked up unreliable solutions. The problem your having isn't one with apcupsd, it is your entire approach here. No doubt I'll hear some "I guess we will have to agree to disagree" from you, but no matter, eventually you will understand what I have said here. Ted On 12/1/2013 7:46 AM, Ian S. Worthington wrote: > Thanks Ted, I'll keep an eye on it. > > Actually it /is/ a server. But we have a lot of stuff loaded in ram which we > can't easily shut down without manual intervention so hibernation seems the > best way to go. Moving from a Windows 2003 server which hibernated fine with > a usb-connected ups so it seemed a sensible choice at the time. > > i > > ------ Original Message ------ > Received: 02:10 AM COT, 12/01/2013 > From: Ted Mittelstaedt<te...@mi...> > To: "Ian S. Worthington"<ian...@us...>Cc: > apc...@li... > Subject: Re: [Apcupsd-users] status not reset on return from hibernate > >> >> If you do restart the daemon and for whatever reason it stays >> at SHUTTING DOWN then it will likely loop. >> >> If it was a server I would say, get a UPS with a network card >> and use a websnmp network card in the UPS. USB does not meet the >> reliability test. >> >> But no server ever goes into hibernation so this is obviously a >> workstation, and what you setup is perfectly OK for a workstation. >> >> Ted >> >> On 11/30/2013 4:51 AM, Ian S. Worthington wrote: >>> Thanks Ted. >>> >>> It is connected via USB, yes. And now you mention it, there's a > mysterious >>> message on the console during hibernation: >>> >>> usbhid suspend error -5 >>> >>> Sounds like this may have something to do with it? >>> >>> This is on a Haswell mobo which may (or may not) have the broken C1 > stepping >>> PCH affecting USB enumeration on return from S3. Hibernate is S0 though, >>> isn't it? Any chance this could still be related? >>> >>> Is a loop likely? If I /don't/ restart the daemon it does stay at > SHUTTING >>> DOWN which doesn't loop, but does cause it to ignore future triggers. >>> >>> i >>> >>> ------ Original Message ------ >>> Received: 12:53 AM COT, 11/30/2013 >>> From: Ted Mittelstaedt<te...@mi...> >>> To: apc...@li... >>> Subject: Re: [Apcupsd-users] status not reset on return from hibernate >>> >>>> >>>> UPS connected via USB, right? Many USB hardware drivers out there have >>>> brokenness when coming back off hibernation. There are no deleterious >>>> effects to restarting apcupsd, other than if the USB port doesn't reset >>>> and the status stays at SHUTTING DOWN then you might end up creating a >>>> loop. >>>> >>>> Ted >>>> >>>> On 11/29/2013 8:46 AM, Ian S. Worthington wrote: >>>>> Hi. >>>>> >>>>> I've configured my doshutdown script to hibernate my system using >>> pm-hibernate >>>>> (script below). This seems to work fine except that after returning > from >>>>> hibernation the UPS STATUS remains as SHUTTING DOWN (iirc?), which > seems >>> to >>>>> prevent subsequent triggers from being actioned. >>>>> >>>>> In order to reset it I've added a "apcupsd restart" to the script, > which >>> seems >>>>> to work, but I'm not sure if it has any deleterious effects. Is there > a >>>>> better way? >>>>> >>>>> i >>>>> >>>>> >>>>> cat /etc/apcupsd/doshutdown >>>>> #!/bin/bash >>>>> >>>>> echo "" | mailx -s "$HOSTNAME hibernating" root >>>>> /usr/sbin/pm-hibernate >>>>> >>>>> # At this point system should be hibernated - when it comes back, we >>> resume >>>>> this script here >>>>> >>>>> echo "" | mailx -s "$HOSTNAME back from hibernation" root >>>>> >>>>> service apcupsd restart >>>>> >>>>> # On resume, tell controlling script (/etc/apcupsd/apccontrol) NOT to >>> continue >>>>> with default action (i.e. shutdown). >>>>> >>>>> exit 99 >>>>> >>>>> >>>>> >>>>> >>>>> >>> > ------------------------------------------------------------------------------ >>>>> Rapidly troubleshoot problems before they affect your business. Most IT >>>>> organizations don't have a clear picture of how application performance >>>>> affects their revenue. With AppDynamics, you get 100% visibility into >>> your >>>>> Java,.NET,& PHP application. Start your 15-day FREE TRIAL of > AppDynamics >>> Pro! >>>>> >>> > http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk >>>>> _______________________________________________ >>>>> Apcupsd-users mailing list >>>>> Apc...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/apcupsd-users >>>> >>>> >>>> >>> > ------------------------------------------------------------------------------ >>>> Rapidly troubleshoot problems before they affect your business. Most IT >>>> organizations don't have a clear picture of how application performance >>>> affects their revenue. With AppDynamics, you get 100% visibility into > your >>>> Java,.NET,& PHP application. Start your 15-day FREE TRIAL of > AppDynamics >>> Pro! >>>> > http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> Apcupsd-users mailing list >>>> Apc...@li... >>>> https://lists.sourceforge.net/lists/listinfo/apcupsd-users >>> >>> >> > > > |