diff options
author | Michal Sekletar <msekleta@redhat.com> | 2023-10-30 12:08:59 +0100 |
---|---|---|
committer | Michal Sekletar <msekleta@redhat.com> | 2024-01-03 13:50:41 +0100 |
commit | 84c01612de805d88875d4d91cfcf73cf10f99447 (patch) | |
tree | f7547e018a170b22874c0d456b66b60d4d4611f1 /man/org.freedesktop.systemd1.xml | |
parent | resolve/mdns: do not append goodby packet entries to known answers section (diff) | |
download | systemd-84c01612de805d88875d4d91cfcf73cf10f99447.tar.xz systemd-84c01612de805d88875d4d91cfcf73cf10f99447.zip |
core/manager: add dbus API to create auxiliary scope from running service
This commit introduces new D-Bus API, StartAuxiliaryScope(). It may be
used by services as part of the restart procedure. Service sends an
array of PID file descriptors corresponding to processes that are part
of the service and must continue running also after service restarts,
i.e. they haven't finished the job why they were spawned in the first
place (e.g. long running video transcoding job). Systemd creates new
scope unit for these processes and migrates them into it. Cgroup
properties of scope are copied from the service so it retains same
cgroup settings and limits as service had.
Diffstat (limited to 'man/org.freedesktop.systemd1.xml')
-rw-r--r-- | man/org.freedesktop.systemd1.xml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/man/org.freedesktop.systemd1.xml b/man/org.freedesktop.systemd1.xml index f6d327dfd3..1bdff502ca 100644 --- a/man/org.freedesktop.systemd1.xml +++ b/man/org.freedesktop.systemd1.xml @@ -277,6 +277,11 @@ node /org/freedesktop/systemd1 { GetDynamicUsers(out a(us) users); DumpUnitFileDescriptorStore(in s name, out a(suuutuusu) entries); + StartAuxiliaryScope(in s name, + in ah pidfds, + in t flags, + in a(sv) properties, + out o job); signals: UnitNew(s id, o unit); @@ -990,6 +995,8 @@ node /org/freedesktop/systemd1 { <variablelist class="dbus-method" generated="True" extra-ref="DumpUnitFileDescriptorStore()"/> + <variablelist class="dbus-method" generated="True" extra-ref="StartAuxiliaryScope()"/> + <variablelist class="dbus-signal" generated="True" extra-ref="UnitNew"/> <variablelist class="dbus-signal" generated="True" extra-ref="UnitRemoved"/> @@ -1567,6 +1574,13 @@ node /org/freedesktop/systemd1 { file descriptors currently in the file descriptor store of the specified unit. This call is equivalent to <function>DumpFileDescriptorStore()</function> on the <interfacename>org.freedesktop.systemd1.Service</interfacename>. For further details, see below.</para> + + <para><function>StartAuxiliaryScope()</function> creates a new scope unit from a service where calling + process resides. Set of processes that will be migrated to newly created scope is passed in as an array + of pidfds. This is useful for creating auxiliary scopes that should contain worker processes and their lifecycle + shouldn't be bound to a lifecycle of the service, e.g. they should continue running after the restart + of the service. Note that the main PID of the service can not be migrated to an auxiliary scope. + Also, <varname>flags</varname> argument must be 0 and is reserved for future extensions.</para> </refsect2> <refsect2> @@ -11826,6 +11840,7 @@ $ gdbus introspect --system --dest org.freedesktop.systemd1 \ <function>QueueSignalUnit()</function>, <function>SoftReboot()</function>, and <function>DumpUnitFileDescriptorStore()</function> were added in version 254.</para> + <para><function>StartAuxiliaryScope()</function> was added in version 256.</para> </refsect2> <refsect2> <title>Unit Objects</title> |