[mythtv-users] Slave backend reboot procedure

Angela angela.schmid at wolke7.net
Tue Mar 26 17:06:25 UTC 2019


> From: mythtv-users [mailto:mythtv-users-bounces at mythtv.org] On Behalf
> Of Stephen Worthington

> Both MySQL and MariaDB are very good at starting up and binding their
> required network interfaces.  They start up as soon as localhost does, and
> after that register themselves for messages from the system about network
> interfaces coming up and down.  On each of those messages, they check the
> interface that has changed, decide whether they are using it, and then
bind
> or unbind it.  This method of binding network interfaces is the gold
standard
> way of doing it, but unfortunately takes quite a bit of effort by the
authors,
> and MythTV does not do this.  MythTV simply looks at the network
interfaces
> available at the time it starts up, and binds any that are available and
match
> what it wants to bind to.  After startup, MythTV does not check for any
> changes to the interfaces, either coming up or going down.  So while MySQL
> and MariaDB can start at any time and will still get all their network
interfaces,
> MythTV requires that it only be started after all its network interfaces
are
> already available - they must be up and have all their IP addresses
assigned.
> So if an interface has both
> IPv4 and IPv6 addresses, or has more than one IP or IPv6 address, all the
> ones MythTV wants must be up.

There exists several options:
- use default route 0.0.0.0 or [::] to bind, these are instantly available,
use a firewall for unwanted interfaces
- using rtnetlink for network changes (programmatically)
- freebind-sockopt, to bind to interfaces which are not yet available
(programmatically)

Only mysql v8 supports multiple bind-addresses, so to bind to multiple
addresses for older versions needs to bind to 0.0.0.0.

>  If you need to wait for more than
> one network connection (eg multiple network tuners or a network tuner and
> a master backend), then create multiple "full-internet.service" files
(with
> different
> names) and have the mythbackend .service file wait on all of them.
> Note that full-internet.service itself waits for NetworkManager-wait-
> online.service before it runs.  So you will need to enable that service if
you
> have not already.  And if you are not using Network Manager, you will need
> to use a different target for starting full-internet.service.

That network-online.target works correct and you advice to enable
NetworkManager-wait-online.service, On a Ubuntu server systemd-networkd is
used.
Only one of them should be enabled:
systemctl is-enabled systemd-networkd-wait-online.service
systemctl is-enabled NetworkManager-wait-online.service

The service should have:
After=network-online.target
Wants=network-online.target

Cheers
Angela



More information about the mythtv-users mailing list