Hello, root wrote: > The current maintenance job design fails completely when the fom data is > not in the default directory, which is unavoidable when you have more > than one fom running.
I am sorry for the frustrating troubles you have been experiencing. I test all changes but I cannot emulate all possible configurations. Multi FOM's is outside the scope of what I test, though I will now add it to the battery. I would like to point out that you are running testing/unstable and with that choice, you do expose yourself to the first round of changes made to a package; which is very much appreciated. > Furthermore, as far as I can tell, there was NO WARNING WHATSOEVER that > you were about to break our setup. There certainly is no NEWS file. The change was made in 2.721-1, on Dec. 15, 2004 and is clearly mentioned in the changelog: >>> * Reworked installer to write configuration parameters for cron maintenance job to a file instead of writing the actual job to www-data's crontab. The maintenance job is now installed by dpkg into /etc/cron.d/faqomatic (closes: #271776). <<< It is also detailed in README.Debian: >>> The cron maintenance job seems different that the normal FOM setup, what's the deal? It is slightly different. Rather than having the FOM configuration mechanism install a job directly into www-data's crontab, it now writes parameters to /var/lib/fom/meta/maintenance_job_conf. This file inturn is used by the maintenance job in /etc/cron.d/faqomatic. I do it this way so that the cron job can be treated as a conf file. <<< ...though upon further consideration, I agree that this change would warrant an entry in the NEWS.Debian file. I will create one and include it in the 2.721-5 release. > You did not even remove the old cron job. This is incorrect. The initial job is removed from www-data's crontab. Actually, the removal is a spot heavy handed and pulls out anything that even looks like a FOM maintenance job, I am surprised that you have ANY FOM jobs left in www-data's crontab. At least that's how it works on my system. If you find that your experience is different, please let me know as I would like to correct any over-sites in the packages upgrade path. As I said, I never tested it with multiple FOM's, so I can't claim familiarity with the details of that configuration. > Please immediately restore the previous behaviour. At least that worked. Now we get to the heart of the matter. My changes do indeed break the maintenance process when users hack their setup to run multiple FOM's, which is a very reasonable change to make and should be accomodated. To that end, I have changed the setup a bit and you can now create multiple jobs for whichever FOM's you would like. Simply create additional maintenance job conf files or have the installer do it. Then add additional crontab entries wherever you like, passing the different conf files you just created, in the cron job's invocation of the maintenance routine. I will document all this in the new package but it's pretty straight forward. It takes a little while for my sponsor to check over packages and upload them, so since you are in a rush and I would very much like to remedy the troubles you are experiencing, you can retrieve the new package from here sometime tomorrow: http://zoion.net/~jereme/debian/faqomatic/faqomatic_2.721-5_all.deb However, the change is small, you can just apply the attached patch. Then make sure you have created the config files for each FOM's maintenance job and add cron entries akin to /etc/cron.d/faqomatic but suppling a conf file parameter: 28 * * * * www-data test -f /var/lib/fom/meta/maintenance_job_conf \ && test -f /usr/share/perl5/FAQ/OMatic/Debian.pm && perl \ -wMFAQ::OMatic::Debian -e 'maintenance_job("/my/other/fom/maint_job_conf")' I propose that you have a look at it and see if it meets your needs. If not, I will gladly adjust it until it works for your environment. I appreciate this consideration. I understand the problem you are having but would like any additional details you can furnish about your setup and what got hosed. Again, I apologize for the troubles your are experiencing. kind regards, jereme -- Jereme Corrado <[EMAIL PROTECTED]>
--- FAQ/OMatic/Debian.pm.orig 2005-04-07 00:31:37.430916912 -0400 +++ FAQ/OMatic/Debian.pm 2005-04-07 00:32:41.281210192 -0400 @@ -9,11 +9,9 @@ our @ISA = qw(Exporter); our @EXPORT = qw(maintenance_job); -# The config file written by FOM installer for our maintenance cron job. -# TODO: determine this dynamically -my $maint_conf_file = "/var/lib/fom/meta/maintenance_job_conf"; - sub maintenance_job { + my $maint_conf_file = shift || '/var/lib/fom/meta/maintenance_job_conf'; + my %vars; open(F, "<$maint_conf_file") || die "cannot open $maint_conf_file: $!\n";