fixed: "paexec -z" without -s never worked. Now it is fine.
New options -g|--graph are synonyms for -s|--pos.
New option -w for waiting for failed nodes if they ALL failed.
By default (with -Z) if ALL nodes fail paexec exits with error.
New option -m for setting alternative strings for
success/failure/fatal.
Target for installing directories has been renamed from
install-dirs to installdirs.
Other minor fixes and code clean-ups.
FIXED: When 'paexec -s' retreives 10000 tasks, it allocates
10000*10000*sizeof(int) bytes for detecting cycles, i.e. ~400Mb on
32-bit system or 800Mb on 64-bit system. This is absolutely
inacceptable. This bad algorithm is replaced with new one which
doesn't need quadratic matrix and works much faster.
ADDED: -Z<timeout> option
When I<-z> applied, if a I<command> fails, appropriate node is
marked as broken and is excluded from the following task
distribution. But if B<-Z> applied, every I<timeout> seconds an
attempt to rerun a comand on a failed node is made. I<-Z> implies
I<-z>. This option makes possible to organize clusters over
unreliable networks/hardware.
No EINTR wrappers anymore (iread, xread etc.). SIGCHLD and SIGALRM
are blocked most of the time. They are unblocked before select(2)
and blocked just after it. SA_RESTART is not used anymore.
Minor clean-ups in Makefile.
FIX: support for -z appeared in paexec-0.12.0 was actually
incomplete :-/ Now everything should be fixed. More regression
tests.
Makefile: adapted for FreeBSD make which doesn't support .PARSEDIR
ADDED: -z option. If applied, read/write(2) operations from/to nodes
becomes not critical. In case paexec has lost connection to the
node, it will reassign failed task to another node and, if -s option
applied, will output string "fatal" to stdout. This makes paexec
resistant to the I/O errors, as a result you can create paexec
clusters even over network consisting of unreliable hosts
(Internet?). Failed hosts are marked as such and will not be used
during the current run of paexec. NOTE: "success", "failure" and
"fatal" strings should be used to process the output of 'paexec -s'.
select(2) do not listen stdin (fd=0) anymore. Blocking read(2) is
used to read tasks from stdin.
Makefile: CPPFLAGS -> CFLAGS, FreeBSD make Mk scripts
don't use CPPFLAGS.
paexec -s: before beginning actual work an input tasks graph is
checked for cycles. If they are detected, paexec exits with error.
minor fix in man page
This version of paexec was sucessfully tested on the following
platforms:
NetBSD/x86
NetBSD/Alpha(64bit)
Linux/x86
Linux/x86-64
Interix-3.5/x86
FreeBSD/x86
Solaris-10/x86
Minor fix for rhomb-like dependencies (paexec -s).
Suppose A depends on (B1 and B2), (B1 and B2) depends on C.
If C fails, earlier paexec versions produced
the following output
failure
C B1 A B2 A
That is, A was output twice. Now it is fixed and A
is printed only once. New regression test for this.
By default(!) getopt_long(3) is enabled on the following platforms
(macro): __NetBSD__, __FreeBSD__, __OpenBSD__, __DragonFly__,
__linux__ and __APPLE__. On others only short options provided by
getopt(3) are used. This means that long option may to not work.
fix in manual page: accept(2) -> select(2)
code clean-ups
.sinclude removed from Makefile
tests/test.sh:
diff -U ---> standard diff -C10
gawk appeared by mistake removed
updated to version 0.10.0
Lots of new regression tests
README file: 'make test' is documented
ADDED: -s option
Partially ordered set of tasks are read from stdin.
Instead of autonomous tasks, graph of the tasks is read from
stdin. In this mode every task can either FAIL or SUCCEED. As
always an empty line output by command means end of task. The
line before it shows an EXIT STATUS of the task. The word
"failure" means failure, "success" - success.
See examples/1_div_x/1_div_X_cmd for the sample. An input line
(paexec's stdin) should contain either single task without
spaces inside or two tasks separated by single space character,
e.g. task1<SPC>task2. task1<SPC>task2 line means that task1
must be done before task2 and it is mandatory, that is if task1
fail all dependent tasks (including task2) are also failed
recursively. Tasks having dependencies are started only after
all dependencies are succeeded. When a task succeeds paexec
outputs "success" word just before end_of_task marker (see -e
or -E), otherwise "failure" word is output followed by a list
of tasks failed because of it.
Samples:
tasks (examples/make_package/make_package_tasks file)
textproc/dictem
devel/autoconf wip/libmaa
devel/gmake wip/libmaa
wip/libmaa wip/dict-server
wip/libmaa wip/dict-client
devel/m4 wip/dict-server
devel/byacc wip/dict-server
devel/byacc wip/dict-client
devel/flex wip/dict-server
devel/flex wip/dict-client
devel/glib2
devel/libjudy
command (examples/make_package/make_package_cmd__flex)
#!/usr/bin/awk -f
{
print $0 # print a package name
if ($0 == "devel/flex")
print "failure" # cannot build flex ;-)
else
print "success" # all other packages are ok
print "" # end of task marker
fflush()
}
output of "paexec -s -l -c make_package_cmd__flex -n +10 \
< make_package_tasks"
3 devel/autoconf
3 success
4 devel/gmake
4 success
7 devel/m4
7 success
8 devel/byacc
8 success
9 devel/flex
9 failure
9 devel/flex wip/dict-server wip/dict-client
10 devel/glib2
10 success
11 devel/libjudy
11 success
1 textproc/dictem
1 success
2 wip/libmaa
2 success
-t '' means "no transport". This significantly simplifies writing
shell scripts with paexec. Added: tests for this case.
paexec has no limited internal buffers anymore. All they are
resized automatically as it is needed. PAEXEC_BUFSIZE environment
variable sets an *initial* buffer size, not *maximum* one.
README: notes about non-standard function getopt_long, and advice
how to build paexec on platforms with no getopt_long support
(JP-UX, Solaris etc.).
More regressions tests
paexec.1: minor corrections.
'make test' fix: In case regression test fails, 'make test' exits
with non-zero exit status.
paexec can be built with ancient version pmake-1.45 (found in som
Linux distributions).
paexec -h|--help outputs messages to stderr - my new religion :-)
NEWS:
new -e|--eot option implemented.
It prints the end-of-task marker (an empty line) to stdout.
See manual page.
WARNS=4 to see compilation warnings.
several gcc warnings fixed.
fixed: '-n +0' and '-n ""' now fails with error message.
minor fix in man page
minor clean-ups