Commit graph

28146 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 0d066dd1a4 pid1: add new mode systemd.show-status=error and use it when 'quiet' is passed
systemd.show-status=error is useful for the case where people care about errors
only.

If people want to have a quiet boot, they most likely don't want to see all
status output even if there is a delay in boot, so make "quiet" imply
systemd.show-status=error instead of systemd.show-status=auto.

Fixes #14976.
2020-03-01 11:48:23 +01:00
Zbigniew Jędrzejewski-Szmek 5bcf34ebf3 pid1: when showing error status, do not switch to status=temporary
We would flip to status=temporary mode on the first error, and then switch back
to status=auto after the initial transaction was done. This isn't very useful,
because usually all the messages about successfully started units and not
related to the original failure. In fact, all those messages most likely cause
the information about the prime error to scroll off screen. And if the user
requested quiet boot, there's no reason to think that they care about those
success messages.

Also, when logging about dependency cycles, treat this similarly to a unit
error and show the message even if the status is "soft disabled" (before we
wouldn't show it in that case).
2020-03-01 11:42:42 +01:00
Zbigniew Jędrzejewski-Szmek 1b4154a891 pid1: make cylon timeout significantly bigger when not showing any messages
When we are booting with show-status=on, normally new status updates happen a
few times per second. Thus, it is reasonable to start showing the cylon eye
after 5 s, because that means a significant delay has happened. When we are
running with show-status=off or show-status=auto (and no error had occured),
the user is expecting maybe 15 to 90 seconds with no output (because that's
usually how long the whole boot takes). So we shouldn't bother the user with
information about a few seconds of delay. Let's make the timeout 25s if we are
not showing any messages.

Conversly, when we are outputting status messages, we can show the cylon eye
with a shorter delay, now that we removed the connection to enablement status.
Let's make this 2s, so users get feedback about delays more quickly.
2020-03-01 11:42:35 +01:00
Zbigniew Jędrzejewski-Szmek ef15d3e1ab pid1: touch the /run/systemd/show-status just once
We know if we created the file before, no need to repeat the operation. The
state in /run should always match our internal state. Since we call
manager_set_show_status() quite often internally, this saves quite a few
pointless syscalls.
2020-03-01 11:42:26 +01:00
Zbigniew Jędrzejewski-Szmek 7365a29670 pid1: when printing status message status, give reason 2020-03-01 11:42:19 +01:00
Zbigniew Jędrzejewski-Szmek 5ca02bfc39 core: fix message about show status state
We would say "Enabling" also for SHOW_STATUS_AUTO, which is actually
"soft off". So just print the exact state to make things easier to understand.
Also add a helper function to avoid repeating the enum value list.

For #14814.
2020-03-01 11:42:12 +01:00
Yu Watanabe 07336a0672 network: assume Scope=host when Address= is loopback address
Fixes #14903.
2020-02-28 09:53:36 +01:00
Anita Zhang 96100b8a04
Merge pull request #14964 from yuwata/conf-parser-fix-line-number
conf-parser: fix line number in error message
2020-02-27 17:16:35 -08:00
Anita Zhang 9c7179bbfa
Merge pull request #14965 from keszybz/journal-rotation-hint
systemctl: be more specific when emitting warning about rotated journal
2020-02-27 17:16:02 -08:00
Zbigniew Jędrzejewski-Szmek 1a8f0ce64f systemctl: be more specific when emitting warning about rotated journal
See inline comment for disucssion.
Fixes #14281.
2020-02-27 19:52:08 +01:00
Yu Watanabe 68c1ac1568 conf-parser: fix line number in error message
Fixes #14929.
2020-02-28 02:37:15 +09:00
Yu Watanabe df5a4889fe udevadm: show more error message during exporting database
Closes #14959.
2020-02-27 22:27:16 +09:00
Yu Watanabe 81eb5bc5cc network: remove redundant %m in error message 2020-02-27 20:28:29 +09:00
Peter Hutterer 3d7ac1c655 udev-builtin-input_id: any i2c mouse is a pointing stick
Where we have a device that looks like a mouse and is connected over i2c, tag
it as pointing stick. There is no such thing as a i2c mouse.

Even touchpads that aren't recognized by the kernel will not show up as i2c
mouse - either the touchpad follows the Win8.1 specs in which case the kernel
switches it to multitouch mode and it shows up like a touchpad. The built-in
trackpoint, if any, is then the i2c mouse device.

Where the touchpad doesn't follow the spec, the kernel will not handle it and
the touchpad remains on the PS/2 legacy bus - not i2c. Hence we can assume
that any i2c mouse device is really a pointing stick.
2020-02-27 19:53:46 +09:00
Yu Watanabe 15db1f3d2e
Merge pull request #14953 from yuwata/userdb-fix-groupdb
userdb: make groupdb_all() always set iterator when it returns >= 0
2020-02-27 19:53:20 +09:00
Yu Watanabe 443876d8dc userdb: make groupdb_all() always set iterator when it returns >= 0 2020-02-27 18:05:14 +09:00
Yu Watanabe 0ffbe10b81 userdb: drop unnecessary goto 2020-02-27 18:04:47 +09:00
Mike Gilbert 19bb96759a userdb: allow dots in username
This prevents an error in pam_systemd when logging in.

sshd[2623165]: pam_unix(sshd:session): session opened for user tony.stark(uid=10001) by (uid=0)
sshd[2623165]: pam_systemd(sshd:session): Failed to get user record: Invalid argument

Bug: https://bugs.gentoo.org/708824
2020-02-27 08:47:52 +01:00
HATAYAMA Daisuke 9c1f969d40 swap: finish the secondary swap units' jobs if deactivation of the primary swap unit fails
Currently, if deactivation of the primary swap unit fails:

    # LANG=C systemctl --no-pager stop dev-mapper-fedora\\x2dswap.swap
    Job for dev-mapper-fedora\x2dswap.swap failed.
    See "systemctl status "dev-mapper-fedora\\x2dswap.swap"" and "journalctl -xe" for details.

then there are still the running stop jobs for all the secondary swap units
that follow the primary one:

    # systemctl list-jobs
     JOB UNIT                                                                                                         TYPE STATE
     3233 dev-disk-by\x2duuid-2dc8b9b1\x2da0a5\x2d44d8\x2d89c4\x2d6cdd26cd5ce0.swap                                    stop running
     3232 dev-dm\x2d1.swap                                                                                             stop running
     3231 dev-disk-by\x2did-dm\x2duuid\x2dLVM\x2dyuXWpCCIurGzz2nkGCVnUFSi7GH6E3ZcQjkKLnF0Fil0RJmhoLN8fcOnDybWCMTj.swap stop running
     3230 dev-disk-by\x2did-dm\x2dname\x2dfedora\x2dswap.swap                                                          stop running
     3234 dev-fedora-swap.swap                                                                                         stop running

    5 jobs listed.

This remains endlessly because their JobTimeoutUSec is infinity:

    # LANG=C systemctl show -p JobTimeoutUSec dev-fedora-swap.swap
    JobTimeoutUSec=infinity

If this issue happens during system shutdown, the system shutdown appears to
get hang and the system will be forcibly shutdown or rebooted 30 minutes later
by the following configuration:

    # grep -E "^JobTimeout" /usr/lib/systemd/system/reboot.target
    JobTimeoutSec=30min
    JobTimeoutAction=reboot-force

The scenario in the real world seems that there is some service unit with
KillMode=none, processes whose memory is being swapped out are not killed
during stop operation in the service unit and then swapoff command fails.

On the other hand, it works well in successful case of swapoff command because
the secondary jobs monitor /proc/swaps file and can detect deletion of the
corresponding swap file.

This commit fixes the issue by finishing the secondary swap units' jobs if
deactivation of the primary swap unit fails.

Fixes: #11577
2020-02-27 08:40:51 +01:00
Ryan Attard 06654d1225
ata_id: Add support for host managed zone block devices (#14933)
If the peripheral device type is that of a host managed zone block device (0x14),
the device supports the same identification mechanisms as conventional disks (0x00).
2020-02-27 16:29:41 +09:00
Anita Zhang 1e84031952
Merge pull request #14950 from keszybz/kernel-install-script-boot_image
kernel-install: strip BOOT_IMAGE= from kernel options
2020-02-26 23:04:57 -08:00
Anita Zhang 54a2f5e69c
Merge pull request #14944 from yuwata/userdb-fix-iterator
userdb: make userdb_all() always set iterator when it returns >= 0
2020-02-26 22:46:17 -08:00
Zbigniew Jędrzejewski-Szmek e60228bf68 kernel-install: strip BOOT_IMAGE= from kernel options
https://bugzilla.redhat.com/show_bug.cgi?id=1716164.
2020-02-26 23:34:41 +01:00
Yu Watanabe 7c7c44855e userdb: fix memleak
Fixes #14947.
2020-02-27 00:32:33 +03:00
Yu Watanabe 41db91775a
Merge pull request #14942 from keszybz/rename-homes
Rename "home" to "home area"
2020-02-27 00:48:38 +09:00
Yu Watanabe 662d74daf7 userdb: make userdb_all() always set iterator when it returns >= 0
Fixes #14868.
2020-02-26 23:57:13 +09:00
Zbigniew Jędrzejewski-Szmek 09460a234b tree-wide: replace "asked to inhibit it" with "is inhibiting this"
The problem with the original form is that the subject of the sentence with
passive void is "the system", and we're not inhibiting the system. In English
the sense can be made out, but the form is gramatically incorrect.
In fact, the Polish translation got this wrong:
> msgid "Power off the system while an application is inhibiting this"
> msgstr "Wyłączenie systemu, kiedy program zażądał jego wstrzymania"
"jego" can only refer to "the system", because of gender mismatch with "power
off". If our translators cannot grok the message, then we should probably reword
it.

Also, drop the "asked to" part. Everything we do is over IPC, so we only ever
"ask" for things, and this adds no value.
2020-02-26 11:32:32 +01:00
Zbigniew Jędrzejewski-Szmek 15f73764c4 tree-wide: replace present participle forms
Infinitive is shorter and sounds better too.
2020-02-26 11:24:54 +01:00
Zbigniew Jędrzejewski-Szmek 18143cd767 tree-wide: s/home/home area/g
"home" is okay-ish in English, but rather awkward in many other languages.
For example, even before this change, in fr.po we had "un espace personnel"
as the translation everywhere. Let's use a less overloaded term.

Fixes #14789.
2020-02-26 11:11:57 +01:00
Yu Watanabe c0d48bc50f network: use VRF's route table if VRF= is set
Fixes #14940.
2020-02-26 15:50:28 +09:00
Alin Popa ad5555b42e systemd: Fix busctl crash on aarch64 when setting output table format
The enum used for column names is integer type while table_set_display() is parsing
arguments on size_t alignment which may result in assert in table_set_display() if
the size between types missmatch. This patch cast the enums to size_t.
It also fixes all other occurences for table_set_display() and
table_set_sort().
2020-02-16 02:09:26 +09:00
Alin Popa bec31cf5f0 systemd: Fix busctl crash on aarch64 when setting output table format
The enum used for column names is integer type while table_set_display() is parsing
arguments on size_t alignment which may result in assert in table_set_display() if
the size between types missmatch. This patch cast the enums to size_t.
An alternative solution would be to change the table_set_display() function
arguments to unsigned type.
2020-02-16 02:09:26 +09:00
Oliver Giles c315b79fb4 makefs: strdup arguments to mkfs
Don't pass values from argv[] directly to child process forked using
safe_fork, because it clears argv[]. strdup them first.
2020-02-13 20:36:17 +09:00
Yu Watanabe 1d6cfd25a2
Merge pull request #14833 from kpfleming/multiple-ipv6token-addresses
Support multiple IPv6Token 'static' addreses on an interface
2020-02-12 02:10:44 +09:00
Yu Watanabe c09f335744
Merge pull request #14584 from ssahani/tc-handle
network:tc add support for qdisc handle
2020-02-11 06:17:48 +09:00
Zbigniew Jędrzejewski-Szmek 99fdffaa19 Revert "Support Plugable UD-PRO8 dock"
This reverts commit 95f2b4dd23.

Unfortunately the same usb hub is used in other places, and causes
numerous regressions (#14822,
https://bugzilla.redhat.com/show_bug.cgi?id=1800820). Let's revert
until a non-regressing approach is found.
2020-02-10 17:19:52 +01:00
Chris Murphy d900701eea fix typo in object field
# homectl create hack --fs-type=btrfs
Unexpected object field 'fileSytemType'.
2020-02-10 19:47:42 +09:00
Kevin P. Fleming c24c83dc67 network: Allow multiple IPv6Token 'static' items to generate addresses
This patch allows multiple addresses using 'static' IPv6Tokens to
be generated for a single network interface.
2020-02-10 18:40:57 +09:00
Susant Sahani d8b2396d34 network: add support for qdisc handle 2020-02-10 17:48:53 +09:00
Yu Watanabe bfcdc87260 network: fix indentation 2020-02-10 15:55:04 +09:00
Kevin P. Fleming 8a98f11ed0 network: Make address_hash_ops available outside of networkd-address.c
In order to allow other parts of systemd-networkd to use sets/hashmaps
of Address objects, the address_hash_ops structure needs to be made
available to them.
2020-02-10 15:37:37 +09:00
Kevin P. Fleming 0ddad04eda network: Document the lack of actual DAD usage in prefixstable algorithm
The RFC 7217 (prefixstable) algorithm can use Duplicate Address
Detection to produce multiple candidate addresses, but the implementation
here does not currently employ that mechanism.
2020-02-10 15:37:30 +09:00
Kevin P. Fleming 53f8cced45 network: Correct typo and naming in error message
This error message will be emitted when any form of SLAAC address
generation fails, not just 'prefix stable', so the message should
only refer to SLAAC.
2020-02-10 15:37:13 +09:00
Kevin P. Fleming 87f9d6ea8e network: Improve variable name for address generation
The logic which can produce an IPv6 address using SLAAC produces an
address, not a prefix, so the boolean variable used to detect whether
it succeeded should reflect that.
2020-02-10 15:36:46 +09:00
Yu Watanabe b751c3e747 network fix parser for IPv6Token=
extract_first_word() drops multiple ':'. So, it is not suitable for
parsing 'static' case.
2020-02-10 00:40:18 +09:00
Luca Boccassi e2c1ddcc49 portablectl: add --now and --enable to attach/detach
Add shortcuts to enable and start, or disable and stop, portable
services with a single portablectl command.
Allow to pass a filter on detach, as it's necessary to call
GetImageMetadata to get the unit names associated with an image.

Fixes #10232
2020-02-07 17:09:05 +01:00
Zbigniew Jędrzejewski-Szmek c3b41d8811
Merge pull request #14805 from yuwata/network-ipv6-token-follow-up
network: rename eui64 to static
2020-02-07 17:05:33 +01:00
Zbigniew Jędrzejewski-Szmek 43e8a22aab
Merge pull request #14784 from yuwata/network-rename-qdisc-follow-up
network: introduce [QDisc] section to support Parent=ingress or clsact
2020-02-07 15:41:05 +01:00
Yu Watanabe 74deaff118 journal: fix log message 2020-02-07 15:27:43 +01:00
Yu Watanabe 03b76a1977 repart: do not quit earlier when --empty=force
Follow-up for 0ae5ffe063.
2020-02-07 13:48:16 +01:00