IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This commit adds a corresponding integration test for ExtraFileDescriptors
after systemctl daemon-reexec. This ensures systemd keeps the file
descriptors while the service manager is restarting and we don't lose
ability to restart the service correctly.
Create a unit test for systemd timer DeferReactivation config option.
The test works by creating a timer which fires every 5 seconds and
starts an unit which runs for 5 seconds.
With DeferReactivation=true, the timer must fire every 5+5 seconds,
instead of the 5 it fires normally.
As we need at least two timer runs to check if the delta is correct,
the test duration on success will be at least 20 seconds.
To be safe, the test script waits 35 seconds: this is enough to get
at least three runs but low enough to avoid clogging the CI.
By default, in instances where timers are running on a realtime schedule,
if a service takes longer to run than the interval of a timer, the
service will immediately start again when the previous invocation finishes.
This is caused by the fact that the next elapse is calculated based on
the last trigger time, which, combined with the fact that the interval
is shorter than the runtime of the service, causes that elapse to be in
the past, which in turn means the timer will trigger as soon as the
service finishes running.
This behavior can be changed by enabling the new DeferReactivation setting,
which will cause the next calendar elapse to be calculated based on when
the trigger unit enters inactivity, rather than the last trigger time.
Thus, if a timer is on an realtime interval, the trigger will always
adhere to that specified interval.
E.g. if you have a timer that runs on a minutely interval, the setting
guarantees that triggers will happen at *:*:00 times, whereas by default
this may skew depending on how long the service runs.
Co-authored-by: Matteo Croce <teknoraver@meta.com>
Replaces 09373c1a50.
Let's remove stack directories and their lock files by workers if
possible.
Now, lock files must be created before creating stack directories, hence
lock files are moved to /run/udev/links.lock/ , e.g.,
Before:
/run/udev/links/disk\x2fby-diskseq\x2f1/.lock
After:
/run/udev/links.lock/disk\x2fby-diskseq\x2f1
Fixes ##34637.
bpf_current_task_under_cgroup() returns 1 if the task is under the
specified cgroup, 0 if not, negative if an error happens.
Differentiate the 1 and -1 cases, and report to userspace when we got
and error.
An error like this is mostly unlikely, the only common one is that the
userspace doesn't populate the map, and the call returns -EAGAIN.
Tested by mocking the return value of bpf_current_task_under_cgroup():
Enumeration completed
enp1s0f0np0: Configuring with /etc/systemd/network/20-test.network.
Sysctl monitor BPF returned error: Link number out of range
Sysctl monitor BPF returned error: No CSI structure available
Sysctl monitor BPF returned error: Invalid exchange
Sysctl monitor BPF returned error: Exchange full
Sysctl monitor BPF returned error: Invalid request code
Sysctl monitor BPF returned error: Unknown error 58
Sysctl monitor BPF returned error: Device not a stream
Sysctl monitor BPF returned error: Timer expired
Sysctl monitor BPF returned error: Machine is not on the network
Sysctl monitor BPF returned error: Object is remote
Sysctl monitor BPF returned error: Advertise error
- make it accept an empty string,
- use config_parse_in_addr_prefix(),
- move null address checker to address_section_verify().
No functional change, just refactoring.
Previously, the below was refused and the IPv6 address would not assigned.
===
[Address]
Address=2001:db8:0:f101::15/64
Broadcast=192.168.0.255
===
However, in the following case, networkd warned about the broadcast
address would be ignored, and the IPv6 address would be configured.
===
[Address]
Broadcast=192.168.0.255
Address=2001:db8:0:f101::15/64
===
Also, this makes the settings parsed independently, and the
inconsistency will be checked in the section verifier.
No functional change, just refactoring.
Follow-up for 3543456f84
I don't think list is particularly useful here. The passed fds are
constant for the lifetime of service, and with this commit we track
the number of extra fds in a dedicated var anyway.