[mythtv-users] database version upgrade fail - 25->27

Mike Perkins mikep at randomtraveller.org.uk
Mon Dec 15 09:40:30 UTC 2014


On 15/12/14 03:33, Michael T. Dean wrote:
>
> This almost always means that you ran mythbackend on the master host and it
> started upgrading the database, but before it could complete the process,
> something killed it--like a "just to make sure everything is working properly"
> monitor program or upstart's built-in daemon monitor or ... or even an impatient
> user who thinks "it must be locked up" or (and this may well be the problem)
> mythtv-setup (or some script that starts mythtv-setup/mythtv-setup.real, as
> provided by some distros) if it was started while the backend was doing the
> upgrade and it killed (on its own, as some scripts, or after prompting, if
> canonical mythtv-setup) mythbackend for the user.  Then, when you started
> mythtv-setup, it tried to upgrade the
> partially-upgraded-and-now-completely-broken database and failed because of the
> failed upgrade.
>
> So, the proper thing to do now is:
>
> a) shut down everything related to MythTV (all frontends/backends/clients/...)
> b) do a complete restore (
> https://www.mythtv.org/wiki/Database_Backup_and_Restore ) of the last database
> backup to occur before *all* upgrade attempts (meaning before the original
> upgrade attempt that got cancelled, probably started by the master backend)
> c) start mythtv-setup and let it upgrade the database without interruption
>
> Since your initial database upgrade attempt(s) was interrupted, the state of
> your database (schema and data) is indeterminate, so the only proper solution is
> to go back to a known-good backup (pre-upgrade-attempts), and then do a
> successful upgrade.
>
> This is why I still want to remove all ability for mythbackend (on any host) to
> upgrade the database and require explicit upgrades.  Until I get permission,
> it's up to the users to make sure they (or their systems/scripts/...) don't
> interrupt upgrades (and/or don't ever start mythbackend until after the database
> upgrade has been performed using mythtv-setup).
>
> Mike
>
This is one of the few things that irritates me about "the Debian Way".

If you install a program or function that runs as a daemon then the install 
process *automatically* starts that daemon during the upgrade process before the 
user has any opportunity to do any configuring.

Some smart program authors get around this by including a flag in the 
/etc/defaults entry such that the flag must be manually flipped by the admin 
user - hopefully after proper configuration - before the daemon can be run 
successfully.

Actually in the case of mythtv I would agree with Mike that only the 
mythtv-setup program should be able to perform /any/ upgrades, including those 
of plugins. At the moment, upgrading a system that uses plugins involves a 
two-step process that the user can easily get wrong.

-- 

Mike Perkins



More information about the mythtv-users mailing list