[Queue-developers] new intermediate developemt Queue version
Brought to you by:
wkrebs
From: QingLong <qin...@Bo...> - 2001-02-14 17:33:32
|
Hello! I have merged all the patches I had sent to the list to queue-development at sourceforge.net. I have also merged some patches from ``patch manager''. Although I haven't merged grayraven's utmp stuff patch, as I am already trying to import more universal utmp/wtmp code from rxvt. Please try this development version of Queue. This is from ChangeLog: --- Merged patch #102850 by bmc (Ben Chad <bc...@uo...>) ``Return value bug for TRANSMIT_DEBUG in queued.c'' submitted to patch manager at SourceForge at 2000-Dec-14. --- Merged patch #102237 ``Bug #121017 patch'' by wkrebs (W.G.Krebs <wer...@ya...>) submitted at 2000-Nov-02. --- Moved ``rinning in foreground'' queued feature control from `--debug' to its own command line option `--foreground'. I think that having an ability to control run mode independently from `--debug' is very usefull for Queue now, as I consider it as not yet very stable and requiring contiguous debugging even during ``production'' run in background. Also renamed `-v' (--version) to `-V' in accordance with traditions, btw `-v' is traditionally used for `--verbose'. Also squeezed a couple of unnecessary repititions and slightly ``beautified'' `show usage' and `show version' code. --- A ``small integer used to index the q_rlimit array'' upper limit and RLIM_NLIMITS were confused in a couple of places in RLIMIT_* entities handling code. Fixed them. Also added a few new RLIMIT_*'s available in Linux (they all are properly wrapped in #ifdef's). This change overlaps with (actually covers it) patch #102826 ``queued.c patch for Redhat 7.0 resource limits'' submitted by bmc (Ben Chad <bc...@uo...>) at 2000-Dec-13. --- Skip hosts rejecting jobs while looking for the best one. If all queued's are rejecting jobs (e.g. if they all are dead/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, as they turn out to be the best ones in this awfull case... So it's not at all worth taking such non-willing-to-serve hosts in consideraion. --- Hack around problem of hanging forever fread()ing from a stream opened on a network socket connected to a dead/deaf 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 failed to get it time out). I had to use select() on underlying socket to make it work reliably. --- Add ``--debug'' facility to queue (NOT queued). --- Trivial: add explicit type conversions to make g++ happy. --- Add `--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 an ordinary user without compromising system security. Also rename current `-v' (`--version') to `-V'. I believe most GNU programs have `-V' for `--version' and `-v' for `--verbose'. --- Make `queued' reject jobs on inactive (`exec off' or `exec drain') queues. Without this change jobs can go to hosts which do not run this queue, thus effectively hanging forever. --- This patch almost entirely consists of pty code borrowed from RXVT I just have slightly modified it to fit in to the `queue' environment. (I would also recommend to have a look at xterm's pty/tty code) --- Added trace messages about ongoing `connect()'s, `accept()'s and alikes to help traceing network-related problems. Moved debug related printing macros to separate header files. --- Fixed autoconf/automake and makefile stuff. I have also had to hack 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 already were relocatable, but many package managing systems need to perform `fake 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 (as automake does in generated rules). Although I haven't added them, left it for possible discussion. BR, QingLong. |