core: record transactions that have seen ordering cycles and expose them via IPC (#39210)

Closes #3829.
This commit is contained in:
Yu Watanabe
2025-11-14 00:41:46 +09:00
committed by GitHub
12 changed files with 141 additions and 36 deletions

View File

@@ -413,6 +413,8 @@ node /org/freedesktop/systemd1 {
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly u NFailedJobs = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly at TransactionsWithOrderingCycle = [...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly d Progress = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly as Environment = ['...', ...];
@@ -1103,6 +1105,8 @@ node /org/freedesktop/systemd1 {
<variablelist class="dbus-property" generated="True" extra-ref="NFailedJobs"/>
<variablelist class="dbus-property" generated="True" extra-ref="TransactionsWithOrderingCycle"/>
<variablelist class="dbus-property" generated="True" extra-ref="Progress"/>
<variablelist class="dbus-property" generated="True" extra-ref="Environment"/>
@@ -1809,6 +1813,9 @@ node /org/freedesktop/systemd1 {
<para><varname>NFailedJobs</varname> encodes how many jobs have ever failed in total.</para>
<para><varname>TransactionsWithOrderingCycle</varname> encodes IDs of transactions that encountered
ordering cycle.</para>
<para><varname>Progress</varname> encodes boot progress as a floating point value between 0.0 and
1.0. This value begins at 0.0 at early-boot and ends at 1.0 when boot is finished and is based on the
number of executed and queued jobs. After startup, this field is always 1.0 indicating a finished
@@ -12465,6 +12472,7 @@ $ gdbus introspect --system --dest org.freedesktop.systemd1 \
<para><varname>DefaultRestrictSUIDSGID</varname>,
<function>RemoveSubgroupFromUnit()</function>, and
<function>KillUnitSubgroup()</function> were added in version 258.</para>
<para><varname>TransactionsWithOrderingCycle</varname> was added in version 259.</para>
</refsect2>
<refsect2>
<title>Unit Objects</title>

View File

@@ -225,8 +225,8 @@ Sun 2017-02-26 20:57:49 EST 2h 3min left Sun 2017-02-26 11:56:36 EST 6h ago
<listitem>
<para>Check whether any of the specified units is in the "failed" state. If no unit is specified,
check whether there are any failed units, which corresponds to the <literal>degraded</literal> state
returned by <command>is-system-running</command>. Returns an exit code <constant>0</constant>
check whether there are any failed units or ordering cycles, which corresponds to the <literal>degraded</literal>
state returned by <command>is-system-running</command>. Returns an exit code <constant>0</constant>
if at least one has failed, non-zero otherwise. Unless <option>--quiet</option> is specified, this
will also print the current unit or system state to standard output.</para>