← Back to team overview

mythbuntu-bugs team mailing list archive

[Bug 702661] Re: /etc/cron.hourly/mythvideo (jamu.py) should not run except on master backend

 

Right now,  the jamu job is included in both mythtv-frontend and
mythvideo packages, where jamu itself is only bundled with mythvideo. At
the very least, the cron job should be configured to check and see if
the jamu script actually exists before trying to run, and exit silently
if it doesn't. It would be ideal if this could also read in from
/etc/defaults/mythtv and have the option to disable it there on machines
that you don't want it running on (ie - frontend-only machines with
mythvideo installed.)

mythbackend1:/etc/cron.hourly# dpkg -S /etc/cron.hourly/mythtv-frontend /etc/cron.hourly/mythvideo 
mythtv-frontend: /etc/cron.hourly/mythtv-frontend
mythvideo: /etc/cron.hourly/mythvideo
mythbackend1:/etc/cron.hourly# cat /etc/cron.hourly/mythtv-frontend
#!/bin/sh
#Hourly massive update to ensure users see graphics coming in for upcoming recordings and current recordings
DIRECTORY=$(getent passwd mythtv | cut -d':' -f6)
if [ -f "$DIRECTORY/.mythtv/config.xml" ] && [ -x /usr/bin/mythbackend ]; then
    su mythtv -c "/usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW >> '/var/log/mythtv/jamu.log' 2>&1"
fi

mythbackend1:/etc/cron.hourly# cat /etc/cron.hourly/mythvideo
#!/bin/sh
#Hourly massive update to ensure users see graphics coming in for upcoming recordings and current recordings
DIRECTORY=$(getent passwd mythtv | cut -d':' -f6)
if [ -f "$DIRECTORY/.mythtv/config.xml" ] && [ -x /usr/bin/mythbackend ]; then
    su mythtv -c "/usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW >> '/var/log/mythtv/jamu.log' 2>&1"
fi

-- 
You received this bug notification because you are a member of Mythbuntu
Bug Team, which is subscribed to Mythbuntu.
https://bugs.launchpad.net/bugs/702661

Title:
  /etc/cron.hourly/mythvideo (jamu.py) should not run except on master
  backend

Status in Mythbuntu, Ubuntu derivative focused upon MythTV:
  Confirmed
Status in “mythtv” package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: mythplugins

  The /etc/cron.hourly/mythvideo script essentially just runs the jamu.py -MW script. The problem is that jamu.py should only be run on the master backend. When the mythvideo package is installed on a frontend only or slave backend the cron.hourly script is still created. When jamu.py runs, I get hourly spam from cron: "error (grandchild #PID failed with exit status 1)" but looking at the /var/log/mythtv/jamu.log gives several errors:
  "Jamu must be run on a MythTV backend"
  "With any -M option Jamu must be run on a MythTV backend"
  The log continues indicating a host of other problems due to artwork storage directories not existing, etc.

  I don't think that jamu.py should be run by cron on anything besides a
  master backend. Perhaps the cron.hourly/mythvideo script should do a
  check to determine what type of machine it is and exit if not a master
  backend. Alternatively this bug could be pushed upstream and have a
  way for jamu.py to exit silently if it is running from a script and
  the error is "not a backend" (and more specifically "not a master
  backend" - there's no sense having jamu run on a master backend and
  again on a slave for the same videos).

  On a side note, jamu.py should probably exit immediately when it's not
  running on a backend. There's no need to complain about video
  directories when it's already determined that the machine is not a
  backend. This is really be a bug for the jamu maintainer, I only
  include it here in case the right people see this bug for the
  mythvideo package.

  ProblemType: Bug
  DistroRelease: Ubuntu 10.10
  Package: mythvideo 0.23.1+fixes26057-0ubuntu1
  ProcVersionSignature: Ubuntu 2.6.35-23.41-generic 2.6.35.7
  Uname: Linux 2.6.35-23-generic i686
  NonfreeKernelModules: nvidia
  Architecture: i386
  Date: Thu Jan 13 15:44:39 2011
  Installed_mythplugins-dbg: 0.0
  Installed_mythtv-dbg: 0.0
  ProcEnviron:
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: mythplugins

To manage notifications about this bug go to:
https://bugs.launchpad.net/mythbuntu/+bug/702661/+subscriptions


References