[Queue-developers] Hacking 1.30.1 to make it work
Brought to you by:
wkrebs
From: QingLong <qin...@Bo...> - 2001-01-31 15:00:10
|
Hello! A while ago I've submitted you a set of patches representing changes which I'd had to do to get queue-1.20.1 work reliably enough to be usable. AFAICS you have not used them at all, so I try once again. Please consider them, I hope you would find a few usefull bits there. Thank You. I submit for your consideration a set of patches against queue-1.30.1, most of them are adapted versions of patches I've already sent to you. Please have a look at the attached queue-1.30.1.QL-hack.tar.gz file. Some comments on individual files: queue.spec A spec file for RPM. queue-1.30.1.pebkac-lart.diff This patch fixes autoconf/automake and makefile stuff. I have also had to hack `queue's Makefile.am (heavily) and configure.in and profile.in to make the build/installation process relocatable (required for src.rpm and other source packages). To say the truth, the final destinations in original stuff really are relocatable, but many package managing systems need to perform `faked root installation' usually somewhere in /tmp/ or /var/tmp/ to build binary packages. The latter is impossible with current code. I believe it's worth supporting prefixing installation paths by $(DESTDIR) or $(DESTROOT) scheme. Although I haven't added them. queue-1.30.1.extra-trace-messages.diff This one adds trace messages about ongoing `connect()'s, `accept()'s and alikes to help traceing network-related problems. queue-1.30.1.ptty-support-code-borrowed-from-rxvt.diff This patch almost entirely consists of pty code borrowed from RXVT (I would also recommend you to have a look at xterm's pty/tty code). I just have slightly modified it to fit it to the `queue' environment. queue-1.30.1.reject-jobs-on-inactive-queue.diff Makes `queued' reject jobs on inactive (`exec off' or `exec drain') queues. Without this patch jobs can go to hosts which do not run this queue, thus effectively hanging forever. BTW, I consider method of signalling job rejection (returning magic loadaverage value) as lame, this obvoiusly is design flaw. queue-1.30.1.verbose.diff This patch adds `--verbose' (`-v' in GNU tradition) flag to `queue' and a few trace messages. This (and it's goal) is different from the `-DDEBUG' cpp flag, as `-DDEBUG' enables lots of insecure debug messages (like printing cookie values and so on) makeing debug-enabled `queue' binary useless for production installation. The `--verbose' flag is intended to print trace and debug info useful for ordinary user without compromising system security. The patch also renames current `-v' (`--version') to `-V'. I believe most GNU programs have `-V' for `--version' and `-v' for `--verbose'. queue-1.30.1.const-char-2-char.diff I've had to add explicit type conversion to mage g++ happy. queue-1.30.1.debug.diff Adds --debug facility to queue (NOT queued). queue-1.30.1.reliable-connect-fread.diff This is a hack around hanging forever in fread()ing from a stream opened on a network socket connected to a dead remote end. If remote queued hangs (it's alive, but stalled) for some unknown reason (this does happen rather often!), it still has network port opened in `listen' state, i.e. it does accept connections (as this stage of connection establishing is done by kernel) but is silent. And fread()ing from this connection hangs forever, it does not time out (at least, I've failed to get it time out). I had to use select() on the underlying socket to make it work reliably. BTW, I have managed to trace this problem out and fix it only due to --debug and --verbose flags and trace messages added by the above patches. queue-1.30.1.skip-1e06-la.diff If all queued's are rejecting jobs (e.g. if they all are dead or deaf), the hosts list will contain only hosts with 1e08 (and alike) loadaverages, designating that those queues are down, but wakeup() will still try to connect those queued's... So it's worth skipping all non-willing-to-serve hosts. Besides that I would like to ask you to move `profile' config files from spool directories to more appropriate place like, e.g. /etc/queue/ or /usr/etc/. And please consider adding ``DESTDIR'' style to ``local'' installation rules in Makefile.am. Best regards. QingLong. |