[ic] Strange behavior with JOBS/CRON and --use_global

Marty Tennison marty at sediva.com
Tue Oct 17 11:22:16 EDT 2006

IC: 5.4.1
OS: Fedora Core 4 (selinux off)
DB: 4.1.19

Either I am doing some very wrong or there is something fishy going on 
with jobs when using the --use_global command line option.

Here are the gory details.  Jobs/Cron is working perfectly when I place 
a file under the catalog directly.  When I move the file to the 
'base_directory' and try to access the file using the --use_global 
command line option I get nothing.

Here is my setup.

Catalogs are installed in /var/lib/interchange/{catalog_name}
Interchange is installed in /usr/lib/interchange (originally an rpm install)

I've created identical file structures for the catalog and for the 
interchange server. ie...


In catalog.cfg I have:
   Jobs base_directory etc/jobs
   Jobs log logs/jobs.log

To run the job I'm issuing this command...

/usr/sbin/interchange --jobgroup=test --runjobs=standard --use_global

If I place the file test_me.job under the catalog it works perfectly. If 
I move the file to a directory under the interchange directory it does 
not find it at all.

I've been looking at the code in Dispatch.pm, specifically, this block...

	my ($d, $global_dir, $tmp);
		my @jobdirs = ([$jobscfg->{base_directory} || 'etc/jobs', 0]);

		if ($jobscfg->{use_global}) {
			push (@jobdirs, ["$Global::ConfDir/jobs", 1]);

		for my $r (@jobdirs) {
#::logGlobal("check directory=$d for $job");
			($d, $global_dir) = @$r;
			next unless $d;
			next unless -d "$d/$job";
			$dir = "$d/$job";

I don't see where global_dir gets used after this and when I put in some 
debug lines it appears (to my limited understanding) that the variable 
global_dir is not getting set.

What am I doing wrong?

TIA for any help.

-  - -- ----  ---------------------------- --- -- -   -
Marty Tennison
-  -- --- --------------------------------------- --- --

More information about the interchange-users mailing list