Hide Forgot
I have been experiencing some problems with jobs printing endlessly when using the netatalk psf/pap facility to drive appletalk laser printers under Redhat 6.2 (lpr version 0.50). Typical syslog looks like: Aug 11 13:14:54 fangio ifpap[1313]: starting for root Aug 11 13:14:54 fangio ifpap[1313]: stdin root fangio Aug 11 13:14:54 fangio ifpap[1313]: accounting with psa[1314] Aug 11 13:14:54 fangio ifpap[1313]: sending to pap[1315] Aug 11 13:14:54 fangio ifpap[1313]: PostScript Aug 11 13:14:58 fangio ifpap[1313]: 1315 done Aug 11 13:14:58 fangio ifpap[1313]: wait3: No child processes Aug 11 13:14:58 fangio lpd[1312]: restarting lp Aug 11 13:14:58 fangio ifpap[1317]: starting for root Aug 11 13:14:58 fangio ifpap[1317]: stdin root fangio Aug 11 13:14:58 fangio ifpap[1317]: accounting with psa[1318] Aug 11 13:14:58 fangio ifpap[1317]: sending to pap[1319] Aug 11 13:14:58 fangio ifpap[1317]: PostScript Aug 11 13:15:01 fangio ifpap[1317]: 1319 done Aug 11 13:15:01 fangio ifpap[1317]: wait3: No child processes Aug 11 13:15:01 fangio lpd[1312]: restarting lp Most important observation is that psf thinks that accounting is turned on - it is not. This starts up a "race" between the accounting process psa (forked by psf and exiting immediately with nothing to do) and psf, which is waiting for the accounting process to finish. psf returns a non-zero exit code to lpd, which then reforks the job, ad infinitum... As a campus which uses appletalk as the defacto printer standard, this is a big problem. Thinking something was broken with psf, I hacked it up log the command line arguments that lpd calls it with: Aug 11 14:06:24 fangio ifpap[2099]: argument list: -w132 -l66 -i0 -n dcm -h fangio -j stdin Aug 11 14:06:24 fangio ifpap[2099]: starting for dcm Aug 11 14:06:24 fangio ifpap[2099]: psa arguments: stdin dcm fangio Aug 11 14:06:24 fangio ifpap[2099]: accounting with psa[2100] Aug 11 14:06:25 fangio ifpap[2099]: sending to pap[2101] Aug 11 14:06:25 fangio ifpap[2099]: PostScript Aug 11 14:06:28 fangio ifpap[2099]: 2101 done Aug 11 14:06:28 fangio ifpap[2099]: wait3: No child processes Aug 11 14:06:28 fangio lpd[2098]: restarting lp note the -h and -j options. These are not described in the bsd lpr documentation. psf has been coded to accept any of the bsd lp filter command line arguments, plus any of the RFC 1179 job control characters. Lowercase j is not either of those. This leads psf to believe an accounting file has been passed and that accounting is on, leading to the fork of psa and leading on to the abovementioned problem. The offending code is in printjob.c around line 698: 689 if ((av[0] = strrchr(prog, '/')) != NULL) 690 av[0]++; 691 else 692 av[0] = prog; 693 av[n++] = "-n"; 694 av[n++] = logname; 695 av[n++] = "-h"; 696 av[n++] = fromhost; 697 698 /* Add Jobname */ 699 if (jobname[0] && (jobname[0] != ' ')) { 700 av[n++] = "-j"; 701 av[n++] = jobname; 702 } 703 704 /* Add Extended Parms */ 705 if (extparms[0] && (extparms[0] != ' ')) { 706 av[n++] = "-z"; 707 av[n++] = extparms; 708 } As a work around I have modified psf to accept -j as an arguments, but it is not particularly satisfactory. Better would be sort out what lpd should send to filters and what filters should expect from lpd. FYI I also have a Redhat 6 derived PPC linux port (Yellow dog linux champion server 1.2) which exhibits identical problems. Earlier redhat 5 based systems do not exhibit this problem.
This is between following a loose 'standard' (as the RFC in question is an after the fact description), and providing some more accounting information. Some of the other filters require this information for proper operation, and I can't really zap it. Might I suggest a thin shell wrapper to eat those options? Such a program will probably be necessary to use netatalk with the LPRng system that rides with Red Hat Linux 7, as it provides files, rather than stdin spools.
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/18d347d5f72ca72b15e1745a1775c80f788cb028 Merge pull request #16605 from jim-minter/issue16223 Automatic merge from submit-queue (batch tested with PRs 16605, 17270). allow template labels to be parameterised fixes #16223 docs: https://github.com/openshift/openshift-docs/pull/5401
Commit pushed to master at https://github.com/openshift/openshift-docs https://github.com/openshift/openshift-docs/commit/44eb94065b630008c82a3d3c9e855313d70e39a2 Merge pull request #5401 from jim-minter/issue16223 add example showing parameterised label values