Comment 17 for bug 470672

Revision history for this message
schaze (schaze) wrote :

@Thomas Mashos:

These are some very good points. I was only concentrated on my problem on my particular setup and did not think about the 'big picture'.

Hal is still in Lucid but not installed by default and deemed to be deprecated. I agree that a solution should better not be based on it.

To define it in detail the dependencies are the following:
 - mysql-backend needs to wait for the related database before starting.
   I believe at the moment mysql-backend tries several times (don't know for how long) to reach the database if it is started before the db is available. During this time I believe the backend-end is however not listening for incoming connections. So this is basically already working. However there should be a way for clients that try to connect to get aware of such a situation.

 - the frontend should wait until the related backend is ready.
   There is a start script and config file for mythfrontend already. It should be an easy thing to enhance this in order to wait for a backend to be ready.

One very basic solution I could think of would be to change the startscript for mythfrontend to do the following:
 - try to connect to the database
 - try to connect to the backend
 - do the above steps for a configurable time or amounts with sleeps in between.

The connects for the backend could maybe be done by the use of the python bindings.
For the database: can mythtv run with another db than mysql - I believe not? if yes then its more complicated, if no, this could be included in the python script for the backend (if the python bindings not already also try to open a mysql connection in parallel)

I would really try to help solving this bug also by providing a script of any sort or doing an update to en existing one.

Please let me know who is responsible so we could agree on a solution and I can then (if this is wanted) provide the implementation.

cheers,
schaze