#
# IFFAIL can be
#
-# [-][!].
-# [-][!]STATUS
+# [@][-][!].
+# [@][-][!]STATUS
#
# where STATUS is the job/step status to be used if the step
# status is not as expected, and the special meanings are:
#
+# @ Only for per-host-ts: prefix each ident with @
+# to run this script only if the host is `prep'
+# and not if it is `ready'.
# - for run-ts; suprresses exception on failure.
# for per-host-ts; suppresses consequences of failure.
# ! Run this even if the job is being truncated.
proc per-host-ts {iffail ident script args} {
global ok truncate need_xen_hosts flight jobinfo
+
+ set isprep [lindex {{} @} [regsub {^\@} $iffail {} iffail]]
- if {![iffail-check $iffail {$ok && !$truncate} iffail_status]} return
+ if {![iffail-check $iffail {$ok && !$truncate} iffail_status]} \
+ return
set awaitl {}
foreach host $need_xen_hosts {
if {[string compare $host host]} {
lappend hostargs +! $host
}
- lappend hostargs + $host
+ lappend hostargs + $isprep$host
lappend awaitl [eval spawn-ts $iffail $ident $script $hostargs $args]
}