[mythtv-commits] Ticket #7762: Autoshutdown slave feature enhanced
MythTV
mythtv at cvs.mythtv.org
Tue Feb 9 20:57:26 UTC 2010
#7762: Autoshutdown slave feature enhanced
-------------------------------+--------------------------------------------
Reporter: gmembre@… | Owner: cpinkham
Type: enhancement | Status: assigned
Priority: minor | Milestone:
Component: MythTV - General | Version: unknown
Severity: medium | Mlocked: 0
-------------------------------+--------------------------------------------
Comment(by simonwalls@…):
Hi gmembre,
Aha. Glad to know you have the same configuration as me, that helps.
I guess the sight of DB accesses for DailyWakeup periods got me looking,
since I use a cron-based daily wakeup for transcoding. Do you now support
the use of the DailyWakeup DB definitions to wake up a slave (for
transcoding, for example) ?
If so, they would need to be set for each Slave backend, whereas right now
there is one set only - intended I think for a combined BE/FE system.
Anyway I have got to the root of my problem. My system is set up as
described in cpinkham's patch [20084] where each Slave has a DB value
SleepCommand (I used /sbin/shutdown -h +3). Your patch changes that to use
the HaltCommand which is under Setup->General. I think this is aimed at
making the Master server halt whereas cpinkham's can be different for each
Slave. You may be lucky in that the same command works on all your
machines.
The reason mine was not sleeping was due to this:
{{{
2010-02-09 19:19:54.724 CheckShutdownServer returned - OK to shutdown
2010-02-09 19:19:54.726 MainServer, Warning: Unknown socket closing
MythSocket(0x8e12688)
2010-02-09 19:19:54.736 MythSocket(8e12688:-1): writeStringList: Error,
socket went unconnected.
We wrote 0 of 10 bytes with 1 errors
2010-02-09 19:19:54.739 New DB connection, total: 4
2010-02-09 19:19:54.758 Connected to database 'mythconverg' at host:
192.168.1.7
2010-02-09 19:19:54.769 Running the command to shutdown this computer :-
sudo /sbin/halt -p
sudo: sorry, you must have a tty to run sudo
2010-02-09 19:19:54.872 ServerHaltCommand failed, shutdown aborted
}}}
Not only was it using the HaltCommand, which I had left at default (I
believe), it was failing on my system with a sudo problem. This is on a
Fedora 11 system, and that particular problem may affect others trying to
use sudo from within Myth.
So, I have changed my copy of the patch to be more like [20084] and use
the SleepCommand again, sorry about that, but I think it fits better that
way.
I've also added a few more diagnostic log entries, showing what is going
on with the OK or BUSY responses from the slave. I changed one of your
lines from SCHEDULE+EXTRA back to IMPORTANT since it's important to know
if a slave is asked to shut down, you might not see it if you don't run
with schedule+extra logging all the time.
I'll be testing it in the next few days as the system is busy tonight.
I've attached it anyway, though, but be aware it is untested for now other
than compilation. File: SWpatch_shutdownEnhanced09Feb.diff
Cheers, Simon.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7762#comment:4>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list