Age | Commit message (Collapse) | Author |
|
This is useful to check that compression actually works, and how
compression influences file size in the best-case-scenario for
compression. (The answer is that not as much as one would hope:
there's still a big overhead of the indexing and since every field
is compressed separately, even fields that compress very well
contribute to the file size. This overhead becomes negligible only
for very big fields.)
|
|
We have enough places where we parse an ifindex, hence introduce a
proper parsing function for it, that verifies all parameters.
|
|
don't try again
If we failed to extract a word, then that's how it is, we shouldn't try
to extract it again and again, it's unlikely to work, and we just
deadlock.
This is a fix-up for 52278ad31d92dffa9029c8a171b9e9348f5dcc8f.
|
|
When we enumerate journal files and encounter an invalid one, remember
which this, and show it to the user.
Note the possibly slightly surprising logic here: we store only one path
per error code. This means we show all error kinds but not every actual
error we encounter. This has the benefit of not requiring us to keep a
potentially unbounded list of errors with their sources around, but can
still provide a pretty complete overview on the errors we encountered.
Fixes #1669.
|
|
- Always print a debug log message about files and directories we cannot
open right when it happens instead of the caller, thus reducing the
number of places where we need to generate the debug message.
- Always push the errors we encounter immediately into the error set,
when we run into them, instead of in the caller. Thus, we never forget
to push them in.
- Use stack instead of heap memory where we can.
- Make remove_file() void, since it cannot fail anyway and always
returned 0.
- Make local machine check of journal directories explicit in a
function, to make things more readable.
- Port to all directory listing loops FOREACH_DIRENT_ALL()
- sd-daemon is library code, hence never log at higher log levels than
LOG_DEBUG.
|
|
|
|
When reading stuff, we should only return EIO when an actual read error
occured, not when we don't like the data for whatever reason.
We already return ENODATA for all other kinds of file truncation, hence
do the same for the most obvious kind, so that callers know what ENODATA
means.
|
|
For each service expose how many file descriptors there are currently in
the fd store.
(Also, fix the exporting of the fdstore limit, given that the field is
just an "unsigned" but we exported it as "uint32_t". Not that there way
any effective difference, but let's make this clean...)
|
|
Let's not eat up errors in shall_restore_state(), but in the consumers
instead, just for the sake of keeping the library calls generic.
|
|
Only that way it actually has an effect on all our sockets, including
$NOTIFY_SOCKET.
|
|
memory_erase() so far just called memset(), which the compiler might
optimize away under certain conditions if it feels there's benefit in
it. C11 knows a new memset_s() call that is like memset(), but may not
be optimized away. Ideally, we'd just use that call, but glibc currently
does not support it. Hence, implement our own simplistic version of it.
We use a GCC pragma to turn off optimization for this call, and also use
the "volatile" keyword on the pointers to ensure that gcc will use the
pointers as-is. According to a variety of internet sources, either one
does the trick. However, there are also reports that at least the
volatile thing isn't fully correct, hence let's add some snake oil and
employ both techniques.
https://news.ycombinator.com/item?id=4711346
|
|
systemd-run can launch units with RuntimeDirectory
|
|
test-execute: add more tests
|
|
Teach bus_append_unit_property_assignment() about 'Delegate' property
|
|
systemctl: port to extract_first_word
|
|
|
|
machine: fix #1739
|
|
|
|
|
|
Port capabiliy bounding set parsing to extract_first_word
|
|
Revert "utf8.[ch]: use char32_t and char16_t instead of int, int32_t,…
|
|
sd-journal.c: port to extract_first_word
|
|
|
|
machine: : port to extract_first_word
|
|
utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t
|
|
tests: lookup_paths_init depends on SYSTEMD_UNIT_PATH. Test it
|
|
core: two trivial debug/error message improvements
|
|
network: fix use-after-free in link_free
|
|
update TODO
|
|
|
|
The directive is called FileDescriptorStoreMax=, not FDStoreMax=.
|
|
Make sure journald never blocks on sd_notify() to PID 1
|
|
- inotify utab has been removed and we use libmount now
- x-systemd.requires= fstab option has been implemented to specify
dependencies in fstab
|
|
|
|
Otherwise we might run into deadlocks, when journald blocks on the
notify socket on PID 1, and PID 1 blocks on IPC to dbus-daemon and
dbus-daemon blocks on logging to journald. Break this cycle by making
sure that journald never ever blocks on PID 1.
Note that this change disables support for event loop watchdog support,
as these messages are sent in blocking style by sd-event. That should
not be a big loss though, as people reported frequent problems with the
watchdog hitting journald on excessively slow IO.
Fixes: #1505.
|
|
Better generate a real error then simply connect to the wrong socket.
|
|
rework C11 utf8.[ch] to use char32_t instead of uint32_t when referring
to unicode chars, to make things more expressive.
|
|
|
|
|
|
|
|
|
|
Let's make sure we don't start blocking on sd_notify() earlier than
necessary, let's bump the socket buffer sizes to 8M.
We already do something similar for our logging socket buffers, hence
apply a similar bump here.
|
|
The default of 16 is pretty low, let's bump this to accomodate for more
queued datagrams. This is useful for AF_UNIX/SOCK_DGRAM logging and
sd_notify() sockets as this allows queuing more datagrams before things
start to block, thus improving parallelization and logging performance.
|
|
- Make sure we log each error at least once, and at most once
- Replace FOREACH_WORD loops by extract_first_word() loops
- Use FOREACH_DIRENT() for directory loops
- Use free_and_strdup() where appropriate
- Do not operate on half-loaded SysV files
- Always properly free all memory
|
|
Let's make sure we don't even try to create the audit socket
|
|
|
|
When rebooting nspawn containers about 400 times we'd otherwise hit the
fd limit and refuse further reboots.
|
|
|
|
This adds support for a new environment variable
SYSTEMCTL_INSTALL_CLIENT_SIDE, that ensures that systemctl executes
install operations client-side instead of passing them to PID1. This is
useful in debugging situations, but even beyond that. However, we don't
want to make it official API, hence let's just make it an undocumented
environment variable.
Similar, add a second variable, SYSTEMCTL_SKIP_SYSV which allows
skipping the SysV chkconfig fall-back if set. This is useful for similar
reasons, and exposed as undocumented as environment variable for similar
reasons, too.
|
|
core: set_unit_path overwrites SYSTEMD_UNIT_PATH
|