[mythtv-users] RFC: Using DNS-SD to bootstrap MythTV
Paul Bender
pebender at san.rr.com
Wed Feb 21 06:35:34 UTC 2007
(1) Background:
I maintain a diskless MythTV frontend distribution called MiniMyth
<http://linpvr.org/minimyth>. Since it is diskless, it has no storage
for configuration information. Currently, configuration information is
stored on a TFTP server. However, since everyone using MythTV has a SQL
database, I would like to move the configuration information into the
SQL database. In particular, I would like to put in the MythTV database
(mythcoverg).
However, there is a problem. I need to know the values of DBHostName,
DBUserName, DBPassword, DBName and DBType in order to find and connect
to the database. Therefore, this information cannot be stored in the
database.
I have a proposal to solve this problem on which I would like feedback.
(2) Proposal:
The proposal is to use DNS based service discovery (DNS-SD)
<http://www.dns-sd.org/> as defined in
<http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt> to discover
the information found in the 'mysql.txt' file. The service type
<http://www.dns-sd.org/ServiceTypes.html> would be 'mythtv-db' and the
defined TXT keys would be 'txtvers', 'DBUserName', 'DBPassword',
'DBName', 'DBType', 'WOLsqlReconnectWaitTime', 'WOLsqlConnectRetry' and
'WOLsqlCommand', and 'WOLsqlMAC'. (Note: in DNS-SD, these key names must
be treated as case insensitive).
The 'txtvers' key is the DNS-SD ID suggest version tag. The value will
be '000'.
The 'WOLsqlMAC' key does not appear in 'mysql.txt'. However, since the
DNS server may know which WOL commands the MythTV frontends support (in
fact they may not be the same for all frontends in the network), I
believe that it is cleaner to provide the MAC address that will be used
by the WOL command rather than the WOL command itself. However, a
'WOLLsqlCommand' key is available as well.
If we decide to move forward with this then it should be registered with
<http://www.dns-sd.org/ServiceTypes.html>.
Comments?
More information about the mythtv-users
mailing list