Re: [systemd-devel] A start job for unit has failed

2025-09-10 Thread Andrei Borzenkov
10.09.2025 21:21, Christian M. wrote: Greetings, I'd like to ask for help with my personal machine if that is okay. I'll list the errors first then explain how I think it occured, and then what I have done so far. The system of mine is stuck in emergency mode. The error from the journalctl is t

Re: [systemd-devel] Semantic of WantedBy=default.target

2025-08-19 Thread Andrei Borzenkov
On Tue, Aug 19, 2025 at 10:41 AM David Tardon wrote: ... > > > In any case, I have seen people using (and expecting) > > WantedBy=default.target to mean "please attempt to start this unit in > > any default target". Using 3 on kernel cmdline is setting default > > target for current boot (from use

Re: [systemd-devel] Semantic of WantedBy=default.target

2025-08-12 Thread Andrei Borzenkov
On Tue, Aug 12, 2025 at 11:59 AM Silvio Knizek wrote: > > Am Dienstag, dem 12.08.2025 um 11:02 +0300 schrieb Andrei Borzenkov: > > I spent some time trying to understand why a service that should have been > started was not. It turned out rather simple - the service

[systemd-devel] Semantic of WantedBy=default.target

2025-08-12 Thread Andrei Borzenkov
I spent some time trying to understand why a service that should have been started was not. It turned out rather simple - the service was WantedBy=default.target, I explicitly used "3" on the kernel command line and this made systemd to ignore /etc/systemd/system/default.target.wants. Is there any

Re: [systemd-devel] Preserving bind mount options from mounts in the initrd

2025-08-01 Thread Andrei Borzenkov
02.08.2025 01:45, Ali Rizvi wrote: Good evening, I'd like to discuss a particular problem that I've been having with my system. The basic idea I'm trying to go for is the setup of an ephemeral root, where my `/` partition is a `tmpfs`, and all directories I need to keep are linked via bind mount

Re: [systemd-devel] How to lock two instances of a templated service against each other

2025-07-30 Thread Andrei Borzenkov
30.07.2025 11:00, Marc Haber wrote: Hi, On Wed, Jul 30, 2025 at 07:31:56AM +0300, Andrei Borzenkov wrote: 29.07.2025 11:30, Marc Haber wrote: Hi, I have a template service unit which runs a oneshot service that generates both high CPU and high I/O load for a couple of minutes. The service is

Re: [systemd-devel] How to lock two instances of a templated service against each other

2025-07-29 Thread Andrei Borzenkov
29.07.2025 11:30, Marc Haber wrote: Hi, I have a template service unit which runs a oneshot service that generates both high CPU and high I/O load for a couple of minutes. The service is templated a couple of times and runs from an, also templated timer. In another use case, I have independent

Re: [systemd-devel] More documentation on subtle differences between BindsTo/PartOf re. auto-restart

2025-07-26 Thread Andrei Borzenkov
26.07.2025 22:31, Kevin P. Fleming wrote: On Sat, Jul 26, 2025, at 13:07, Maximilian Bosch wrote: Now, my plan is to actually contribute a fix for this, but upon starting I realized, that I need some pointers: * This seems like a little bit of a special case: you need bidirectional dependenc

Re: [systemd-devel] systemd-tty-ask-password-agent, new warning

2025-07-08 Thread Andrei Borzenkov
08.07.2025 22:38, James Muir (jamesmui) wrote: Is systemd-tty-ask-password still an optional component? Is this new behaviour (where systemd-tty-ask-password is repeatedly executed) intentional? It is not new behavior. systemctl did it for as long as I remember. Okay. But the display of th

Re: [systemd-devel] systemd-tty-ask-password-agent, new warning

2025-07-08 Thread Andrei Borzenkov
08.07.2025 19:57, James Muir (jamesmui) wrote: I upgraded from v255.4 to v255.13 (these are tags from https://github.com/systemd/systemd-stable), I now see the following warning when I manually start a service: root@vbox:~/tmp# systemctl start systemd-journald Failed to execute /usr/bin/system

Re: [systemd-devel] sd-boot and boot counting

2025-07-04 Thread Andrei Borzenkov
On Fri, Jul 4, 2025 at 8:19 AM Tristan Vroom wrote: > > Hi, > > I am looking over the documentation about boot counting and I am trying to > figure out how it works exactly. https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/ > If I understand correctly, in order to enable it you have to write a numb

Re: [systemd-devel] Help with making socket activation work.

2025-06-27 Thread Andrei Borzenkov
27.06.2025 17:50, Stef Bon wrote: Ok. The environment variable won't change when calling sd_notify. I understand that. But how can I make socket activation work after the main process osns system has forked? Is it required to fork anyway Invoke sd_listen_fds before fork, parse LISTEN_FDS

Re: [systemd-devel] Help with making socket activation work.

2025-06-27 Thread Andrei Borzenkov
27.06.2025 14:59, Stef Bon wrote: Hi, I've got a system daemon, and I want to make use of socket activation. It has a socket /run/osns/system.sock, where clients belonging to user sessions can connect to. What I've tried I do not get it to work. It used to fork, and the forked process created t

Re: [systemd-devel] Doc issue: does BindsTo wait for a service to become active?

2025-06-23 Thread Andrei Borzenkov
23.06.2025 08:00, Christopher Hunt wrote: Howdy, I’m looking for some clarification on BindsTo as I’m wondering if there’s some clarification required in the doc (1). I think I’m perhaps misinterpreting what the doc is referring to as “active" i.e: "When used in conjunction with After= on the

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Andrei Borzenkov
22.06.2025 23:30, Marc Haber wrote: Hi, the following works, but I doubt that it is a nice way to do it. I have a generator that generates a number of service, and I want all of those services automatically started at boot. I have: $ sudo systemctl cat console-log-8.service [sudo] password for

Re: [systemd-devel] Doc issue: does BindsTo wait for a service to become active?

2025-06-23 Thread Andrei Borzenkov
23.06.2025 09:14, Christopher Hunt wrote: On 23 Jun 2025, at 4:12 PM, Andrei Borzenkov wrote: How A.service and B.service are started exactly? systemctl enable A systemctl enable B That is meaningless without unit definition. reboot

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Andrei Borzenkov
23.06.2025 10:48, Marc Haber wrote: On Mon, Jun 23, 2025 at 09:34:34AM +0300, Andrei Borzenkov wrote: 23.06.2025 09:28, Marc Haber wrote: On Mon, Jun 23, 2025 at 09:16:58AM +0300, Andrei Borzenkov wrote: /run/systemd/generator/console-log-starter.service.wants/console-log-9.service -> /

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-22 Thread Andrei Borzenkov
23.06.2025 09:28, Marc Haber wrote: On Mon, Jun 23, 2025 at 09:16:58AM +0300, Andrei Borzenkov wrote: /run/systemd/generator/console-log-starter.service.wants/console-log-9.service -> /run/systemd/generator/console-log-9.service So your recommendation is to do away with the target, keep

Re: [systemd-devel] systemd link file rename eth0 do not take effect

2025-06-17 Thread Andrei Borzenkov
17.06.2025 09:20, Mantas Mikulėnas wrote: On another note, even though NamePolicy doesn't provide any names in your case, you should still clear it in general: [Link] NamePolicy= Name=mycustometh Why? NamePolicy is empty by default and only one .link file is applied. There should be noth

Re: [systemd-devel] accepting dhcp address only from a specific mask

2025-06-02 Thread Andrei Borzenkov
02.06.2025 19:36, daggs wrote: Sent: Monday, June 02, 2025 at 7:09 PM From: "Andrei Borzenkov" To: "daggs" Cc: systemd-devel@lists.freedesktop.org Subject: Re: [systemd-devel] accepting dhcp address only from a specific mask 02.06.2025 18:30, daggs wrote: Greetings A

Re: [systemd-devel] accepting dhcp address only from a specific mask

2025-06-02 Thread Andrei Borzenkov
From: "Andrei Borzenkov" To: systemd-devel@lists.freedesktop.org Subject: Re: [systemd-devel] accepting dhcp address only from a specific mask 02.06.2025 16:07, daggs wrote: Greetings, I have a qemu vm which runs a systemd based buildroot image, the vm's nic is virtio, if I confi

Re: [systemd-devel] accepting dhcp address only from a specific mask

2025-06-02 Thread Andrei Borzenkov
02.06.2025 16:07, daggs wrote: Greetings, I have a qemu vm which runs a systemd based buildroot image, the vm's nic is virtio, if I configure systemd to auto start the nic, I get two ips for the only nic on the system, a valid one and in invalid one. in this case, I can only connect to local l

Re: [systemd-devel] systemd-pcrlock silently ignores user requested PCRs downgrading security

2025-05-09 Thread Andrei Borzenkov
09.05.2025 15:45, Lennart Poettering wrote: On Fr, 09.05.25 15:36, Andrei Borzenkov (arvidj...@gmail.com) wrote: 61;8001;1c I know that it is documented, but that leads to rather bad user experience. User requests specific protection via --pcr= option, pcrlock decides to skip (some of) them and

[systemd-devel] systemd-pcrlock silently ignores user requested PCRs downgrading security

2025-05-09 Thread Andrei Borzenkov
I know that it is documented, but that leads to rather bad user experience. User requests specific protection via --pcr= option, pcrlock decides to skip (some of) them and binds unlocking to just a subset of PCRs pretending that the operation succeeded. At this point user believes that the syst

Re: [systemd-devel] x-initrd.mount option

2025-05-05 Thread Andrei Borzenkov
On Mon, May 5, 2025 at 4:58 PM Kaizaad Bilimorya wrote: > > Hello Silvio, > Thank you for your response. > We're using Ansible to automate some tasks so it is easier (and more > reliable) to add/remove mount unit files than having to parse the fstab for > our specific mount options. > And as the

Re: [systemd-devel] Service not starting that wants first-boot-complete.target

2025-04-08 Thread Andrei Borzenkov
08.04.2025 07:50, Christopher Hunt wrote: On 8 Apr 2025, at 2:40 PM, Andrei Borzenkov wrote: It cannot be the complete file because earlier it says "enabled" and this service does not have [Install] section. Anyway - something has to start this service. So far, you did not expla

Re: [systemd-devel] Service not starting that wants first-boot-complete.target

2025-04-07 Thread Andrei Borzenkov
08.04.2025 03:40, Christopher Hunt wrote: Howdy. I've got a "Resize file system" service that wants first-boot-complete.target and is to be run before it. I've linked the service to the first-boot-complete.target, What does it mean? removed /etc/machine-id and then reboot. The first boot co

Re: [systemd-devel] DOSing the TPM to leak the rootfs encryption key

2025-03-14 Thread Andrei Borzenkov
On Thu, Mar 13, 2025 at 2:06 PM aplanas wrote: > > On 2025-03-13 10:10, Andrei Borzenkov wrote: > > On Tue, Mar 11, 2025 at 12:17 AM aplanas wrote: > > >> [1] > >> https://oddlama.org/blog/bypassing-disk-encryption-with-tpm2-unlock/ > >> > > >

Re: [systemd-devel] Is tpm2-measure-pcr really an additional security?

2025-03-13 Thread Andrei Borzenkov
10.03.2025 19:27, Adrian Vovk wrote: Basically, the bug is: an attacker does a DOS on the TPM in such a way that systemd boots to the rootfs without measuring the `leave-initrd` pcrphase, pcrphase works only with UKI and OP started with mentioning separate kernel and initrd which excludes UKI

Re: [systemd-devel] Escaping path in run0 option argument

2025-03-13 Thread Andrei Borzenkov
On Thu, Mar 13, 2025 at 4:54 PM Daniel Hast wrote: > > Hello, > > I'm working on a shell script that makes use of run0, and I'm having trouble > figuring out how to escape a file path in the --property option. I want to > use --property="ProtectSystem=strict" and --property="ReadWritePaths=[...]

Re: [systemd-devel] DOSing the TPM to leak the rootfs encryption key

2025-03-13 Thread Andrei Borzenkov
On Tue, Mar 11, 2025 at 12:17 AM aplanas wrote: > > On 2025-03-10 19:04, Adrian Vovk wrote: > > > Presuming a system like this: > > - We've got a Linux desktop system > > - We have two dm-verity protected /usr partitions > > - We have one encrypted rootfs > > - We're using systemd-repart to create

Re: [systemd-devel] Please help me fix the fluidsynth.service file

2025-03-13 Thread Andrei Borzenkov
On Thu, Mar 13, 2025 at 11:42 AM Fabian Greffrath wrote: > > Dear systemd developers, > > I have a release-critical bug filed against the fluidsynth package in > Debian [1] that I don't quite understand. The bug is especially against > the fluidsynth.service file (attached to this mail). > > To pr

Re: [systemd-devel] Is tpm2-measure-pcr really an additional security?

2025-03-10 Thread Andrei Borzenkov
10.03.2025 18:16, Adrian Vovk wrote: Hello, Just to see if I understand your concern correctly, I'll try boiling it down to its simplest, by cutting out the need for two partitions. Here's the scenario: - An attacker replaces the real rootfs with a malicious one that just drops to a shell. The

Re: [systemd-devel] Is tpm2-measure-pcr really an additional security?

2025-03-10 Thread Andrei Borzenkov
On Mon, Mar 10, 2025 at 11:03 AM aplanas wrote: > > On 2025-03-08 18:52, Diorcet Yann wrote: > > > But in the case of multiple partitions unlocked by the initrd, I can't > > figure why an attacker couldn't succeed to : > > > > - Clone the original disk (notably ESP) > > > > - Replace root partitio

Re: [systemd-devel] Is tpm2-measure-pcr really an additional security?

2025-03-08 Thread Andrei Borzenkov
08.03.2025 22:40, Andrei Borzenkov wrote: 08.03.2025 21:52, Diorcet Yann wrote: Hello, I'm in the process of using SecureBoot, TPM2.0 and LUKS2 to protect an industrial embedded computer. I have a chain of trust in the UEFI (own secure boot keys/certificates), signed grub2, all files us

Re: [systemd-devel] Is tpm2-measure-pcr really an additional security?

2025-03-08 Thread Andrei Borzenkov
08.03.2025 21:52, Diorcet Yann wrote: Hello, I'm in the process of using SecureBoot, TPM2.0 and LUKS2 to protect an industrial embedded computer. I have a chain of trust in the UEFI (own secure boot keys/certificates), signed grub2, all files used by grub2 signed including kernel and initramfs,

Re: [systemd-devel] PID 1 "crashes" during boot, disabling systemd-coredump, but system boots normally anyway

2025-02-21 Thread Andrei Borzenkov
21.02.2025 23:39, Joanne Norman wrote: Linux distribution: Poky reference distribution from Yocto Project release 5.0 "Scarthgap" systemd version: 255.4 kernel: 6.6.25-intel-pk-standard Systemd is disabling coredumps during bootup, claiming that it's "Due to PID 1 having crashed". However, asi

Re: [systemd-devel] [EXT] Re: scheduling services first during shutdown/reboot

2025-02-13 Thread Andrei Borzenkov
dl > > > -Original Message- > > From: systemd-devel On > > Behalf Of Andrei Borzenkov > > Sent: Wednesday, February 12, 2025 6:54 PM > > To: Olaf Hering ; systemd-devel@lists.freedesktop.org > > Subject: [EXT] Re: [systemd-devel] scheduling services first d

Re: [systemd-devel] scheduling services first during shutdown/reboot

2025-02-12 Thread Andrei Borzenkov
12.02.2025 16:35, Olaf Hering wrote: What is the proper way to run a service as the very first unit when the system goes down? I want to run it before systemd stops active sessions with "Stopping Session N of User $user...". It seems that "After=session-N.scope" does have the desired effect, but

Re: [systemd-devel] Q: "systemd-journald: ... /system.journal: Journal file uses a different sequence number ID, rotating."

2025-02-06 Thread Andrei Borzenkov
07.02.2025 08:57, Windl, Ulrich wrote: Hi! When upgrading SLES 15 from SP5 to SP6 also involved updating systemd (from 249 to 254): On first boot I noticed the message "systemd-journald[673]: /var/log/journal/aefe6ef1acb28655ef1a2fa8610cef2b/system.journal: Journal file uses a different seque

[systemd-devel] ssh generator credentials do not work for non-root

2025-02-01 Thread Andrei Borzenkov
systemd 257.2 ssh generator supports undocumented ssh.ephemeral-authorized_keys-all credential which is supposed to contain additional authorized keys: "ExecStart=-%s -i -o \"AuthorizedKeysFile ${CREDENTIALS_DIRECTORY}/ssh.ephemeral-authorized_keys-all .ssh/authorized

Re: [systemd-devel] PathChanged= in systemd-254.21-150600.4.21.1.x86_64 of SLES15 SP6

2025-01-24 Thread Andrei Borzenkov
On Fri, Jan 24, 2025 at 11:56 AM Windl, Ulrich wrote: > > Hi! > > > > Debugging some backup issue I noticed that systemd announced “Starting Update > system wide CA certificates...” multiple times during backup. > > As I was sure no new certificates were installed I checked the unit; it > contai

Re: [systemd-devel] systemd-cryptsetup credentials

2025-01-15 Thread Andrei Borzenkov
15.01.2025 18:54, David White wrote: ... davew@speed:~$ /usr/bin/systemd-cryptsetup --version systemd 257 (257.2) ... davew@speed:~$ systemd --version systemd 255 (255.4-1ubuntu8.4) The bulk of code is in the shared library and I have no idea what this mix does.

Re: [systemd-devel] systemd-cryptsetup credentials

2025-01-15 Thread Andrei Borzenkov
On Wed, Jan 15, 2025 at 2:31 PM David White wrote: > > Hi there, > > Just want some help with setting credentials for systemd-cryptsetup@.service > services. > > I have a crypttab file with the following: > > (I set a label for this volume with a udev rule as I have to use a label) > I am not su

Re: [systemd-devel] Dynamic link-local address not assigned after collision

2025-01-08 Thread Andrei Borzenkov
08.01.2025 01:38, Muggeridge, Matt wrote: It behaves this way when using IPv4LLStartAddress. If the address is in use, it chooses another from the 169.254/16 range. OK, I missed this option. ... What could be done is supporting something like Address=169.254.4.0/24 with the semantic "pic

Re: [systemd-devel] Dynamic link-local address not assigned after collision

2025-01-06 Thread Andrei Borzenkov
07.01.2025 06:01, Muggeridge, Matt wrote: I have two systems where I need them to assign link-local addresses in a 169.254.4/24 subnet, regardless of any other addresses configured. I'm using a /24 subnet because I have multiple interfaces on the system that require link-local addresses; I was

Re: [systemd-devel] How to properly reboot the system from a service specified by `systemd.unit=` boot option?

2025-01-01 Thread Andrei Borzenkov
01.01.2025 09:55, Qu Wenruo wrote: [BACKGROUND] I'm trying to implement a super simple kdump service(s) for Archlinux. The idea is super simple, just use the default linux kernel installed as kernel/initramfs for the kexec environment. So there is a kexec.service to setup the environment, with

Re: [systemd-devel] The periodic change in MACAddressPolicy in ubuntu 2022

2024-12-17 Thread Andrei Borzenkov
On Tue, Dec 17, 2024 at 3:03 PM Choi yenos wrote: > > HI all, It seems that the MACAddressPolicy is periodically changing or being > updated on my Ubuntu 22.04 cluster. > > When I create the 22.04 image, I set the file > /usr/lib/systemd/network/99-default.link to MACAddressPolicy=none and > ge

Re: [systemd-devel] Help with running a script at shutdown and make it run first before other services

2024-12-11 Thread Andrei Borzenkov
12.12.2024 02:37, David Elie-Dit-Cosaque wrote: ... > So I did a test listing every crio-*.scope present in the cluster in the> After= directive and it worked ! You started with the question "before any other service". This is rather different from what you are asking now. ...> Is there a w

Re: [systemd-devel] Help with running a script at shutdown and make it run first before other services

2024-12-06 Thread Andrei Borzenkov
07.12.2024 01:16, David Elie-Dit-Cosaque wrote: Hi All, I am trying to create a systemd service that would execute a script at shutdown before any other services start receiving shutdown notifications. You could try mkdir -p /etc/systemd/system/-.service.d cat > /etc/systemd/system/-.service.

Re: [systemd-devel] systemd-udevd and services with DefaultDependencies=no

2024-11-28 Thread Andrei Borzenkov
28.11.2024 21:49, Thomas HUMMEL wrote: On 11/25/24 3:07 PM, Thomas HUMMEL wrote: On 11/25/24 2:50 PM, Andrei Borzenkov wrote: On Mon, Nov 25, 2024 at 4:39 PM Thomas HUMMEL wrote: Hello, I've got a somehow silly question: Am I right to think that a service unit I wrote meant to forma

Re: [systemd-devel] systemd-udevd and services with DefaultDependencies=no

2024-11-25 Thread Andrei Borzenkov
On Mon, Nov 25, 2024 at 4:39 PM Thomas HUMMEL wrote: > > Hello, > > I've got a somehow silly question: > > Am I right to think that a service unit I wrote meant to format and > mount a localdisk at boot having the following properties : > > Wants=local-fs.target > Before=local-fs.target > > + Defa

Re: [systemd-devel] Masking mount units

2024-11-21 Thread Andrei Borzenkov
21.11.2024 20:47, Phillip Susi wrote: Andrei Borzenkov writes: commit 142b8142d7bb84f07ac33fc00527a4d48ac8ef9f Author: Tom Yan Date: Wed Jan 9 23:35:24 2019 +0800 mount/generators: do not make unit wanted by its device unit As device units will be reloaded by systemd whenever

Re: [systemd-devel] Masking mount units

2024-11-19 Thread Andrei Borzenkov
On Tue, Nov 19, 2024 at 10:55 PM Phillip Susi wrote: > > Furthermore, it seems that the undesirable auto mounting behavior only > happens with systemd-239 and lower. Newer versions of systemd seem to > have dropped this behavior by not setting the WantedBy=foo.device on the > mount point. I assu

Re: [systemd-devel] Help: Questions regarding systemd service order

2024-11-12 Thread Andrei Borzenkov
On Tue, Nov 12, 2024 at 1:13 PM Tony Rodriguez wrote: > > B) How can I make my service run after all .mount(s) within > local-fs-pre.target, before local-fs.target, especially if I don't know > all the .mount(s)? The .mount files are located within > /var/run/systemd/generator/* > > ls -l /var/ru

Re: [systemd-devel] Unable to get service to wait for a mount before starting

2024-11-10 Thread Andrei Borzenkov
10.11.2024 17:53, Adam Nielsen wrote: network-online.target by itself does absolutely nothing. You are expected to have some service that is ordered Before=network-online.target and actually waits until network is online. Standard network management applications that asynchronously configure inte

Re: [systemd-devel] Unable to get service to wait for a mount before starting

2024-11-10 Thread Andrei Borzenkov
10.11.2024 15:20, Adam Nielsen wrote: I'm not sure what you mean by not having a proper network-online.target implementation. I'm using the one distributed with systemd. There aren't any other versions or overrides for it in use. The unit in question specifies "After=network-online.target".

Re: [systemd-devel] Persist mount from initramfs with systemd.volatile boot

2024-11-09 Thread Andrei Borzenkov
10.11.2024 02:42, serenissi wrote: I have an use case that requires persisting a mount (/sysroot/mnt) from initramfs. The system is booted with systemd.volatile, so only /usr of /sysroot is used, rest is tmpfs. Ideally I should add the mount unit in the /usr itself but /usr is a read only signed

Re: [systemd-devel] Masking mount units

2024-10-31 Thread Andrei Borzenkov
31.10.2024 16:03, Phillip Susi wrote: Lennart Poettering writes: Doing the locking on the fd you use for writing makes things a lot easier, because as mentioned udev will automatically retrigger block devices if an inotify event on it is seen that indicates "close-after-write". If you deal wit

Re: [systemd-devel] Unable to get service to wait for a mount before starting

2024-10-29 Thread Andrei Borzenkov
29.10.2024 10:03, Adam Nielsen wrote: I tried using RequiresMountsFor=/mnt/share however again, if it runs too early in the boot process the mount is not there and the unit fails to start, and is not retried (logs just say "Job myservice.service/start failed with result 'dependency'.") Requires

Re: [systemd-devel] system is not match systemd.link configs

2024-10-29 Thread Andrei Borzenkov
On Mon, Oct 28, 2024 at 10:17 PM Mantas Mikulėnas wrote: > > For example, maybe: > Property=DEVPATH=/devices/pci:00/:00:11.0/:06:00.0/net/eth* Does Property accept wildcards? Manual does not mention it, only selected directives are described as accepting "shell style globs". > If n

Re: [systemd-devel] Unable to get service to wait for a mount before starting

2024-10-28 Thread Andrei Borzenkov
On Tue, Oct 29, 2024 at 5:50 AM Adam Nielsen wrote: > > I tried using RequiresMountsFor=/mnt/share however again, if it runs too > early in the boot process the mount is not there and the unit fails to > start, and is not retried (logs just say "Job myservice.service/start > failed with result 'de

Re: [systemd-devel] system is not match systemd.link configs

2024-10-28 Thread Andrei Borzenkov
On Mon, Oct 28, 2024 at 3:07 PM Henti Smith wrote: > > On Mon, 28 Oct 2024 at 10:38, Andrei Borzenkov wrote: >> >> On Thu, Oct 24, 2024 at 6:29 PM Henti Smith wrote: >> > >> > Good day everybody >> > >> > I have two link files for mvc-sw1

Re: [systemd-devel] system is not match systemd.link configs

2024-10-28 Thread Andrei Borzenkov
On Thu, Oct 24, 2024 at 6:29 PM Henti Smith wrote: > > Good day everybody > > I have two link files for mvc-sw1 and mvc-sw2. > > # mvc-sw1 > ``` > # Fixed MAC and name for eno2 (Switch 1 connection) when debug board is > plugged in > # Renamed to mvc-sw1 by PCI Address and set custom MAC address.

Re: [systemd-devel] How to pass date/time to OS before Linux starts?

2024-10-25 Thread Andrei Borzenkov
On Fri, Oct 25, 2024 at 10:13 AM Barry wrote: > > > > > On 25 Oct 2024, at 00:04, Paul Menzel > > wrote: > > > > Dear Linux folks, > > > > > > My CMOS battery is empty, so the time is reset to the firmware/BIOS date, > > but the firmware does not allow to set the date/time. > > The battery is

Re: [systemd-devel] UDEV rule not matching...why?

2024-10-09 Thread Andrei Borzenkov
09.10.2024 17:02, Daniel Spannbauer wrote: Hello, thanks for the response. My rule is in "55-my-rules.rules" For SUBSYSTEM=="tty" the usb_id is called in 60-serial.rules. I also tried it with "ATTRS{bInterfaceNumber}" instead of the "ENV{ID_USB_INTERFACE_NUM} ", but also no success. Reg

Re: [systemd-devel] Springboot and systemd, clean shutdown

2024-10-02 Thread Andrei Borzenkov
02.10.2024 19:58, Brian Reichert wrote: My goal: Under SLES12 SP5 running systemd-228, I want to cleanly terminate a Java-based SpringBoot application. My problem: systemd (or at least the version available to me) seemingly is terminating my JVM differently than my ExecStop directi

Re: [systemd-devel] How to express that a device listed in /etc/crypttab depends on a mount point

2024-09-25 Thread Andrei Borzenkov
25.09.2024 18:28, aplanas wrote: Hi! An user have /home in a different encrypted partition via pcrlock. After the initrd, during the normal boot process, the systemd-cryptsetup generator is reading this file to open the devices in /dev/mapper/$name. But this is happening before /var gets mounted

Re: [systemd-devel] cannot create hard dependencies on mounts

2024-09-11 Thread Andrei Borzenkov
On Wed, Sep 11, 2024 at 2:35 PM Henti Smith wrote: > > On Tue, 10 Sept 2024 at 18:11, Andrei Borzenkov wrote: >> >> On 10.09.2024 17:37, Henti Smith wrote: >> > >> > While starting data.mount, this works correctly, as it waits for the NFS >> > share t

Re: [systemd-devel] cannot create hard dependencies on mounts

2024-09-10 Thread Andrei Borzenkov
On 10.09.2024 17:37, Henti Smith wrote: While starting data.mount, this works correctly, as it waits for the NFS share to become available before it mounts.. However, starting mission.service without starting data.mount, it correctly requires data.mount, but mission.service executes anyway. I'm

Re: [systemd-devel] Problem expanding environment variables

2024-09-06 Thread Andrei Borzenkov
On Fri, Sep 6, 2024 at 1:40 PM Thomas Köller wrote: > > Am 06.09.24 um 11:04 schrieb Andrei Borzenkov: > > You need to quote $ to pass it to the shell. > > ExecStart = sh -c 'echo Res: $${VAR#abc-}' > > Yes, this works. However, I didn't find this anywhere i

Re: [systemd-devel] Problem expanding environment variables

2024-09-06 Thread Andrei Borzenkov
On Fri, Sep 6, 2024 at 11:24 AM Thomas Köller wrote: > > I am having problems expanding environment variables in a service file. > This test serivice illustrates the problem: > > root@yoga:/etc/systemd/system# cat varexp.service > [Unit] > Description = Test environment variable expansion > > [Ser

Re: [systemd-devel] systemd-coredump[25256]: AT_NULL terminator not found, cannot parse auxv structure.

2024-08-27 Thread Andrei Borzenkov
On Tue, Aug 27, 2024 at 12:21 PM Windl, Ulrich wrote: > > Hi! > > > > I have an issue where Perl dumps core for no obvious reason, and I noticed > the line > > systemd-coredump[25256]: AT_NULL terminator not found, cannot parse auxv > structure. > It parses /proc/$PIF/auxv and apparently it was

Re: [systemd-devel] Updating network file during boot

2024-08-22 Thread Andrei Borzenkov
On 22.08.2024 16:56, Henti Smith wrote: On Thu, 22 Aug 2024 at 12:45, Andrei Borzenkov wrote: On Wed, Aug 21, 2024 at 7:12 PM Lennart Poettering wrote: Honestly, I'd really avoid mixing rename via udev rules and rename via .link files. I'd stick to .link files for this, real

Re: [systemd-devel] Updating network file during boot

2024-08-22 Thread Andrei Borzenkov
On Wed, Aug 21, 2024 at 7:12 PM Lennart Poettering wrote: ... > > > > After adding some more network devices to udev this way I now have the same > > udev configuration working intermittently and I'm not sure why. > > You are probably racing against the usual rename logic via .link > devices if yo

Re: [systemd-devel] Updating network file during boot

2024-08-22 Thread Andrei Borzenkov
On Thu, Aug 22, 2024 at 11:45 AM Henti Smith wrote: ... > > I attempted to match the network devices using Property= as follows (using > debug1 as an example): > > # Fixed name for debug1 (Debug Board) > [Match] > Property=Path=pci-:01:00.0 ID_NET_DRIVER=igb > "Path" is not udev property. >

Re: [systemd-devel] [EXT] Re: Understanding the effect of AccuracySec=

2024-08-19 Thread Andrei Borzenkov
On Mon, Aug 19, 2024 at 10:11 AM Barry wrote: > > > > On 19 Aug 2024, at 06:55, Windl, Ulrich wrote: > > > Despite of the fact that my version of systemd does not know that setting, > can you explain what the effect of AccuracySec= really is? > > > The docs https://www.man7.org/linux/man-pages/m

Re: [systemd-devel] Understanding the effect of AccuracySec=

2024-08-16 Thread Andrei Borzenkov
On 16.08.2024 12:43, Windl, Ulrich wrote: Hi! I have defined a time using [Timer] OnCalendar=daily AccuracySec=6h Persistent=true And the idea was to run the unit daily, but it's rather unimportant when, just nout in prime hours. The man page says: AccuracySec= Specify t

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Andrei Borzenkov
On Thu, Aug 15, 2024 at 7:15 PM Henti Smith wrote: ... > > The full device list (when configured correctly) is: > E: DEVPATH=/devices/pci:00/:00:0c.0/:01:00.0/net/eno1 > E: DEVPATH=/devices/pci:00/:00:0d.0/:02:00.0/net/eth1 > E: DEVPATH=/devices/pci:00/:00:10.0/

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Andrei Borzenkov
On Thu, Aug 15, 2024 at 4:08 PM Henti Smith wrote: > > I was really hoping that I could use DEVPATH to glob match on, but this seems > to not be possible. the only way to match on DEVPATH is using Property. > however there is no glob matching with that option. You can go old school and simply s

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Andrei Borzenkov
On Thu, Aug 15, 2024 at 2:37 PM Henti Smith wrote: > > > They do stay the same: > > Without the Board: > DEVPATH=/devices/pci:00/:00:10.0/:04:00.0/net/eno2 > DEVPATH=/devices/pci:00/:00:11.0/:05:00.0/net/mvc-sw1 > > With the Board: > DEVPATH=/devices/pci:00/:00:10.0

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Andrei Borzenkov
On Thu, Aug 15, 2024 at 12:25 PM Henti Smith wrote: > root@av20-mvc-01:~# udevadm info /sys/class/net/eno2 > P: /devices/pci:00/:00:10.0/:04:00.0/net/eno2 ... > > root@av20-mvc-01:~# udevadm info /sys/class/net/mvc-sw1 > P: /devices/pci:00/:00:11.0/:05:00.0/net/mvc-sw1 Doe

Re: [systemd-devel] Trying to resolve user level systemd unit journal not writing to local user journal

2024-08-13 Thread Andrei Borzenkov
would actually put the log there. But it > doesn't make a lot of sense to state the given behavior and not use it > > From: Andrei Borzenkov > Sent: Monday, August 12, 2024 11:08 PM > To: SCOTT FIELDS ; > systemd-devel@lists.freedesktop.org > Subject: [

Re: [systemd-devel] Trying to resolve user level systemd unit journal not writing to local user journal

2024-08-12 Thread Andrei Borzenkov
On 12.08.2024 22:36, SCOTT FIELDS wrote: OS = Fedora 39 Systemd version = 254.13 I have an application running via a user level system unit file. The UID is > 999. I'm expecting the application journal entries to be a local entry in $XDG_STATE_HOME/log, but it's using the user level journal i

Re: [systemd-devel] [EXT] Re: "OnUnitInactiveSec Timer not firing" issue

2024-08-01 Thread Andrei Borzenkov
On Thu, Aug 1, 2024 at 1:42 PM Windl, Ulrich wrote: > > Hi! > > On " Try adding Persistent=yes, it should make it behave as you expect (you > still need to start the unit manually at least once to initially trigger the > timer).": > > You talk about the service unit, and not about the timer unit,

Re: [systemd-devel] [EXT] Re: Re: "OnUnitInactiveSec Timer not firing" issue

2024-07-31 Thread Andrei Borzenkov
On Wed, Jul 31, 2024 at 9:30 AM Windl, Ulrich wrote: > > > > > -Original Message- > > From: Andrei Borzenkov > > Sent: Tuesday, July 30, 2024 4:12 PM > > To: Windl, Ulrich > > Cc: Mantas Mikulėnas ; systemd- > > de...@lists.freedesktop.

Re: [systemd-devel] [EXT] Re: "OnUnitInactiveSec Timer not firing" issue

2024-07-30 Thread Andrei Borzenkov
On Tue, Jul 30, 2024 at 11:25 AM Windl, Ulrich wrote: > > > > > -Original Message- > > From: Andrei Borzenkov > > Sent: Monday, July 29, 2024 1:19 PM > > To: Mantas Mikulėnas > > Cc: Windl, Ulrich ; systemd-devel@lists.freedesktop.or

Re: [systemd-devel] [EXT] Re: Re: "OnUnitInactiveSec Timer not firing" issue

2024-07-30 Thread Andrei Borzenkov
eeps it). > > -Original Message- > > From: systemd-devel On > > Behalf Of Windl, Ulrich > > Sent: Tuesday, July 30, 2024 10:26 AM > > To: Andrei Borzenkov ; Mantas Mikulėnas > > > > Cc: systemd-devel@lists.freedesktop.org > > S

Re: [systemd-devel] "OnUnitInactiveSec Timer not firing" issue

2024-07-29 Thread Andrei Borzenkov
On Mon, Jul 29, 2024 at 2:12 PM Mantas Mikulėnas wrote: >> >> Furthermore it seems to be necessary to run the service unit itself, too >> (assuming it must be enabled also, right?) > > > No. The purpose of the timer is to start the service, so starting the service > manually (or "enabling" it,

Re: [systemd-devel] "OnUnitInactiveSec Timer not firing" issue

2024-07-29 Thread Andrei Borzenkov
On Mon, Jul 29, 2024 at 9:33 AM Windl, Ulrich wrote: > > Hi! > > > > I tried to use my first systemd timer, but failed: Either I don’t understand > it correctly, or there is a bug in systemd (228 of SLES12 SP5): > > (See also https://unix.stackexchange.com/q/779714/320598) > > > > It seems it’s n

Re: [systemd-devel] Sharing kernel keyring between systemd services

2024-07-22 Thread Andrei Borzenkov
w thread, I'm new on this mailing list. > I personally do not care :) > > пн, 22 июл. 2024 г. в 13:42, Andrei Borzenkov : > > > > > On Mon, Jul 22, 2024 at 12:18 PM Nikita Krasnov > > wrote: > > > > > > I am working with kernel keyring (`e4crypt

Re: [systemd-devel] Sharing kernel keyring between systemd services

2024-07-22 Thread Andrei Borzenkov
On Mon, Jul 22, 2024 at 12:18 PM Nikita Krasnov wrote: > > I am working with kernel keyring (`e4crypt` tool stores its keys there). The > end goal, basically, is there is one service that decrypts a folder (creates > a key in the kernel keyring) and then every service has access to that key, >

Re: [systemd-devel] Q: What is the correct way to use `xdg-desktop-autostart.target` with window managers?

2024-07-19 Thread Andrei Borzenkov
On 19.07.2024 16:52, WieeRd wrote: I'm trying to use systemd as a XDG Autostart manager for WMs that does not provide builtin support for autostart entries. At first, I simply tried to `systemctl --user start` the target inside the window manager. However, it quickly turned out that the target ca

Re: [systemd-devel] DynamicUser and udev uaccess

2024-07-18 Thread Andrei Borzenkov
On 19.07.2024 05:01, Renjaya Raga Zenta wrote: Hi there, We have a service using DynamicUser=yes which interacts with some USB scanners. It seems TAG+="uaccess" is already set by 70-uaccess.rules as we use libsane. But unfortunately, the service cannot access the scanner unless we set MODE="666"

Re: [systemd-devel] namespace problem

2024-07-18 Thread Andrei Borzenkov
On Thu, Jul 18, 2024 at 4:00 PM Thomas Köller wrote: > > Am 18.07.24 um 14:04 schrieb Mantas Mikulėnas: > > Yes, but namespace persistence actually relies on filesystem access – > > it's implemented as a bind-mount of the namespace file descriptor (onto > > /run/netns for the 'ip netns' tool), as

Re: [systemd-devel] Systemd, cgrupsv2, cgrulesengd, and nftables

2024-06-17 Thread Andrei Borzenkov
On 17.06.2024 18:20, Michal Koutný wrote: Hello. On Sat, Jun 15, 2024 at 04:49:33PM GMT, Andrei Borzenkov wrote: ... Which does not really solve the problem. So, once again: - nftables allow filtering based on cgroupv2 path - cgroupv2 path is resolved at the time rule is processed. It is

Re: [systemd-devel] Systemd, cgrupsv2, cgrulesengd, and nftables

2024-06-15 Thread Andrei Borzenkov
On 15.06.2024 14:02, Mikhail Morfikov wrote: Otherwise there is such project as https://github.com/mk-fg/systemd-cgroup-nftables-policy-manager which dynamically adds nftables rules to match systemd cgroups (well, in principle it can match anything). It could be combined with "systemd-run --s

Re: [systemd-devel] Systemd, cgrupsv2, cgrulesengd, and nftables

2024-06-15 Thread Andrei Borzenkov
On 15.06.2024 16:58, Mikhail Morfikov wrote: On 15/06/2024 2.27 pm, Andrei Borzenkov wrote: On 15.06.2024 14:02, Mikhail Morfikov wrote: But there's no curl pids in /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/cgroup.procs . To be more specific, there's no pids at a

Re: [systemd-devel] Systemd, cgrupsv2, cgrulesengd, and nftables

2024-06-15 Thread Andrei Borzenkov
On 14.06.2024 11:20, Lennart Poettering wrote: On Fr, 14.06.24 10:06, Mikhail Morfikov (mmorfi...@gmail.com) wrote: -- Lennart Poettering, Berlin I don't need any warranty, I need a way to make this work. Yeah, but this is the wrong forum to ask for help then. What you are doing is strictly

Re: [systemd-devel] Systemd, cgrupsv2, cgrulesengd, and nftables

2024-06-15 Thread Andrei Borzenkov
On 15.06.2024 14:02, Mikhail Morfikov wrote: But there's no curl pids in /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/cgroup.procs . To be more specific, there's no pids at all in this cgroup.procs file. The curl pids are under # cat /sys/fs/cgroup/morfikownia/user/curl/pids.c

  1   2   3   4   5   6   7   8   9   10   >