Often I end up debugging a problem on a system, and I
do e.g. `journalctl --grep=failed|error`. The use of the term
"failed" for condition checks adds a *lot* of unnecessary noise into
this.
Now, I know this regexp search isn't precise, but it has proven
to be useful to me.
I think "failed" is too strong of a term as a baseline, and also
just stands out to e.g. humans watching their servers boot or
whatever.
The term "met condition" is fairly widely used, e.g.
https://stackoverflow.com/questions/
63751794/what-does-the-condition-is-met-exactly-mean-in-programming-languages
Use that instead.
<para>When used in conjunction with <varname>After=</varname> on the same unit the behaviour of
<varname>BindsTo=</varname> is even stronger. In this case, the unit bound to strictly has to be in active
state for this unit to also be in active state. This not only means a unit bound to another unit that suddenly
- enters inactive state, but also one that is bound to another unit that gets skipped due to a failed condition
+ enters inactive state, but also one that is bound to another unit that gets skipped due to an unmet condition
check (such as <varname>ConditionPathExists=</varname>, <varname>ConditionPathIsSymbolicLink=</varname>, … —
see below) will be stopped, should it be running. Hence, in many cases it is best to combine
<varname>BindsTo=</varname> with <varname>After=</varname>.</para>
<para>The <varname>AssertArchitecture=</varname>, <varname>AssertVirtualization=</varname>, … options
are similar to conditions but cause the start job to fail (instead of being skipped). The failed check
- is logged. Units with failed conditions are considered to be in a clean state and will be garbage
+ is logged. Units with unmet conditions are considered to be in a clean state and will be garbage
collected if they are not referenced. This means that when queried, the condition failure may or may
not show up in the state of the unit.</para>
assert(t >= 0);
assert(t < _JOB_TYPE_MAX);
- /* Show condition check message if the job did not actually do anything due to failed condition. */
+ /* Show condition check message if the job did not actually do anything due to unmet condition. */
if (t == JOB_START && result == JOB_DONE && !u->condition_result)
return "Condition check resulted in %s being skipped.";
bool console_only = do_console && log_on_console();
if (t == JOB_START && result == JOB_DONE && !u->condition_result) {
- /* No message on the console if the job did not actually do anything due to failed condition. */
+ /* No message on the console if the job did not actually do anything due to unmet condition. */
if (console_only)
return;
else
c = t == JOB_START && result == JOB_DONE ? unit_find_failed_condition(u) : NULL;
if (c) {
- /* Special case units that were skipped because of a failed condition check so that
+ /* Special case units that were skipped because of a unmet condition check so that
* we can add more information to the message. */
if (c->trigger)
log_unit_struct(
u,
job_done_messages[result].log_level,
- LOG_MESSAGE("%s was skipped because all trigger condition checks failed.",
+ LOG_MESSAGE("%s was skipped because no trigger condition checks were met.",
ident),
"JOB_ID=%" PRIu32, job_id,
"JOB_TYPE=%s", job_type_to_string(t),
log_unit_struct(
u,
job_done_messages[result].log_level,
- LOG_MESSAGE("%s was skipped because of a failed condition check (%s=%s%s).",
+ LOG_MESSAGE("%s was skipped because of an unmet condition check (%s=%s%s).",
ident,
condition_type_to_string(c->type),
c->negate ? "!" : "",
};
enum JobResult {
- JOB_DONE, /* Job completed successfully (or skipped due to a failed ConditionXYZ=) */
+ JOB_DONE, /* Job completed successfully (or skipped due to an unmet ConditionXYZ=) */
JOB_CANCELED, /* Job canceled by a conflicting job installation or by explicit cancel request */
JOB_TIMEOUT, /* Job timeout elapsed */
JOB_FAILED, /* Job failed */
assert(p);
- /* To avoid getting pid1 in a busy-loop state (eg: failed condition on associated service),
+ /* To avoid getting pid1 in a busy-loop state (eg: unmet condition on associated service),
* set a default trigger limit if the user didn't specify any. */
if (p->trigger_limit.interval == USEC_INFINITY)
p->trigger_limit.interval = 2 * USEC_PER_SEC;
/* Let's make sure that the deps really are in order before we start this. Normally the job engine
* should have taken care of this already, but let's check this here again. After all, our
- * dependencies might not be in effect anymore, due to a reload or due to a failed condition. */
+ * dependencies might not be in effect anymore, due to a reload or due to an unmet condition. */
if (!unit_verify_deps(u))
return -ENOLINK;