Bug 2080

Summary: mythbackend does not restart when it unexpectedly exits
Product: Fedora Reporter: Patrick Higgins <patrick.allen.higgins>
Component: mythtvAssignee: Richard <hobbes1069>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P5    
Version: 16   
Hardware: All   
OS: GNU/Linux   
namespace:

Description Patrick Higgins 2011-12-08 17:11:38 CET
I found that mythbackend failed to start once because it was not able to connect to mysql. Perhaps the root cause is a race condition on startup between mysql and mythbackend, but this caused some shows to not be recorded that we really wanted to see. I think that setting "Restart=always" in the mythbackend.service systemd file should have fixed this problem, as well as any other problems that would cause mythbackend to exit unexpectedly. I argue that this option is important because mythbackend (for me) is extremely important to be running. I realize that this may obscure bugs and prevent them from being reported, but to make sure that shows get recorded, I argue that the trade-off is worth it.
Comment 1 Richard 2011-12-08 17:19:10 CET
For this particular failure I agree with you, however, I don't think we can detect why mythbackend didn't start. If there was a more serious issues, such as database corruption, I don't think you'd want to make it worse by repeatedly trying to start.

The systemd unit file already requires mysql be started. I think the best approach if it can be accomplished is to find out why systemd started mybackend before mysql was ready to accept connections. 

Also keep in mind, if you want to customize the unit file just copy it into /etc/systemd/system and modify as much as you want. Don't modify it in /lib/systemd/system because it will be over-written on the next mythtv update.

Come to think of it, it wouldn't hurt to add this verbage to the unit file.

Richard
Comment 2 Richard 2011-12-27 14:55:36 CET
Can you still reproduce this problem? I'd like to take it to the Fedora mailing list to see if this is a problem with systemd or with mysql but I'd like a conformation before doing so.

Thanks,
Richard
Comment 3 Richard 2012-01-30 02:43:07 CET
I'm going to call this INVALID but if you want the ability to restart just copy the service file to /etc/systemd/service and modify it.