[mythtv-users] Master backend and slave be/fe shutdown problem

Chris Pinkham cpinkham at bc2va.org
Sun Oct 25 23:59:09 UTC 2009


* On Sun Oct 25, 2009 at 02:03:42PM +0100, Ma Begaj wrote:
> There is a problem which appear in this configuration:
> >> When I start slave box master backend is running SleepCommand on every start.

Yes, if the slave backend has this setting configured, then the master
backend will command the slave backend to run this command when there
are no recordings scheduled on the slave in the next 45 minutes.

> SleepCommand on my slave is a real shutdown command. So every time I
> boot my slave box manually to watch recordings master backend wants to
> shut it down. It runs this command even before mythfrontend on this
> slave started.

The functionality to shutdown and wakeup slaves isn't fully able to do
this for slaves that are also running frontends.

If you want to use the slave shutdown wakeup functionality on a combined
slave backend/frontend, then you'll have to do several things and there
will be limitations.

Your slave's sleep command has to know whether to shutdown the system
or just shutdown mythbackend.  The backend needs to shutdown when it
is told to so that the master backend puts it in the correct state.
If you shutdown mythbackend and keep the system up in order to continue
using mythfrontend, then when you shutdown mythfrontend, you need to
shut it down in a mode such that it can be awakened by the master when
needed.  If the master needs to wakup the slave backend after you
have shut the save mythbackend process down, but have not shutdown the
frontend or physical machine, then the master will not be able to
restart the slave mythbackend process.  Supporting this is an
enhancement and I've added a note to my TODO list to add this
functionality.  It's not a large amount of work, but when I added this
functionality, I didn't intend it to be used on combined
backends/frontends.  The solution to fully supporting this on
combined frontends/backends is two-fold.  1) The slave needs to be able
to tell the master than it can not shutdown right now because the
frontend is running/busy.  2) There needs to be a way to shutdown the
slave manually and tell the master that the slave is going to sleep so
that the master knows it can wake the slave up if it needs it later.

> I read here a few times that MythWelcome should only be used on a
> single backend/frontend box but that maybe changed in the last year.

I"ve never used MythWelcome and am not sure how it interacts with
the slave wakeup/shutdown code.

--
Chris


More information about the mythtv-users mailing list