systemd service from repo broken #275

Closed
opened 2020-01-01 13:57:21 +00:00 by tilllt · 5 comments

What I'm trying to do and why

install system service and timer

Steps to reproduce (if a bug)

follow documentation on borgmatic website

Include (sanitized) borgmatic configuration files if applicable.

Actual behavior (if a bug)

[/etc/systemd/system/borgmatic.service:18] Unknown lvalue 'LogRateLimitIntervalSec' in section 'Service'

Jan 01 14:48:39 systemd[1]: [/etc/systemd/system/borgmatic.service:21] Executable path is not absolute, ignoring: sleep 1m

Jan 01 14:48:39 systemd[1]: [/etc/systemd/system/borgmatic.service:22] Executable path is not absolute, ignoring: systemd-inhibit --who=

Jan 01 14:48:39 systemd[1]: borgmatic.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.

Expected behavior (if a bug)

service and timer should work

#### What I'm trying to do and why install system service and timer #### Steps to reproduce (if a bug) follow documentation on borgmatic website Include (sanitized) borgmatic configuration files if applicable. #### Actual behavior (if a bug) [/etc/systemd/system/borgmatic.service:18] Unknown lvalue 'LogRateLimitIntervalSec' in section 'Service' Jan 01 14:48:39 systemd[1]: [/etc/systemd/system/borgmatic.service:21] Executable path is not absolute, ignoring: sleep 1m Jan 01 14:48:39 systemd[1]: [/etc/systemd/system/borgmatic.service:22] Executable path is not absolute, ignoring: systemd-inhibit --who= Jan 01 14:48:39 systemd[1]: borgmatic.service: Service lacks both ExecStart= and ExecStop= setting. Refusing. #### Expected behavior (if a bug) service and timer should work
Owner

Thank you for reporting this. Do you know what version of systemd/journald you're using? It appears that the LogRateLimitIntervalSec option at the Service level was added back in 2018, and possibly released in systemd version 240. You can check your systemd version with journalctl like this:

journalctl --version

If you have an old version of systemd, that could explain why the LogRateLimitIntervalSec option isn't working. You could just omit the option, or set it globally (but then it would affect more than just borgmatic). Or, if possible, upgrade systemd.

Let me know if that's it!

As for the other two errors, I've just switched the sample systemd configuration file to use absolute paths.

Thank you for reporting this. Do you know what version of systemd/journald you're using? It appears that the `LogRateLimitIntervalSec` option at the `Service` level was [added back in 2018](https://github.com/systemd/systemd/pull/10308), and possibly released in [systemd version 240](https://github.com/systemd/systemd/releases?after=v242-rc1). You can check your systemd version with journalctl like this: ```bash journalctl --version ``` If you have an old version of systemd, that could explain why the `LogRateLimitIntervalSec` option isn't working. You could just omit the option, or set it globally (but then it would affect more than just borgmatic). Or, if possible, upgrade systemd. Let me know if that's it! As for the other two errors, I've just switched the sample systemd configuration file to use absolute paths.
Author

Didnt have time to investigate further, just a quick update on the SystemD version:
systemd 232 (this is a regular Debian Stretch install)

Didnt have time to investigate further, just a quick update on the SystemD version: systemd 232 (this is a regular Debian Stretch install)
Owner

Look like that version's from March 2017. What I did was add a comment to the sample borgmatic systemd recommend that the option can be removed with older versions of systemd. (However, systemd may rate-limit borgmatic logs without the option.)

Hope that helps! Thanks again for filing this.

Look like that version's from March 2017. What I did was add a comment to the sample borgmatic systemd recommend that the option can be removed with older versions of systemd. (However, systemd may rate-limit borgmatic logs without the option.) Hope that helps! Thanks again for filing this.

The change to absolute paths (24e1516ec5) causes borgmatic.service to no longer work on Debian-based distros, where both sleep and systemd-inhibit are found in /bin rather than /usr/bin.

Can anybody think of a way to make this more cross-platform with Environment= or something? Or /usr/bin/env sleep 1m?

The change to absolute paths (https://projects.torsion.org/witten/borgmatic/commit/24e1516ec50b73df7612862f95f4bff956268445) causes `borgmatic.service` to no longer work on Debian-based distros, where both `sleep` and `systemd-inhibit` are found in `/bin` rather than `/usr/bin`. Can anybody think of a way to make this more cross-platform with `Environment=` or something? Or `/usr/bin/env sleep 1m`?
Owner

I've just reverted that changeset. According to the systemd docs, absolute paths are not required. So let's not use them if they're causing cross-distro problems!

I appreciate you mentioning this.

I've just reverted that changeset. According to the [systemd docs](https://www.freedesktop.org/software/systemd/man/systemd.service.html#Command%20lines), absolute paths are not required. So let's not use them if they're causing cross-distro problems! I appreciate you mentioning this.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#275
No description provided.