[systemd-devel] Query on systemctl daemon-reload

Michal Koutný mkoutny at suse.com
Thu Nov 7 19:24:04 UTC 2024


Hello Nag.

On Tue, Oct 22, 2024 at 03:38:44PM GMT, Nageswararao Nandigam <2nageshnandigam at gmail.com> wrote:
> I have a use case where I use systemd api to enforce resource limits for
> systemd service. I create drop-files/unit files under service.d/ directory
> in the customer vm and run the systemctl daemon-reload cmd to apply new
> settings to my service at run time but it's affecting all services which
> are in the machine.

Yes, daemon-reload would "commit" all unapplied config changes.

> This global command which runs in our service makes the changes for
> other services without consent of the owner/user/other services and
> also creates problems due to changes in other services.

> So I'm looking for a way to run and apply the settings only for my
> service. I didn't find a similar cmd to run for a specific service but
> found a dbus call to systemd to execute this for a specific service.
> Are there any issues if we use a direct debus call for this? any
> reasons why it's not exposed as a systemd/systemctl cmd?

Look at `systemctl set-property`, using DBus directly is also fine --
this can apply settings to particular units w/out reloading full config.

HTH,
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20241107/f15beb41/attachment.sig>


More information about the systemd-devel mailing list