Mailing List Archive

Ticket #11331: Allow SBE to answer BUSY to GO_TO_SLEEP from MBE and prevent shut down - resulting in MBE to sent GO_TO_SLEEP again later
#11331: Allow SBE to answer BUSY to GO_TO_SLEEP from MBE and prevent shut down -
resulting in MBE to sent GO_TO_SLEEP again later
-----------------------------+----------------------------------
Reporter: Jan.Lentfer@… | Type: Patch - Feature
Status: new | Priority: minor
Milestone: unknown | Component: MythTV - General
Version: Unspecified | Severity: medium
Keywords: idle wake slave | Ticket locked: 0
-----------------------------+----------------------------------
The patch will allow the sleepCommand on SBE to exit with exit code 2,
which will be interpreted and sent to the MBE as "BUSY". If BUSY is
received by the MBE when trying to shutdown idle slaves it will just do
nothing (break out of the shutdown loop) and write an according notice to
the log. The scheduler will handle to come back to the relevant SBE anyway
(latest after 5 minutes afaict).

This is useful for e.g. (my use case) a SBE running on a box that does
different things, too. With the current implementation the exit code of
the sleepCommand isn't really checked - but the SBE is assumed to be going
to sleep - just by the fact that the sleepCommand is configured.

E.g. I run a XBMC frontend that also runs a mythtv SBE with DVB-S and
DVB-T. I need to run the DVB cards in there because the antenna cables end
in the living room. I don't want to run the box 24x7 and I don't want
mythtv to shut the box down while I am doing other things in xbmc, too.
Problem is now, that when the MBE sends GO_TO_SLEEP it assumes the SBE
will go to sleep... so tuners will not be available if I decide to watch
LiveTV.

That is all solved (for me) with this patch. The SBE stays "online" as
long as the box is actually doing something - and will shut down entirely
when MythTV thinks it could go to sleep AND the sleepCommand (which checks
for activitiy of all other services on this box) agrees.

This is very similar to #7762 - one might even think I stole from there -
but honestly I didn't, I was pointed to this ticket on irc.

My patch is less complex and really just changes the handling of
sleepCommands exit codes and adds an extra check in the scheduler to break
from the shutdown loop.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11331>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11331: Allow SBE to answer BUSY to GO_TO_SLEEP from MBE and prevent shut down - resulting in MBE to sent GO_TO_SLEEP again later [ In reply to ]
#11331: Allow SBE to answer BUSY to GO_TO_SLEEP from MBE and prevent shut down -
resulting in MBE to sent GO_TO_SLEEP again later
------------------------------+-----------------------------
Reporter: Jan.Lentfer@… | Owner:
Type: Patch - Feature | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Unspecified
Severity: medium | Resolution:
Keywords: idle wake slave | Ticket locked: 0
------------------------------+-----------------------------

Comment (by Jan.Lentfer@…):

Forgot to mention: The patch is against head - this is untested. I wrote
and tesed the patch against 0.24.2 as this is still the version I am
running. I think the patch is trivial enough for this being considered ok.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11331#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11331: Allow SBE to answer BUSY to GO_TO_SLEEP from MBE and prevent shut down - resulting in MBE to sent GO_TO_SLEEP again later [ In reply to ]
#11331: Allow SBE to answer BUSY to GO_TO_SLEEP from MBE and prevent shut down -
resulting in MBE to sent GO_TO_SLEEP again later
------------------------------+------------------------------
Reporter: Jan.Lentfer@… | Owner: (none)
Type: Patch - Feature | Status: new
Priority: minor | Milestone: needs_triage
Component: MythTV - General | Version: 0.24.2
Severity: medium | Resolution:
Keywords: idle wake slave | Ticket locked: 0
------------------------------+------------------------------
Changes (by Stuart Auchterlonie):

* version: Unspecified => 0.24.2
* milestone: unknown => needs_triage


--
Ticket URL: <https://code.mythtv.org/trac/ticket/11331#comment:2>
MythTV <http://www.mythtv.org>
MythTV Media Center