Commit Graph

48283 Commits

Author SHA1 Message Date
Yu Watanabe 90ac73eb1b rules: drop broken links 2020-12-16 02:31:44 +09:00
Yu Watanabe e4b127e2cc meson: do not link with libudev 2020-12-16 02:31:44 +09:00
Yu Watanabe 1403fe26d6 udev: drop unnecessary libudev-util.h inclusions 2020-12-16 02:31:44 +09:00
Yu Watanabe b653abbb1a udevadm: drop udev_queue 2020-12-16 02:31:30 +09:00
Yu Watanabe bee33d0527 udev: introduce udev_queue_is_empty() and udev_queue_init() 2020-12-16 02:28:08 +09:00
Yu Watanabe 0746a5ee4c libudev: fix indentation 2020-12-16 02:23:13 +09:00
Yu Watanabe dae28211b7 libudev: drop unnecessary headers from libudev-util.c 2020-12-16 02:23:13 +09:00
Yu Watanabe 2b0f5113b4 udev: use encode_devnode_name() instead of udev_util_encode_string()
As udev_util_encode_string() is a simple wrapper of
encode_devnode_name().
2020-12-16 02:23:13 +09:00
Yu Watanabe c8eaaf69ac udev: rename UTIL_LINE_SIZE -> UDEV_LINE_SIZE and friends
This also moves them to udev-util.h
2020-12-16 02:22:58 +09:00
Yu Watanabe 1223227f95 udev: move util_resolve_subsys_kernel() to udev-util.c 2020-12-16 02:14:47 +09:00
Yu Watanabe 393fcaf733 udev: move util_replace_chars() to udev-util.c 2020-12-16 02:14:47 +09:00
Yu Watanabe 9a56b87717 udev: move util_path_encode() and rename it to escape_path() 2020-12-16 02:14:47 +09:00
Yu Watanabe 5953d8b910 udev: move util_replace_whitespace() to udev-util.c 2020-12-16 02:14:47 +09:00
shenyangyang4 b17f651a17 journalctl: don't skip the entries that have the same seqnum
These two judgement can't judge that two entries are repeating fully.
So i think seqnum is needed to make full judgement.
2020-12-15 18:07:11 +01:00
Gaurav fa8342228b Fix review comments in added debug log. 2020-12-15 17:47:03 +01:00
Gaurav d66b0ed4cc Fix build warning. 2020-12-15 17:47:03 +01:00
Gaurav 6ef03f7a0d Handle escape characters in interface name
Updated the patch as per review comments.
2020-12-15 17:47:03 +01:00
Gaurav 17f8a21fd0 Detect special character in dbus interface name
Added debug log to detect special character in dbus interface names.
Helps to detect a case mentioned in https://github.com/systemd/systemd/issues/14636
2020-12-15 17:47:03 +01:00
Fabian Affolter 04b2224957 Translated using Weblate (German)
Currently translated at 61.4% (115 of 187 strings)

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/de/
Translation: systemd/master
2020-12-15 17:40:56 +01:00
Ondrej Mosnacek 7b87bece5d resolved: create stub-resolv.conf symlink with correct security label
Use symlink_atomic_label() instead of symlink_atomic() as the symlink
may need a different label than the parent directory.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
2020-12-15 14:12:08 +01:00
Yu Watanabe fc874bf3bf
Merge pull request #17977 from yuwata/namespace-mount-procfs-follow-up
core/namespace: do not ignore non-EPERM mount error
2020-12-15 12:07:30 +09:00
Andrew Balmos 361f41645c efi: Only use arm flags if supported
Support gcc 8 on arm
2020-12-15 12:06:52 +09:00
Yu Watanabe 7843706caf
Merge pull request #17936 from keszybz/more-nss-logging
Add debug logging for varlink
2020-12-15 12:05:45 +09:00
Susant Sahani e81a44bf5f timesync: Make delaying attempts to contact servers configurable
```
❯ ssh sus@xx.xx.xx.xx
Last login: Sat Nov 14 17:32:08 2020 from 10.104.45.138
 17:36:19 up 0 min,  0 users,  load average: 0.00, 0.00, 0.00
> systemd-analyze blame
Bootup is not yet finished (org.freedesktop.systemd1.Manager.FinishTimestampMonotonic=0).
Please try again later.
Hint: Use 'systemctl list-jobs' to see active jobs
> systemd-analyze blame
43.954s systemd-time-wait-sync.service
 1.969s systemd-networkd-wait-online.service
 1.559s cloud-init-local.service
 1.039s cloud-init.service
  414ms cloud-final.service
  387ms dracut-initqueue.service
  382ms initrd-switch-root.service
  380ms cloud-config.service
  198ms systemd-journal-flush.service
  136ms systemd-udev-trigger.service
  115ms initrd-parse-etc.service
   97ms systemd-timesyncd.service
   84ms systemd-journald.service

```

After made it configurable and set to 5s

```
❯ ssh sus@xx.xx.xx.xx
Last login: Sat Nov 14 18:41:42 2020 from 10.104.45.138
 18:42:36 up 0 min,  0 users,  load average: 0.16, 0.03, 0.01
> systemd-analyze blame
10.450s systemd-time-wait-sync.service
 8.303s systemd-networkd-wait-online.service
 1.621s cloud-init-local.service
 1.068s cloud-init.service
```
2020-12-15 08:52:51 +09:00
Luca Boccassi e3284031ae
Merge pull request #17960 from yuwata/network-log-routing-policy-rule
network: introduce log_routing_policy_rule()
2020-12-14 22:22:51 +00:00
Luca Boccassi e1f3685750
Merge pull request #17959 from yuwata/network-log-address
network: introduce log_address_debug()
2020-12-14 22:21:50 +00:00
Luca Boccassi e82b77e984
Merge pull request #17958 from yuwata/network-route-log
network: introduce log_route_debug()
2020-12-14 22:17:33 +00:00
Yu Watanabe bcdb3b7d50 core: detect_container() may return negative errno 2020-12-14 19:35:11 +01:00
Zbigniew Jędrzejewski-Szmek db3d4222e9 varlink: add debug logging
When something fails, we need some logs to figure out what happened.
This is primarily relevant for connection errors, but in general we
want to log about all errors, even if they are relatively unlikely.

We want one log on failure, and generally no logs on success.
The general idea is to not log in static functions, and to log in the
non-static functions. Non-static functions which call other functions
may thus log or not log as appropriate to have just one log entry in the
end.
2020-12-14 19:21:55 +01:00
Yu Watanabe c4837f4567 Revert "core/namespace: ignore ENOENT for /proc/sys/kernel/domainname and hostname"
This reverts commit 0ebc9f23fa.

With the previous commit, these files should always exist.

Closes #17979.
2020-12-15 02:38:35 +09:00
Yu Watanabe ad74f28a13 core/namespace: do not ignore non-EPERM mount error
Follow-up for 61f8a7bd3e.
2020-12-15 02:37:03 +09:00
Yu Watanabe 23d8003bb6 time-util: fix typo 2020-12-14 17:56:01 +01:00
Yu Watanabe 61f8a7bd3e core/namespace: use existing /proc when not enough priviledge
Fixes #17860.
2020-12-14 16:12:43 +01:00
Yu Watanabe c18c53c36e network: use netlink_message_read_in_addr_union() where applicable 2020-12-14 23:32:25 +09:00
Yu Watanabe ea81208f03 network: introduce log_routing_policy_rule_debug() 2020-12-14 23:32:20 +09:00
Yu Watanabe 40424f1ad9 network: introduce routing_policy_rule_equal() 2020-12-14 23:30:16 +09:00
Yu Watanabe 18f2ee3310 network: make routing_policy_rule_remove() take Manager instead of Link
As routing policy rules are managed by Manager.
2020-12-14 23:30:16 +09:00
Yu Watanabe 1db01a3339 network: make address_drop() accept NULL 2020-12-14 23:28:11 +09:00
Yu Watanabe 24f50382af network: introduce log_address_debug() 2020-12-14 23:28:07 +09:00
Yu Watanabe 4055ec9323 network: merge manager_drop_routes() and manager_drop_foreign_routes() 2020-12-14 23:26:49 +09:00
Yu Watanabe 167a5561cd network: introduce log_route_debug() 2020-12-14 23:26:45 +09:00
Yu Watanabe ad6df71759 network: use netlink_message_read_in_addr_union() where applicable 2020-12-14 23:25:09 +09:00
Yu Watanabe 0ebc9f23fa core/namespace: ignore ENOENT for /proc/sys/kernel/domainname and hostname
If they do not exist, hostname or domainname cannot be modified. So, it is ok.

Fixes #17866, especially https://github.com/systemd/systemd/issues/17866#issuecomment-744118614.
2020-12-14 14:15:28 +00:00
Lennart Poettering 38abd1bfc5 Update TODO 2020-12-14 13:51:10 +01:00
Yu Watanabe 28423d9a75 tree-wide: fix typo 2020-12-14 12:05:55 +00:00
Ilya Dmitrichenko 65af8442df nspawn: remove outdated comment regarding bpffs
bpffs fully respects mount namespaces since kernel version 4.7

References:

- e27f4a942a
- 612bacad78
2020-12-14 10:50:42 +01:00
Yu Watanabe 8d80f27530 sd-device: make TAGS= property prefixed and suffixed with ":"
The commit 6f3ac0d517 drops the prefix and
suffix in TAGS= property. But there exists several rules that have like
`TAGS=="*:tag:*"`. So, the property must be always prefixed and suffixed
with ":".

Fixes #17930.
2020-12-14 14:04:53 +09:00
Yu Watanabe ba9385d91f
Merge pull request #17928 from keszybz/nss-logging
Enable logging in nss modules
2020-12-14 09:48:23 +09:00
Jameer Pathan 292420ce4b Add Pull Request Labeler 2020-12-14 09:43:38 +09:00
Vito Caputo 258190a0d5 mmap-cache: drop ret_size from mmap_cache_get()
The ret_size result is a bit of an awkward optimization that in a
sense enables bypassing the mmap-cache API, while encouraging
duplication of logic it already implements.

It's only utilized in one place; journal_file_move_to_object(),
apparently to avoid the overhead of remapping the whole object
again once its header, and thus its actual size, is known.

With mmap-cache's context cache, the overhead of simply
re-getting the object with the now known size should already be
negligible.  So it's not clear what benefit this brings, unless
avoiding some function calls that do very little in the hot
context-cache hit case is of such a priority.

There's value in having all object-sized gets pass through
mmap_cache_get(), as it provides a single entrypoint for
instrumentation in profiling/statistics gathering.  When
journal_file_move_to_object() bypasses getting the full object
size, you don't capture the full picture on the mmap-cache side
in terms of object sizes explicitly loaded from a journal file.

I'd like to see additional accounting in mmap_cache_get() in a
future commit, taking advantage of this change.
2020-12-13 11:14:43 +00:00